Skip to content Skip to sidebar Skip to footer

How to Read Ips in a Chat Applet

  1. #ane

    vb.elmar is offline

    Thread Starter

    Fond Member


    Read iP address in chat room

    Hi,

    when I am in a chat room I have a peer to peer connexion to some other
    computer.

    Is it possible to read my chat partners ip address (Windows XP)?


  2. #2

    menzow is offline

    Addicted Member


    Re: Read iP address in conversation room

    What kind of chat room?
    Did you wrote one yourself using winsock or you mean similar msn messenger?

  3. #3

    vb.elmar is offline

    Thread Starter

    Fond Member


    Re: Read iP accost in chat room


  4. #4

    vb.elmar is offline

    Thread Starter

    Addicted Fellow member


    Re: Read iP address in chat room

    No idea ?

    The Office Im searching for does not take to return the
    verbal IP address of my chat partner.

    It would exist fine, if i could get a list of ip addresses
    my estimator is continued with.

    When i start the DOS tool "netstat.exe" on my
    WinXP computer, I tin can list all my chat partners
    ip adresses.

    This is how to first the DOS command:
    =====================================
    1 Windowskey + R (=run application)
    2 enter "control.com"
    3 enter "netstat -an"
    4 Now, you can encounter your chat partner's ip address,
    due east.grand. "Foreign Address 188.72.224.43:1938 ESTABLISHED"

    -How can I listing the ip adresses with Visual Basic ?

    Final edited by vb.elmar; April 8th, 2010 at 05:08 AM.

  5. #five

    vb.elmar is offline

    Thread Starter

    Addicted Member


    Re: Read iP accost in chat room


  6. #6

    Re: Read iP accost in conversation room

    You could redirect the netstat output to a file(though this takes time).

    Wireshark or other applications are designed to sniff application'southward traffic. I couldn't tell you how to program 1 off the top of my head, though. Many are open source, and for windows, so check out which APIs they use to enumerate the connections. Many install a commuter which captures the traffic, simply you lot don't need all that if you merely want basic socket info similar addresses(I'm adequately confident such APIs be, equally least for connections using the MS winsock libraries, some raw connections can escape standard API detection, afaik, which is why most Sniffers use a depression-level network commuter, and then they grab all the connections).

    SysInternals makes tools that do this, and you can unremarkably find explanations for how they piece of work if yous Google hard enough. Sometimes the download folio outlines the APIs used. But you'll have to do plenty of inquiry on them.

    Last edited by FireXtol; Apr 20th, 2010 at 03:nineteen PM.

  7. #7

    whatsup is offline

    Hyperactive Fellow member


    Re: Read iP accost in conversation room

    you lot tin can redirect the output every bit FireXtol said similar this:

    Code:

                            Shell "netstat -an > C:\MyFolder\MyIpFile.txt"

  8. #8

    Re: Read iP address in chat room

    Here is a modified version of a program I had that runs NETSTAT and parses its output. It redirects the output via an anonymous pipe, so you lot avert the crudeness of creating and reading deejay files.

    In this example you set the constant MYPORT and it will report established connections to MYPORT and their foreign IP addresses.

    It could easily be changed to log these to a file, etc. The only part you'd probably need to change is Form1.

    The residuum of the project is reusable components you can treat equally a black box much as you lot would a precompiled OCX. The ShellPipe control has comments documenting its apply.


  9. #nine

    Jack_NL is offline

    New Member


    Re: Read iP address in conversation room

    Quote Originally Posted past dilettante View Post

    Here is a modified version of a program I had that runs NETSTAT and parses its output. Information technology redirects the output via an bearding piping, so yous avert the crudeness of creating and reading disk files.

    In this example you prepare the constant MYPORT and it will report established connections to MYPORT and their foreign IP addresses.

    It could hands be changed to log these to a file, etc. The only part you'd probably need to alter is Form1.

    The rest of the project is reusable components you tin treat as a blackness box much every bit y'all would a precompiled OCX. The ShellPipe control has comments documenting its apply.

    I know this is a erstwhile topic (VB6). I upgraded this project to .Internet. Now i get some

    Lawmaking:

    Equally Any is not supported in Declare statements.
    fault's in those 3 lines:

    Code:

    Private Declare Part CreatePipe Lib "kernel32" (ByRef phReadPipe As Integer, ByRef phWritePipe As Integer, ByRef lpPipeAttributes Equally Whatever, ByVal nSize As Integer) Every bit Integer

    Code:

    Private Declare Function ReadFile Lib "kernel32" (ByVal hFile As Integer, ByVal lpBuf As String, ByVal nNumberOfBytesToRead As Integer, ByRef lpNumberOfBytesRead As Integer, ByVal lpOverlapped Every bit Any) Equally Integer

    Lawmaking:

    Private Declare Role WriteFile Lib "kernel32" (ByVal hFile As Integer, ByVal lpBuf Equally Cord, ByVal cToWrite As Integer, ByRef cWritten As Integer, ByVal lpOverlapped As Any) As Integer
    Whatever idea'south how to brand this work over again?

    Thanks in advance.


  10. #10

    Re: Read iP accost in conversation room

    How does information technology piece of work here on VBForums? I come across where a fellow member displays your Bone and IP Address

    Anything I mail is an case just and is non intended to exist the merely solution, the full solution nor the terminal solution to your asking nor do I claim that it is. If you lot find it useful then it is entirely upwardly to you to brand any changes necessary you feel are acceptable for your purposes.


  11. #xi

    Re: Read iP address in chat room

    Quote Originally Posted past Jack_NL View Post

    Any idea's how to brand this piece of work again?

    Again? It works fine here.

    As for downgrading from a real compiled language to i of the .Internet scripting languages goes... you'd probably have to ask nigh that in a .Net forum.

    Quote Originally Posted past jmsrickland View Post

    How does it piece of work here on VBForums? I see where a member displays your Os and IP Address

    I haven't seen what you lot are referring to, but I suspect information technology is some variation of a cross-site web bug, and probably violates the terms of use here. Sadly enforcement of this seems to depend on whether you lot are part of the innner conduce of favored members hither.

yokoyamawhispiever.blogspot.com

Source: https://www.vbforums.com/showthread.php?610319-Read-iP-address-in-chat-room

Post a Comment for "How to Read Ips in a Chat Applet"