Skip to content

arshdeepdhillon/Raw-Packet-Filter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Raw Packet Filter

To run pfilter.py:

Read pfilter.py for more info

$ python3 pfilter [rules filename] [packet filename]

To run createPkt.py:

Outputs a bytes file

$ python3 createPkt.py [tcp|udp|other] [sourceIP] [sourcePort] [destIP] [destPort] [outputFilename.txt|.dat|etc]

Rules format

One rule per line

[allow|deny] [tcp|udp] sourceIP:sourcePort -> destIP:destPort

Sample rule.txt

allow udp 100.100.100.100:10000 -> 10.10.10.10:10
deny tcp 2.1.1.1:10000 -> 10.10.10.10:10

About

Filter raw packets using Python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages