Hamas was rooting out Israeli and foreign spy infrastructure in Gaza for a long time:
..
..
The military wing of Gaza's Hamas rulers said Saturday that the aim of a botched undercover Israeli operation in the Palestinian enclave aimed to plant spying devices in their communications network.
The November 11 special forces operation, which Israel said was an intelligence-gathering mission, turned deadly when the undercover soldiers were spotted near Khan Yunis in the southern Gaza Strip.
The ensuing firefight claimed the lives of an Israeli army officer and seven Palestinian militants, including a local Hamas military commander.
A spokesman for the Ezzedine al-Qassam Brigades said that 15 members of an elite Israeli military unit had infiltrated Gaza via the border fence and travelled in the enclave using cars disguised as vehicles belonging to a local charity.
Their goal was "establishing a spy system to eavesdrop on the communications network of the resistance in the Gaza Strip", Abu Obeida said, showing video footage of what he said was the soldiers in action.
Hamas also managed to capture equipment used by the group, Abu Obeida added, promising a million dollars to any local "collaborator" who would supply Hamas with information about the operation.
On Tuesday, Hamas said it had arrested 45 Gazan "collaborators" with Israel following the Khan Yunis incident.
Hamas says botched Israeli Gaza raid aimed to bug comms
www.france24.com