473,385 Members | 1,569 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Making a simple packet analyser program

Hi everyone,

I'd quite like to create a small application that could listen on a
port and take a copy of any communications going in or out.
The end goal is to be able to offer statistics and stuff regarding the
packets, and also to join them up and allow for easy reading of the
packets and headers etc.

The question is, how is it done?

I know how to communicate across a port but I'm thinking, if the port
is already open then the program wouldnt work. Is there any way I can
listen in on the communications and take a copy.

Many thanks to anyone who can share their wisdom!

Thanks
Simon
Nov 15 '05 #1
3 2531
This is about all I can offer, I don't know much else but this might help
http://www.codeproject.com/dotnet/dotnetwinpcap.asp
"Simon" <sh******@hotmail.com> wrote in message
news:a6*************************@posting.google.co m...
Hi everyone,

I'd quite like to create a small application that could listen on a
port and take a copy of any communications going in or out.
The end goal is to be able to offer statistics and stuff regarding the
packets, and also to join them up and allow for easy reading of the
packets and headers etc.

The question is, how is it done?

I know how to communicate across a port but I'm thinking, if the port
is already open then the program wouldnt work. Is there any way I can
listen in on the communications and take a copy.

Many thanks to anyone who can share their wisdom!

Thanks
Simon

Nov 15 '05 #2
http://www.c-sharpcorner.com/Network...fferInCSLM.asp is interesting.
He also shows a novel way to parse the byte array into a struct using unsafe
code that solved a problem for me before.

--
William Stacey, DNS MVP

"Simon" <sh******@hotmail.com> wrote in message
news:a6*************************@posting.google.co m...
Hi everyone,

I'd quite like to create a small application that could listen on a
port and take a copy of any communications going in or out.
The end goal is to be able to offer statistics and stuff regarding the
packets, and also to join them up and allow for easy reading of the
packets and headers etc.

The question is, how is it done?

I know how to communicate across a port but I'm thinking, if the port
is already open then the program wouldnt work. Is there any way I can
listen in on the communications and take a copy.

Many thanks to anyone who can share their wisdom!

Thanks
Simon

Nov 15 '05 #3
If you want to capture whole packets including for example ethernet header
you will have to use low level packet capturing library. The most famous is
WinPCAP (winpcap.polito.it)
Hi everyone,

I'd quite like to create a small application that could listen on a
port and take a copy of any communications going in or out.
The end goal is to be able to offer statistics and stuff regarding the
packets, and also to join them up and allow for easy reading of the
packets and headers etc.

The question is, how is it done?

I know how to communicate across a port but I'm thinking, if the port
is already open then the program wouldnt work. Is there any way I can
listen in on the communications and take a copy.

Many thanks to anyone who can share their wisdom!

Thanks
Simon

Nov 15 '05 #4

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

Similar topics

38
by: jrlen balane | last post by:
basically what the code does is transmit data to a hardware and then receive data that the hardware will transmit. import serial import string import time from struct import * ser =...
1
by: foldface | last post by:
Hi I'm expecting the answer no here but its worth asking. If I wanted to test an arbitary program could I somehow say in query analyser, start a global transaction on this database, run my tests,...
7
by: owolablo | last post by:
Hi, I'm writing a program that sends 1500 bytes of data at once, from the client to the server. However, the packet is broken down into 3 different segments of 500 each before getting to the...
5
by: Mike | last post by:
Hello All, Please, if anyone can point me to the problem, I'd sure appreciate it! I am very new to VB programming and not a programmer to begin with. This is part of a Visual Basic 2005 Express...
1
by: visal | last post by:
hi Please help me.i am developing a java pgm to capture network packets using jpcap.i downloded jpcap and wpcap dll files. My pgm is: import jpcap.JpcapHandler; import jpcap.Jpcap; import...
3
by: nexus024 | last post by:
I am trying to write a program that will continuously sniff eth0 for a specific UDP packet thats being sent to a specific destination IP, alter the data of the packet, and finally transmit it to the...
1
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...
1
by: AngreGanon | last post by:
Hi all~ I've written a network program in C. This program catputures ARP request packet and reply wrong ARP packet. Hi. I've written a small program to learn to write in C. But unfortunately...
3
by: haribuvanesh | last post by:
Im working with a packet sniffer program and i get following exception on compilation. Plz help me out.... Exception in thread "main" java.lang.Error: Unresolved compilation problem: The method...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.