We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d63bcbd commit 2da0bbdCopy full SHA for 2da0bbd
test-scapy.py
@@ -46,7 +46,14 @@ def usage(msg=None):
46
sys.exit(1)
47
48
if dst == "127.0.0.1" or dst == "::1": # TODO: not sufficient because there are also global addresses that are on the machine
49
+ old_setting=conf.L3socket
50
conf.L3socket=L3RawSocket # http://wiki.spiritofhack.net/index.php/Scapy-erreurs#Je_ne_peux_pas_pinguer_127.0.0.1._Scapy_ne_marche_pas_avec_127.0.0.1_ni_localhost
51
+ # Test it (Scapy bug #193 http://trac.secdev.org/scapy/ticket/193)
52
+ try:
53
+ sr1(p, timeout=0.01)
54
+ except NameError:
55
+ print >>sys.stderr, "Warning, setting the local link as raw failed (Scapy bug #193)"
56
+ conf.L3socket=old_setting
57
58
p = IP(dst=dst)/UDP(sport=RandShort(),dport=dport)/DNS(rd=1,qd=DNSQR(qname=qname))
59
0 commit comments