I'm running the code as follows: sudo python sniff.py eth1 "tcp port 5000". This should filter in both ways (src and dst) but I only get 1 way. When I uncomment the line "p.loop(1, print_packet)" and "apply(print_packet,p.next())" the output on the console shows both ways but the dumpfile is empty ( I opened it in p.dump_open('dumpfile')).
Why is this happening?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm running the code as follows: sudo python sniff.py eth1 "tcp port 5000". This should filter in both ways (src and dst) but I only get 1 way. When I uncomment the line "p.loop(1, print_packet)" and "apply(print_packet,p.next())" the output on the console shows both ways but the dumpfile is empty ( I opened it in p.dump_open('dumpfile')).
Why is this happening?