Results 1 to 9 of 9

Thread: Read incoming data form a port

  1. #1

    Thread Starter
    Hyperactive Member demon.KILER's Avatar
    Join Date
    Jul 2006
    Location
    I cannot remember !?
    Posts
    408

    Question Read incoming data form a port

    hi every one can any one pls help me with reading incoimg data of the port

    i thought the code was

    VB Code:
    1. sock.IOControl(IOControlCode.DataToRead, byt, bytes)
    2. sock.BeginReceive(Bufferdata, 0,bufferdata.Length, SocketFlags.None, New AsyncCallback(AddressOf OnReceive), Nothing)
    error

    VB Code:
    1. Message = "The system detected an invalid pointer address in attempting to use a pointer argument in a call"

    any help would be helpfull
    Last edited by demon.KILER; Nov 20th, 2006 at 06:02 PM.
    VS 2005 .....Framework SDK 3.0

    "Its mostly the brave one who choose to not fight"

  2. #2
    Frenzied Member the182guy's Avatar
    Join Date
    Nov 2005
    Location
    Cheshire, UK
    Posts
    1,473

    Re: Read incoming data form a port

    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?
    Chris

  3. #3

    Thread Starter
    Hyperactive Member demon.KILER's Avatar
    Join Date
    Jul 2006
    Location
    I cannot remember !?
    Posts
    408

    Re: Read incoming data form a port

    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
    VS 2005 .....Framework SDK 3.0

    "Its mostly the brave one who choose to not fight"

  4. #4
    Frenzied Member the182guy's Avatar
    Join Date
    Nov 2005
    Location
    Cheshire, UK
    Posts
    1,473

    Re: Read incoming data form a port

    Have a look at this, its a contest winner

    http://www.pscode.com/vb/scripts/Sho...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/Bro...1=Quick+Search
    Chris

  5. #5

    Thread Starter
    Hyperactive Member demon.KILER's Avatar
    Join Date
    Jul 2006
    Location
    I cannot remember !?
    Posts
    408

    Re: Read incoming data form a port

    yeah I will take a look at it thx
    VS 2005 .....Framework SDK 3.0

    "Its mostly the brave one who choose to not fight"

  6. #6
    Frenzied Member
    Join Date
    Sep 2005
    Posts
    1,547

    Re: Read incoming data form a port

    Quote Originally Posted by the182guy
    Have a look at this, its a contest winner

    http://www.pscode.com/vb/scripts/Sho...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/Bro...1=Quick+Search

    i've tryed those before but they dont work.

  7. #7
    Frenzied Member the182guy's Avatar
    Join Date
    Nov 2005
    Location
    Cheshire, UK
    Posts
    1,473

    Re: Read incoming data form a port

    @high6 are you using vb6 or .net?
    Chris

  8. #8

    Thread Starter
    Hyperactive Member demon.KILER's Avatar
    Join Date
    Jul 2006
    Location
    I cannot remember !?
    Posts
    408

    Re: Read incoming data form a port

    I use .net And i doesn't work for me
    VS 2005 .....Framework SDK 3.0

    "Its mostly the brave one who choose to not fight"

  9. #9

    Thread Starter
    Hyperactive Member demon.KILER's Avatar
    Join Date
    Jul 2006
    Location
    I cannot remember !?
    Posts
    408

    Re: Read incoming data form a port

    Any one tryed winpcap before ??
    if U did pls explain to me how to use them in vb.net
    VS 2005 .....Framework SDK 3.0

    "Its mostly the brave one who choose to not fight"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width