1. List of all protocols: ls()
2. Check internals of protocol: ls(protocol_name)
3. List of commands supperted by Scapy: lsc()
4. Check help of any command: help(command)
ICMP:
- Create packet: packet_ICMP = IP(dst="IP or Hostname")/ICMP()/"PAYLOAD"
- Check packet configurations: packet_ICMP.show()
- Summary of created packet: packet_ICMP.summary()
- Details of created packet: ls(packet_ICMP)
TCP:
- Create TCP packet: packet_TCP = Ether()IP(dst="IP or Hostname")/TCP(dport=port_number, flags='S')
- sr(packet_name)
Packet information:
- ans,unans=_
- ans.show()
ICMP:
- packet_ICMP = IP(dst="IP/Hostname")/ICMP()
- ans,unans = sr(packet_ICMP)
- ans = summary(lambda s,r: r.sprintf('{IP: %IP.src% is alive}'))
TCP SYN:
- packet_TCP_SYN = IP(dst="IP or Hostname")/TCP(dport=port_number, flags='S')