AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How will I get my external IP ?

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
sup
Guest





PostPosted: Mon Oct 08, 2007 9:03 pm    Post subject: How will I get my external IP ? Reply with quote

How will I get my external IP via vidalia-tor (127.0.0.1:9051) with Ahk?
Does anyone can help me?
Back to top
sup
Guest





PostPosted: Mon Oct 08, 2007 9:11 pm    Post subject: Reply with quote

ohh and i forgot to mention that i use FF with foxyproxy, so i dont mess with the internet explorer's proxy setting, so the manual
Quote:
UrlDownloadToFile will use a proxy server to access the Internet if such a proxy has been configured in Microsoft Internet Explorer's settings.
didnt help me
Back to top
sup
Guest





PostPosted: Mon Oct 08, 2007 9:38 pm    Post subject: Reply with quote

Help Sad
Back to top
engunneer



Joined: 30 Aug 2005
Posts: 6772
Location: Pacific Northwest, US

PostPosted: Tue Oct 09, 2007 7:06 am    Post subject: Reply with quote

whatsmyip.net? (might be .com)

since it goes though IE, then you will get your real, local IP. There is no use getting your external IP through tor, since it always changes.
_________________
Unless otherwise noted, all code is untested.
Common Answers: 1.(Loops, Viruses, etc.) 2. Search 3.RTFM
Back to top
View user's profile Send private message Visit poster's website
sup
Guest





PostPosted: Tue Oct 09, 2007 12:39 pm    Post subject: Reply with quote

That is the point! I need to display in my program the country's name of my exit node. Its very important to me
p.s. why do you think I ask for help? dont you think I look and test every script in every topic related? Rolling Eyes
Back to top
Xenolith0



Joined: 06 Oct 2007
Posts: 6
Location: Adelaide, Australia

PostPosted: Tue Oct 09, 2007 12:57 pm    Post subject: Reply with quote

Code:
:SI*:]ip::   ; Replaces "]ip" with user's current external ip address
FileDelete, ipaddress
UrlDownloadToFile, http://cdxliv.net/ipaddress.php, ipaddress
FileRead, ipaddress, ipaddress
SendInput %ipaddress% `
FileDelete, ipaddress
return


I use that to get my IP address, you mentioned something about IE, but I'm not clear about what you meant. If you cannot use IE, then you can use cURL+AHK and set up the connection however you need to.
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Moderator!
Guest





PostPosted: Tue Oct 09, 2007 1:00 pm    Post subject: Reply with quote

sup wrote:
dont you think I look and test every script in every topic related? Rolling Eyes


You sound offended! How does engunneer know who you are unless you use your registered nick?. Checking the IP of each and every post isnt practical.
Back to top
sup(pe)
Guest





PostPosted: Tue Oct 09, 2007 1:07 pm    Post subject: Reply with quote

Quote:
dont you think I look and test every script in every topic related?
If you would, I'd call you unefficient. If you test those which are related, I'd call you selfmotivated. As we can't see any code you've scrpited on your own but you're complaining, I'd call you smugly. Confused
Back to top
Titan



Joined: 11 Aug 2004
Posts: 5041
Location: imaginationland

PostPosted: Tue Oct 09, 2007 1:12 pm    Post subject: Reply with quote

Download and parse http://checkip.dyndns.org/ with cURL using the proxy Privoxy creates for tor connections (127.0.0.1:8118 for me).
_________________

RegExReplace("irc.freenode.net/ahk", "^(?=(.(?=[\0-r\[]*((?<=\.).))))(?:[c-\x73]{2,8}(\S))+((2)|\b[^\2-]){2}\D++$", "$u3$1$3$4$2")
Back to top
View user's profile Send private message Visit poster's website
sup
Guest





PostPosted: Tue Oct 09, 2007 1:29 pm    Post subject: Reply with quote

Laughing engunneer you have many friends here
Back to top
Xenolith0



Joined: 06 Oct 2007
Posts: 6
Location: Adelaide, Australia

PostPosted: Tue Oct 09, 2007 2:01 pm    Post subject: Reply with quote

Sup, I noticed you said you needed the country name as well. So I threw together this page really quick:
http://ip.cdxliv.net/
it returns a plain text page formatted as
Code:
<external ip>,<2 letter country code>,<printable country name>
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
sup
Guest





PostPosted: Tue Oct 09, 2007 3:09 pm    Post subject: SOLVED Reply with quote

I reinstaled Vidalia so now it is with Proxy included.
My working demo script Very Happy :
Code:
;THIS SCRIPT WORKS ONLY WITH VIDALIA+PROXY INSTALLED !!!
;+++++++++++++++++++++++++++++++++++++++++++++++++++++++
CurlPath=c:\Program Files\curl.exe
RunWait, %CurlPath% -o %A_Temp%\MyExternalIP.txt --proxy 127.0.0.1:8118 http://ip.cdxliv.net/,,Min
FileRead, MyExternalIp, %A_Temp%\MyExternalIP.txt
StringSplit,IPInfo,MyExternalIp,`,
IP:=IPInfo1
CountryCode:=IPInfo2
CountryName:=IPInfo3

MsgBox Country is: %CountryName%
MsgBox IP is %IP%

I could not have done this without your help Cool. Cheers!
Back to top
engunneer



Joined: 30 Aug 2005
Posts: 6772
Location: Pacific Northwest, US

PostPosted: Wed Oct 10, 2007 3:10 am    Post subject: Reply with quote

sup wrote:
Laughing engunneer you have many friends here


and not because I am a moderator with edit privileges, I promise! (I would be banned for it)

some 90% of my posts are trying to help people, I try to answer anything i have info about as quickly as I can. I often wish there was a reputation meter on the forum, though I will admit it is just vanity. (also vain: checking the top ten poster list to see where I stand, but that is inaccurate, since a few people never log in, like Bobo, so he may be highly ranked.)

My point was that even if you check your IP and get the country, how do you know your next request will come out the same place? I thought tor changed nearly constantly.
_________________
Unless otherwise noted, all code is untested.
Common Answers: 1.(Loops, Viruses, etc.) 2. Search 3.RTFM
Back to top
View user's profile Send private message Visit poster's website
Seabiscuit



Joined: 07 Jan 2007
Posts: 109
Location: In fund pe scaun, la o bere prin Romania :D

PostPosted: Wed Oct 10, 2007 11:04 am    Post subject: A good ideea Reply with quote

Quote:
My point was that even if you check your IP and get the country, how do you know your next request will come out the same place? I thought tor changed nearly constantly.

don;t know exactly, but i think i found in tor's manual that u can specify how often tor changes ip, 10 mins is default i think

Quote:
I often wish there was a reputation meter on the forum,
I wsh also in this forum a scale from 1 to 5 available to a user that starts a topic, so he can rate an answer, so, from here u can build a really wonderful vanity meter Laughing

Chris what do u think? Wink
_________________
Backgammon addicted!
GamesGrid was one of the first online web sites to bring Backgammon to the Internet
Back to top
View user's profile Send private message Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group