I am writing a program to see someone's chat messeges of msn messenger, if on same network. same ISP, or same LAN, When i run compile and run it from as a root, it works fine, but when i run my program from a non-root account it won't work as it use iopl() adn ioperm() calls to gain access for direct IO.
Do anybody knows an alternative to iopl() and ioperm(), or some other way to wirte data to port??? I am currently using inp() and outp() .
I need it urgent...!
Thanks in advance..
need help in input/output operations!!
need help in input/output operations!!
Praise the sea, But stay on Land
Re: need help in input/output operations!!
why do you need to write data to the port to read someone's msn messages? and why not just use libpcap?
Almost all of the networks use switches and you all know it well that switch use the mac address table and only send the related data to a client, unlike a hub, so if you want to grab somone's msn chat, its only possible if you are recieving his data too. So a simple solution to this is that, just don't let the switch to get your true MAC address, so either you have to rewite the MAC address layer protocol or the thing what i am doing.
Praise the sea, But stay on Land
-
- Cadet
- Posts: 4
- Joined: Tue Jun 01, 2004 12:38 am
- Location: Paris, France
Not sure it can be done
I think whether you use libpcap or the iopl() interface, it will require you to be root to allow you to send or capture raw data from the net interface.
There are 10 types of people in this world.
Those who know binary, and those who don't.
Those who know binary, and those who don't.
Hello,
1. libpcap and libnet are your best friends if you want to handle low-level packets (ethernet or otherwise) in APPLICATION layer. There is no need to go that much low-level for this, even if you do so in the kernel-space.
2. NEVER trust inb/oub and friends in the user-space. You'll get the problem of missing bytes. I had learnt this lesson from practical experience. The reason is that you app. MAY get scheduled while it is in the middle of an input/output operation.
1. libpcap and libnet are your best friends if you want to handle low-level packets (ethernet or otherwise) in APPLICATION layer. There is no need to go that much low-level for this, even if you do so in the kernel-space.
2. NEVER trust inb/oub and friends in the user-space. You'll get the problem of missing bytes. I had learnt this lesson from practical experience. The reason is that you app. MAY get scheduled while it is in the middle of an input/output operation.
"I think therefore I am" --- Rene Descartes