Click to See Complete Forum and Search --> : Read incoming data form a port
demon.KILER
Nov 20th, 2006, 04:40 PM
hi every one can any one pls help me with reading incoimg data of the port
i thought the code was
sock.IOControl(IOControlCode.DataToRead, byt, bytes)
sock.BeginReceive(Bufferdata, 0,bufferdata.Length, SocketFlags.None, New AsyncCallback(AddressOf OnReceive), Nothing)
error
Message = "The system detected an invalid pointer address in attempting to use a pointer argument in a call"
any help would be helpfull
the182guy
Nov 22nd, 2006, 11:42 AM
Hi there,
Im not 100% clear about your goal here, which of the following applies?
1. You want to open a port and let something connect, read the data and possibly send something back.
or
2. You want to read data coming into a port that is already in use, and was not opened by your program. IE you want to make a packet sniffer?
demon.KILER
Nov 22nd, 2006, 04:48 PM
2. You want to read data coming into a port that is already in use, and was not opened by your program. IE you want to make a packet sniffer?
is the exact thing I am trying to do for more than 2 days
thx for future help
the182guy
Nov 22nd, 2006, 07:41 PM
Have a look at this, its a contest winner
http://www.pscode.com/vb/scripts/ShowCode.asp?txtCodeId=4090&lngWId=10
Its not only a packet sniffer, but the guy has created a library, so people can just use the library to sniff the packets, I havent tested it but you should be able to have it read the data from a specific port on whatever protocol you choose such as TCP or UDP
There is another one here:
http://www.pscode.com/vb/scripts/BrowseCategoryOrSearchResults.asp?optSort=Alphabetical&txtCriteria=packet+sniffer&blnWorldDropDownUsed=TRUE&txtMaxNumberOfEntriesPerPage=10&blnResetAllVariables=TRUE&lngWId=10&B1=Quick+Search
demon.KILER
Nov 23rd, 2006, 05:29 PM
yeah I will take a look at it thx
high6
Nov 25th, 2006, 07:50 PM
Have a look at this, its a contest winner
http://www.pscode.com/vb/scripts/ShowCode.asp?txtCodeId=4090&lngWId=10
Its not only a packet sniffer, but the guy has created a library, so people can just use the library to sniff the packets, I havent tested it but you should be able to have it read the data from a specific port on whatever protocol you choose such as TCP or UDP
There is another one here:
http://www.pscode.com/vb/scripts/BrowseCategoryOrSearchResults.asp?optSort=Alphabetical&txtCriteria=packet+sniffer&blnWorldDropDownUsed=TRUE&txtMaxNumberOfEntriesPerPage=10&blnResetAllVariables=TRUE&lngWId=10&B1=Quick+Search
i've tryed those before but they dont work.
the182guy
Nov 26th, 2006, 09:10 AM
@high6 are you using vb6 or .net?
demon.KILER
Nov 26th, 2006, 04:21 PM
I use .net And i doesn't work for me
demon.KILER
Dec 1st, 2006, 08:33 PM
Any one tryed winpcap before ??
if U did pls explain to me how to use them in vb.net
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.