publicenemy Posted April 14, 2004 Posted April 14, 2004 (edited) I would like to know if its possible to get the IP that is in use by a Window by using AutoIt. Ex: IE is currently on ip xx.xx.xx.xx:port or X program is on IP xx.xx.xx.xx:port Thanks very much. Edited April 14, 2004 by publicenemy
scriptkitty Posted April 14, 2004 Posted April 14, 2004 @IPAddress1 IP address of first network adapter. Tends to return 127.0.0.1 on some computers. @IPAddress2 IP address of second network adapter. Returns 0.0.0.0 if not applicable. @IPAddress3 IP address of third network adapter. Returns 0.0.0.0 if not applicable. @IPAddress4 IP address of fourth network adapter. Returns 0.0.0.0 if not applicable. AutoIt3, the MACGYVER Pocket Knife for computers.
publicenemy Posted April 14, 2004 Author Posted April 14, 2004 Thanks but this is not really what im trying to achieve. As an example, open any computer game, enter lan or internet game Open command prompt and type netstat This is the type of info i want but for a SPECIFIC window, like "Unreal Tournament window". Thanks.
scriptkitty Posted April 14, 2004 Posted April 14, 2004 (edited) ahh, you want a port monitor type responce. Application blah.exe using port 80 on IP 227.31.51.243. You can get AutoIt to grab most information from a command line program. runwait('cmd /c netstat >c:\tempstat.txt ','',@sw_hide) then read the file and delete it after Edited April 14, 2004 by scriptkitty AutoIt3, the MACGYVER Pocket Knife for computers.
publicenemy Posted April 14, 2004 Author Posted April 14, 2004 (edited) Tks for the command, very nice. But lets say you have 3 programs using same Port, how do you figure which program is which? Edited April 14, 2004 by publicenemy
publicenemy Posted April 14, 2004 Author Posted April 14, 2004 All I see is a bunch of IP's with netstat. If i know which port the application uses i can figure which ip its connected to by looking for xx.xx.xx.xx.:myporthere But if 3 apps use that port how do i know which IP is which Window in my OS?
publicenemy Posted April 14, 2004 Author Posted April 14, 2004 (edited) Xp but this program must work on the most Windows versions possible. What i see with netstat -n is something like such Connexions actives Proto Adresse locale Adresse distante Etat TCP 64.18.165.20:1289 63.240.202.131:6112 TIME_WAIT TCP 64.18.165.20:1290 63.240.202.148:6112 TIME_WAIT TCP 64.18.165.20:1291 63.240.202.127:6112 ESTABLISHED TCP 64.18.165.20:1292 63.240.202.148:6112 TIME_WAIT TCP 64.18.165.20:1293 69.93.118.234:80 TIME_WAIT TCP 64.18.165.20:1294 63.240.202.169:4000 ESTABLISHED TCP 127.0.0.1:1045 127.0.0.1:1046 ESTABLISHED TCP 127.0.0.1:1046 127.0.0.1:1045 ESTABLISHED That is with a French version but english would just be a lil different. Edited April 14, 2004 by publicenemy
Guest Netspider Posted April 14, 2004 Posted April 14, 2004 (edited) runwait('cmd /c netstat -an | find ":4000" >c:\tempstat.txt ','',@sw_hide) then filter out the last octet of ip (169) btw. such programs already exist Edited April 14, 2004 by Netspider
MattNis Posted April 14, 2004 Posted April 14, 2004 do a netstat before and after the "Window" [quote]I was busy waiting all night for the Columbus Day Bunny to come down my chimney and light fireworks in my pumpkin.There's so much wrong with that.Oh, I'm sorry, i forgot you were Jewish.[/quote]
publicenemy Posted April 14, 2004 Author Posted April 14, 2004 Your right i could make a string compare before and after windows. I might do this. Thanks alot guys. Btw what programs are u talking about Netspider?
ezzetabi Posted April 15, 2004 Posted April 15, 2004 Currport maybe?http://members.lycos.co.uk/nirsoft1/about1.html
publicenemy Posted April 15, 2004 Author Posted April 15, 2004 (edited) This program looks nice and with "Process Created on" I will probably be able to figure what I want to know. Thank you very much!!!! Edited April 15, 2004 by publicenemy
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now