MCPcopy Create free account
hub / github.com/secdev/scapy / fragleak2

Function fragleak2

scapy/layers/inet.py:2438–2456  ·  view source on GitHub ↗
(target, timeout=0.4, onlyasc=0, count=None)

Source from the content-addressed store, hash-verified

2436
2437@conf.commands.register
2438def fragleak2(target, timeout=0.4, onlyasc=0, count=None):
2439 found = {}
2440 try:
2441 while count is None or count:
2442 if count is not None and isinstance(count, int):
2443 count -= 1
2444
2445 pkt = IP(dst=target, options=b"\x00" * 40, proto=200)
2446 pkt /= "XXXXYYYYYYYYYYYY"
2447 p = sr1(pkt, timeout=timeout, verbose=0)
2448 if not p:
2449 continue
2450 if conf.padding_layer in p:
2451 leak = p[conf.padding_layer].load
2452 if leak not in found:
2453 found[leak] = None
2454 linehexdump(leak, onlyasc=onlyasc)
2455 except Exception:
2456 pass
2457
2458
2459@conf.commands.register

Callers

nothing calls this directly

Calls 3

sr1Function · 0.90
linehexdumpFunction · 0.90
IPClass · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…