hi guys ,
AutoIt
Func _GetIP() Local Const $GETIP_TIMER = 300000 ; Constant for how many milliseconds between each check. This is 5 minutes. Local Static $hTimer = 0 ; Create a static variable to store the timer handle. Local Static $sLastIP = 0 ; Create a static variable to store the last IP. If TimerDiff($hTimer) < $GETIP_TIMER And Not $sLastIP Then ; If still in the timer and $sLastIP contains a value. Return SetExtended(1, $sLastIP) ; Return the last IP instead and set @extended to 1. EndIf #cs Additional list of possible IP disovery sites by z3r0c00l12. http://corz.org/ip http://icanhazip.com http://ip.appspot.com http://ip.eprci.net/text http://ip.jsontest.com/ http://services.packetizer.com/ipaddress/?f=text http://whatthehellismyip.com/?ipraw http://wtfismyip.com/text http://www.networksecuritytoolkit.org/nst/tools/ip.php http://www.telize.com/ip http://www.trackip.net/ip #ce Local $aGetIPURL[] = ["http://checkip.dyndns.org", "http://www.myexternalip.com/raw", "http://bot.whatismyipaddress.com"], _ $aReturn = 0, _ $sReturn = "" For $i = 0 To UBound($aGetIPURL) - 1 $sReturn = InetRead($aGetIPURL[$i]) If @error = 0 Then ExitLoop EndIf $sReturn = "" Next $hTimer = TimerInit() ; Create a new timer handle. $sLastIP = $sReturn ; Store this IP. If $sReturn == "" Then Return SetError(1, 0, -1) Return $sReturn EndFunc ;==>_GetIP ;############# Local $sLastIP = _GetIP() MsgBox(64, "Your IP", "Your external IP address is: " & $sLastIP)
Guys i want after run this script , show my ip by in msgbox,
and note that it's should not by any #include cus i have some functions and they will "Duplicated",
• after i use that , i see my ip address by that : 0x89123891782h18d1h281839123 ... And It's "False",
• i want use that in netsh advfirewall , have you know any way without top script ?!
all of thing i need is :
RunWait(@ComSpec & ' /c ' & 'netsh advfirewall firewall add rule name="test" dir=in action=allow remoteip= External IP Address')
External IP Address is ip address like : http://checkip.dyndns.org/
thanks guys and sry for bad english,