Usage: scapy.py [-c new_startup_file] [-p new_prestart_file] [-C] [-P] [-H]
Args:
-H: header-less start
-C: do not read startup file
-P: do not read pre-startup file
Options (7)
| Option | Description | Source |
|---|
-h | display usage | man |
-H | header-less mode, also reduces verbosity. | man |
-d | increase log verbosity. | man |
-p PRESTART_FILE | use PRESTART_FILE instead of $HOME/.config/scapy/prestart.py as pre-startup file | man |
-P | do not run prestart file | man |
-c STARTUP_FILE | use STARTUP_FILE instead of $HOME/.config/scapy/startup.py as startup file | man |
-C | do not run startup file | man |
Examples (12) from the manual page, untested
sr(IP(dst="172.16.1.1", ihl=2, options=["verb$2"], version=3)/ICMP(), timeout=2)
Test the robustness of a network stack with invalid packets:a=sniff(filter="tcp port 110")
Packet sniffing and dissection (with a bpf filter or tshark-like output):a=sniff(filter="tcp port 110")
Sniffed packet re-emission:sendp(rdpcap("file.cap"))
Pcap file packet re-emission:sr(IP(dst="www.google.com", ttl=(1,30))/TCP(seq=RandInt(), sport=RandShort(), dport=dport)
Manual TCP traceroute:sr(IP(dst="172.16.1.28", proto=(1,254)))
Protocol scan:srp(Ether(dst="ff:ff:ff:ff:ff:ff")/ARP(pdst="172.16.1.1/24"))
ARP ping:sr(IP(dst="172.16.1.28")/TCP(dport=(1,1024), flags="A"))
ACK scan:sniff(prn=prnp0f)
Passive OS fingerprinting:nmap_fp("172.16.1.232")
Active OS fingerprinting:sendp(Ether(dst=tmac)/ARP(op="who-has", psrc=victim, pdst=target))
ARP cache poisoning:report_ports("192.168.2.34", (20,30))
Reporting:
Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.