MCPcopy Index your code
hub / github.com/secdev/scapy / __call__

Method __call__

scapy/ansmachine.py:199–214  ·  view source on GitHub ↗
(self, *args, **kargs)

Source from the content-addressed store, hash-verified

197 return self.sniffer
198
199 def __call__(self, *args, **kargs):
200 # type: (Any, Any) -> None
201 bg = kargs.pop("bg", False)
202 optsend, optsniff = self.parse_all_options(2, kargs)
203 self.optsend = self.defoptsend.copy()
204 self.optsend.update(optsend)
205 self.optsniff = self.defoptsniff.copy()
206 self.optsniff.update(optsniff)
207
208 if bg:
209 self.sniff_bg()
210 else:
211 try:
212 self.sniff()
213 except KeyboardInterrupt:
214 print("Interrupted by user")
215
216 def sniff(self):
217 # type: () -> None

Callers

nothing calls this directly

Calls 6

parse_all_optionsMethod · 0.95
sniff_bgMethod · 0.95
sniffMethod · 0.95
popMethod · 0.80
copyMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected