![]() |
| |||||||
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 |
| Registered User Join Date: Sep 2005
Posts: 9
| establish a connection using TCP and capture the incoming packets i have to write a program in C++,to establish a TCP connection to internet and then sniff the packets using UDP..study those packets in details..i mean demarcate the packets... the OS on which i work is windows 98,and i work with Turbo C compiler. so,how do i start off with such kind of programming?? th |
| shraddha is offline | |
| | #2 |
| Super Moderator Join Date: Sep 2001
Posts: 4,746
| I recommend Beej's Guide to Network Programming http://www.ecst.csuchico.edu/~beej/guide/net/ I also recommend a newer compiler - like the freely available and hugely popular Dev-C++ from Bloodshed. |
| sean is offline | |
| | #3 |
| Registered User Join Date: Apr 2005
Posts: 134
| Since you are planning to develop this program on Windows Platform you need to Learn Winsock programming. Also, you definitely need little advanced compiler (and preferebly an advanced OS ). Anyway just check out the link below. It will give you a good heads-up.Winsock Programmer's FAQ |
| nkhambal is offline | |
| | #4 |
| Registered User Join Date: Sep 2005
Posts: 9
| thank you for links u send me..it really helped. but for now ,i m looking forward to write a simple code in C or C++ ,just to extract the data coming in while i m online,as the byte stream...as in i have written a simple C program,using inportb() and outportb(),but it does not work.could u suggest me some better way of doing it,but in C or C++ only |
| shraddha is offline | |
| | #5 |
| and the hat of Jobseeking Join Date: Aug 2001 Location: The edge of the known universe
Posts: 21,710
| It's not going to happen with that fossil compiler. |
| Salem is offline | |
| | #6 |
| and the hat of Jobseeking Join Date: Aug 2001 Location: The edge of the known universe
Posts: 21,710
| Is this your dial-up connection to your ISP via a modem on a COM port? |
| Salem is offline | |
| | #7 |
| Registered User Join Date: Sep 2005
Posts: 9
| yes!! its a dial up connection |
| shraddha is offline | |
| | #8 |
| and the hat of Jobseeking Join Date: Aug 2001 Location: The edge of the known universe
Posts: 21,710
| Well if you're in windows, then I think the only way you'll get to sniff the COM port is by a) Using some tools http://www.softpedia.com/get/Network...-Monitor.shtml http://www.sysinternals.com/Utilities/Portmon.html b) Writing some win32 hook functions (no I don't know how to do this). Also, since you're actually trying to interpret an IP link, perhaps ethereal will do it for you as well. Note I don't know this will work since I've only ever used ethereal on proper networks. http://www.ethereal.com/ None of this stands a chance of working with your crusty old compiler. |
| Salem is offline | |
| | #9 | |
| Registered User Join Date: Sep 2004 Location: California
Posts: 3,020
| Quote:
shraddha, I think you need to do a better job explaining exactly what it is you are trying to accomplish. I'm still not sure whether you are trying to sniff packets from a connection, or simply create your own connection to some server. | |
| bithub is offline | |
| | #10 |
| Registered User Join Date: Sep 2005
Posts: 9
| i m just trying to sniff packets from a connection.. |
| shraddha is offline | |
| | #11 | |
| * Death to Visual Basic * Join Date: Aug 2001
Posts: 768
| Quote:
__________________ "I don't suffer from insanity but enjoy every minute of it" - Edgar Allen Poe http://www.Bloodware.net - Developing free software for the community. | |
| Devil Panther is offline | |
| | #12 |
| Arron Join Date: Jul 2005
Posts: 17
| "establish a TCP connection to internet and then sniff the packets using UDP" You wan't a TCP session with internet. That's clear What's the next one ? Sniff the packets using UDP ?? Once u establish a connection (TCP), how will it accept UDP pacets for you to sniff ? |
| arron is offline | |
| | #13 |
| Registered User Join Date: Sep 2004
Posts: 12
| Sniffing When you sniff for packets, you get all kinds TCP, UDP, ICMP and others. Perhaps you want to capture the TCP packets that you're sending. You can use ethereal for that if you don't want to write code. If you do want to write C code for packet capture, take a look at the Pcap library. It makes life a lot easier for network sniffing. |
| tin is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|