473,508 Members | 2,140 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

pcapy - print the DATA field of a packet

Hi all. I'm using pcapy module to sniff some ICMP packets. I would like to
modify this source:
http://www.google.it/search?hl=it&q=...n+Google&meta=
and visualize only the DATA filed of the sniffed packets instead of all
fields that are generally visualized (for example: ip src, ip dest, packet
type...)
For example in this sniffing output:

ICMP type: ECHOREPLY code: UNKNOWN

6efb bf0d 0800 4500 0027 9c42 0000 ff01 n.....E..'.B....
72eb 29ff 0459 2907 5549 0000 9942 0001 r.)..Y).UI...B..
0000 6e65 7473 7461 7420 2d61 6e ..Hello world!

.... I would like to visualize the 'Hello world' string only.
Sorry for my bad english.

Best regards.
Aug 27 '05 #1
2 4814
billiejoex wrote:
Hi all. I'm using pcapy module to sniff some ICMP packets. I would like to
modify this source:
http://www.google.it/search?hl=it&q=...n+Google&meta=
and visualize only the DATA filed of the sniffed packets instead of all
fields that are generally visualized (for example: ip src, ip dest, packet
type...)


Sorry, but *which* source are you talking about? The link you provided
appears to be merely a page of Google search results.

Was there a specific page in there which you meant to point us to instead?

-Peter
Aug 27 '05 #2
I'm really sorry. I was talking about this source:
http://oss.coresecurity.com/impacket/sniff.py
....but nevermind. I discovered the get_data_as_string() function that
resolved my problem

Sorry, but *which* source are you talking about? The link you provided
appears to be merely a page of Google search results.

Was there a specific page in there which you meant to point us to instead?

-Peter

Aug 27 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2397
by: billiejoex | last post by:
Hi. I'm trying to use pcapy module on Windows XP prof sp2 but it doesn't work. The example source reported on the site (http://oss.coresecurity.com/impacket/sniff.py) works only on *unix...
0
1569
by: billiejoex | last post by:
Hi all. The source below is a simple icmp sniffer made with pcapy. To decode packets I'm using the EthDecoder() function that returns a rapresentation of the packet including ICMP type, ICMP code,...
1
2493
by: billiejoex | last post by:
Hi all. I noticed that with the original pcap sniffing library it is possible to listen on multiple devices by using "select()" or "poll()" function. These function aren't present in pcapy module....
2
1990
by: rr | last post by:
Hi, i have to write a file composed of n packets of a given length. I need to write this file writing every packet when i get it, knowing its number and length. I mean: packet #0 -length 100...
9
3588
by: Macca | last post by:
Hi, I have a synchronous socket server which my app uses to read data from clients. To test this I have a simulated client that sends 100 byte packets. I have set up the socket server so...
4
1786
by: Olaf \El Blanco\ | last post by:
typedef struct { unsigned char data; } packet; typedef struct { packet info; int nro_reg; } Buffer_Network; void test(void) { FILE *filename;
1
3351
by: sangith | last post by:
Hi, I tried the packet capture module program. I did a file transfer using ftp from this host to another server. But when I ran the program, it was just hanging off and it did not print the...
2
9641
by: T00l | last post by:
I'm a newbie to python and for my first project i'm trying to create a packet filter. Having looked around i think pcapy will be the best way, there is a sniffer script available that incorporates a...
20
2787
by: =?Utf-8?B?ZW1pdG9qbGV5ZXM=?= | last post by:
Hi everyone: i read from the documentation of a dll that there is a struct that uses char for storing an IP address. How can it be? and how come i can get to representate the same value in a...
0
7227
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7331
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7054
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5633
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5056
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4713
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1564
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
768
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
424
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.