spyrorocks Posted June 6, 2006 Share Posted June 6, 2006 (edited) Hello. How would i go about getting the remote IP address for a computer? Thanks in advance. Edited June 6, 2006 by spyrorocks [center] My Projects: Online AutoIt Compiler - AutoForum - AutoGuestbook - AutoIt Web-based Auto Installer - Pure AutoIt Zipping Functions - ConfuseGen - MindReader - P2PChat[/center] Link to comment Share on other sites More sharing options...
Simucal Posted June 6, 2006 Share Posted June 6, 2006 (edited) Hello. How would i go about getting the remote IP address for a computer? Thanks in advance.Spyro.. Honestly, you have been here a long time. You should know how to go about posting questions by now. Give MORE information. Do you have a hostname of the remote computer and just need to resolve its IP? Do you just want the external IP of the computer the script is running on? Or is it some other circumstance?There is no such thing as too much information. Edited June 7, 2006 by Simucal AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc) Link to comment Share on other sites More sharing options...
jefhal Posted June 7, 2006 Share Posted June 7, 2006 Hello. How would i go about getting the remote IP address for a computer? Thanks in advance.I use a script that runs ipconfig on the remote computer and then parses out the ip addresses (and mac id's). However, if the network card is disabled, it will not get the ip address. I use PSEXEC from Sysinternals to run my script on the remote machine. You can pass the output of ipconfig to the clipboard using the WindowsXP utility "clip.exe" which comes with the resource disk. Of course, as Simucal says, this may have nothing to do with what you really want... ...by the way, it's pronounced: "JIF"... Bob Berry --- inventor of the GIF format Link to comment Share on other sites More sharing options...
spyrorocks Posted June 7, 2006 Author Share Posted June 7, 2006 I am soo sorry. I was in a hurry. I just need to get the external IP of the computer that the script is running on. [center] My Projects: Online AutoIt Compiler - AutoForum - AutoGuestbook - AutoIt Web-based Auto Installer - Pure AutoIt Zipping Functions - ConfuseGen - MindReader - P2PChat[/center] Link to comment Share on other sites More sharing options...
jefhal Posted June 7, 2006 Share Posted June 7, 2006 I am soo sorry. I was in a hurry. I just need to get the external IP of the computer that the script is running on.Just use ipconfig locally and parse the ip address the same way. ...by the way, it's pronounced: "JIF"... Bob Berry --- inventor of the GIF format Link to comment Share on other sites More sharing options...
spyrorocks Posted June 7, 2006 Author Share Posted June 7, 2006 Um, i need the script to do that. [center] My Projects: Online AutoIt Compiler - AutoForum - AutoGuestbook - AutoIt Web-based Auto Installer - Pure AutoIt Zipping Functions - ConfuseGen - MindReader - P2PChat[/center] Link to comment Share on other sites More sharing options...
Mac3051 Posted June 7, 2006 Share Posted June 7, 2006 Um, i need the script to do that.If you have the ability to edit the script before it next runs, the built in Macros of @IPAddress1...4 should do what you need.Best of luck,RMc Link to comment Share on other sites More sharing options...
spyrorocks Posted June 7, 2006 Author Share Posted June 7, 2006 Um, no. That gest the local IP address. I need the remote one. [center] My Projects: Online AutoIt Compiler - AutoForum - AutoGuestbook - AutoIt Web-based Auto Installer - Pure AutoIt Zipping Functions - ConfuseGen - MindReader - P2PChat[/center] Link to comment Share on other sites More sharing options...
spyrorocks Posted June 7, 2006 Author Share Posted June 7, 2006 What ever. I just figured it out on my own. wrote my own function... func getremoteip() ; Function By Brad Reddicopp InetGet ( "http://www.whatismyip.com/" ,"C:\temp.dat" , 1) $html = fileread("C:\temp.dat") $html = StringAddCR ($html) filedelete("C:\temp.dat") filewrite("C:\temp.dat", $html) $line = FileReadLine ( "C:\temp.dat", 31) $ip = StringTrimLeft ( $line, 15) $ip = StringTrimRight ( $ip, 5) filedelete("C:\temp.dat") return $ip endfunc [center] My Projects: Online AutoIt Compiler - AutoForum - AutoGuestbook - AutoIt Web-based Auto Installer - Pure AutoIt Zipping Functions - ConfuseGen - MindReader - P2PChat[/center] Link to comment Share on other sites More sharing options...
jefhal Posted June 7, 2006 Share Posted June 7, 2006 (edited) Um, i need the script to do that.That's what I meant. Run ipconfig through your autoit script on whatever machine you want. When you get the output, sort through it for the ip addresses that you get back. If it's the external ip address of your router then you may have to use whatismyip.com. Do you know who owns that site? Just wondering if it's legit? This site is even cleaner: http://www.whatismyip.org/ Try this: #include <inet.au3> $xip = _InetGetSource("http://whatismyip.org/") MsgBox(1,$xip,$xip) Edited June 7, 2006 by jefhal ...by the way, it's pronounced: "JIF"... Bob Berry --- inventor of the GIF format Link to comment Share on other sites More sharing options...
spyrorocks Posted June 7, 2006 Author Share Posted June 7, 2006 (edited) Yes, it is cleaner. What ever... I just finnished. Plus, i dont want too many includes, so im fine here. And yes, that website is legit. why would it not be? Edited June 7, 2006 by spyrorocks [center] My Projects: Online AutoIt Compiler - AutoForum - AutoGuestbook - AutoIt Web-based Auto Installer - Pure AutoIt Zipping Functions - ConfuseGen - MindReader - P2PChat[/center] Link to comment Share on other sites More sharing options...
Rick Posted June 7, 2006 Share Posted June 7, 2006 why not just use @IPAddress2 as in msgbox(0,"", @IPAddress2 ) Who needs puzzles when we have AutoIt!! Link to comment Share on other sites More sharing options...
jefhal Posted June 7, 2006 Share Posted June 7, 2006 why not just use @IPAddress2He's actually looking for the "outside" address of his network. The one that an outsider would attempt to connect to. @IPAddress2 is, I believe, the ip address of the second network adapter that is on the local machine. In the case of a machine that is a proxy server, that would also be the "outside" address, but in a NAT network, that would just be another internal NAT ip address. ...by the way, it's pronounced: "JIF"... Bob Berry --- inventor of the GIF format Link to comment Share on other sites More sharing options...
Uten Posted June 8, 2006 Share Posted June 8, 2006 It does not explicitly say so in the help file but _GetIp() returns the public (Internett) address of my network. That is the address after the third firewall in my case. I'm only using the beta (126). Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
jefhal Posted June 8, 2006 Share Posted June 8, 2006 It does not explicitly say so in the help file but _GetIp() returns the public (Internett) address of my network. That is the address after the third firewall in my case. I'm only using the beta (126).You are correct sir! inet.au3 uses an external website as well to retrieve the outside ip address of your network. I guess the fundamental question is: which external website do I not only trust, but do I expect to be around longer than my code is in use? ...by the way, it's pronounced: "JIF"... Bob Berry --- inventor of the GIF format Link to comment Share on other sites More sharing options...
Uten Posted June 8, 2006 Share Posted June 8, 2006 (edited) I know, have hacked it at least once to use my ISP's server If you have access to your outermost firewall you could use information from it. At least a reasonably new one has a web interface (goes for *DSL modems to). Edited June 8, 2006 by Uten Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
nitekram Posted June 8, 2006 Share Posted June 8, 2006 I think GRC would be the best - IMHO. Besides there is a lot of other great things from this site.https://www.grc.com/x/ne.dll?bh0bkyd2Look at the bottom of the page. 2¢ All by me:"Sometimes you have to go back to where you started, to get to where you want to go." "Everybody catches up with everyone, eventually" "As you teach others, you are really teaching yourself." From my dad "Do not worry about yesterday, as the only thing that you can control is tomorrow." WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2 AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit Docs SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language Programming Tips Excel Changes ControlHover.UDF GDI_Plus Draw_On_Screen GDI Basics GDI_More_Basics GDI Rotate GDI Graph GDI CheckExistingItems GDI Trajectory Replace $ghGDIPDll with $__g_hGDIPDll DLL 101? Array via Object GDI Swimlane GDI Plus French 101 Site GDI Examples UEZ GDI Basic Clock GDI Detection Ternary operator Link to comment Share on other sites More sharing options...
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