diff --git a/scapy/contrib/HomePlugAV.uts b/scapy/contrib/HomePlugAV.uts index 0982e97e546f42b862aa47b6df43d25fd198781e..815390c03f6123883aedcd5053ef6ff6096048ef 100644 --- a/scapy/contrib/HomePlugAV.uts +++ b/scapy/contrib/HomePlugAV.uts @@ -85,18 +85,27 @@ _ == (True, True) #= Discovery packet tests in local #~ netaccess HomePlugAV NetworkInfoConfirmationV10 NetworkInfoConfirmationV11 #pkt = Ether()/HomePlugAV() +#old_debug_dissector = conf.debug_dissector +#conf.debug_dissector = False #a = srp1(pkt, iface="eth0") +#conf.debug_dissector = old_debug_dissector #a #pkt.version = a.version #pkt /= NetworkInformationRequest() +#old_debug_dissector = conf.debug_dissector +#conf.debug_dissector = False #a = srp1(pkt, iface="eth0") +#conf.debug_dissector = old_debug_dissector #NetworkInfoConfirmationV10 in a or NetworkInfoConfirmationV11 in a #_ == True #= Reading local 0x400st octets of Software Image in Module Data blocks #~ netaccess HomePlugAV ReadModuleDataRequest #pkt = Ether()/HomePlugAV()/ReadModuleDataRequest(ModuleID=0x1) +#old_debug_dissector = conf.debug_dissector +#conf.debug_dissector = False #a = srp1(pkt, iface="eth0") +#conf.debug_dissector = old_debug_dissector #a #len(a.ModuleData) == pkt.Length #_ == True diff --git a/test/edns0.uts b/test/edns0.uts index 0fcbca0626a0fea6517413224e721a4f2c06d503..927ccd6e59c931acb007cfb0985b3ca404c19d47 100644 --- a/test/edns0.uts +++ b/test/edns0.uts @@ -48,7 +48,10 @@ str(tlv) == b'\x00\x05\x00\x04\x00\x11"3' #= EDNS-PING - Live test #~ netaccess #* NB: 85.17.219.217 and www.edns-ping.org seem down +#old_debug_dissector = conf.debug_dissector +#conf.debug_dissector = False #r = sr1(IP(dst="85.17.219.217")/UDP()/DNS(qd=[DNSQR(qtype="A", qname="www.edns-ping.org.")], ar=[DNSRROPT(z=0, rdata=[EDNS0TLV(optcode="PING", optdata=b"\x00\x11\x22\x33")])]), timeout=1) +#conf.debug_dissector = old_debug_dissector #len(r.ar) and r.ar.rdata[0].optcode == 4 # XXX: should be 5 + Test DNS Name Server Identifier (NSID) Option @@ -59,5 +62,8 @@ str(tlv) == b'\x00\x02\x00\x00' = NSID - Live test ~ netaccess +old_debug_dissector = conf.debug_dissector +conf.debug_dissector = False r = sr1(IP(dst="l.root-servers.net")/UDP()/DNS(qd=[DNSQR(qtype="SOA", qname=".")], ar=[DNSRROPT(z=0, rdata=[EDNS0TLV(optcode="NSID")])]), timeout=1) +conf.debug_dissector = old_debug_dissector len(r.ar) and DNSRROPT in r.ar and len(r.ar[DNSRROPT].rdata) and len([x for x in r.ar[DNSRROPT].rdata if x.optcode == 3]) diff --git a/test/regression.uts b/test/regression.uts index 5bc959b4f3228b65b8acf3e33b7f379188f056ff..be34b65d2007895cff9fd3d51c255c7182b7bcb5 100644 --- a/test/regression.uts +++ b/test/regression.uts @@ -491,7 +491,10 @@ assert(x.PDU.varbindlist[2].value == 1) = Sending and receiving an ICMP ~ netaccess IP ICMP -x=sr1(IP(dst="www.google.com")/ICMP(),timeout=3) +old_debug_dissector = conf.debug_dissector +conf.debug_dissector = False +x = sr1(IP(dst="www.google.com")/ICMP(),timeout=3) +conf.debug_dissector = old_debug_dissector x assert x[IP].ottl() in [32, 64, 128, 255] assert 0 <= x[IP].hops() <= 126 @@ -501,7 +504,10 @@ x is not None and ICMP in x and x[ICMP].type == 0 ~ netaccess IP UDP DNS * A possible cause of failure could be that the open DNS (resolver1.opendns.com) * is not reachable or down. +old_debug_dissector = conf.debug_dissector +conf.debug_dissector = False dns_ans = sr1(IP(dst="resolver1.opendns.com")/UDP()/DNS(rd=1,qd=DNSQR(qname="www.slashdot.com")),timeout=5) +conf.debug_dissector = old_debug_dissector DNS in dns_ans = Whois request @@ -579,7 +585,10 @@ len(_) == 12 = Port scan ~ netaccess IP TCP +old_debug_dissector = conf.debug_dissector +conf.debug_dissector = False ans,unans=sr(IP(dst="www.google.com/30")/TCP(dport=[80,443]),timeout=2) +conf.debug_dissector = old_debug_dissector ans.make_table(lambda (s,r): (s.dst, s.dport, r.sprintf("{TCP:%TCP.flags%}{ICMP:%ICMP.code%}"))) = Traceroute function