Packet parsing with python

L00PeR
6 years ago

0

Hey, I would like to know how can I parse network packets in python, there’s any kind of library which makes my work easier?
This is my simple code for sniffing network packets:
import socket s = socket.socket(socket.AF_INET, socket.SOCK_RAW, socket.IPPROTO_TCP) while 1: print s.recvfrom(65565)
And here’s a tiny piece of my output
('E\x00\x004\x8bj@\x004\x06\xce;U\x9f\xd5e\xc0\xa8\x01q\x01\xbb\xbb\x8aq\xb3\xe3i\x97?\xf1^\x80\x10\x02\x16O\xa1\x00\x00\x01\x01\x08\n\nl\x87\xe0\x00\x07\n\x93', ('85.159.213.101', 0))
Thank you in advance :)

3replies
4voices
428views
MiharyM
6 years ago

0

<3 <3 [float=left][float=right][s]Image[/s][/float][/float]

Micr0n [micr0n]
6 years ago | edited 6 years ago

0

+MiharyM I think L00PeR will be agree with you

Smyler [WHGhost]
6 years ago

1

You can use scapy if you need to do network security, it’s a very good library which handles packet sniffing to.

You must be logged in to reply to this discussion. Login
1 of 4

This site only uses cookies that are essential for the functionality of this website. Cookies are not used for tracking or marketing purposes.

By using our site, you acknowledge that you have read and understand our Privacy Policy, and Terms of Service.

Dismiss