Scapy Einzeller

Aus Si:Wiki von Siegrist SystemLösungen - Informatik und Rezepte
Wechseln zu: Navigation, Suche


TCP Syn Scan

>>> p = sr1(IPv6(dst="ipv6.google.com",)/TCP(dport=80,flags="S"))
>>> p.show()

TCP Syn Scan über Ports 10 - 500

>>> ans,unans = sr(IPv6(dst="ipv6.google.com",)/TCP(dport=(10,500),flags="S"))
>>> ans.summary(lambda(s,r):(r.src, s.dport, r.sprintf("{TCP:%TCP.flags%}

TCP Ack Scan

>>> p = sr1(IPv6(dst="ipv6.google.com",)/TCP(dport=80,flags="A"))
>>> p

UDP Scan

>>> ans,unans = sr(IPv6(dst="ipv6.google.com",)/UDP(dport=80))
>>> ans.res

ICMPv6 Scan

>>> ans,unans = sr(IPv6(dst="ipv6.google.com",)/ICMPv6EchoRequest())
>>> ans.res