Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions build-your-own-tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ from scapy.all import *
class Test(Packet):
name = "Test packet"
fields_desc = [ ShortField("test1", 1),
ShortField("test2", 2) ] def make_test(x,y):
ShortField("test2", 2) ]
def make_test(x,y):
return Ether()/IP()/Test(test1=x,test2=y)

if __name__ == "__main__":
Expand Down Expand Up @@ -96,4 +97,4 @@ def arp_monitor_callback(pkt):
sniff(prn=arp_monitor_callback, filter="arp", store=0)
```

For a real life example, you can check [Wifitap](http://sid.rstack.org/index.php/Wifitap_EN)
For a real life example, you can check [Wifitap](http://sid.rstack.org/index.php/Wifitap_EN)