View Full Version : can sum1 make me an ip reset script plz???


Ho3rnch3n
12-08-2005, 07:42 PM
hey , as i dunno exactly how to write scripts i try to ask if sum1 of ya can write me an ip reset script for an Netgear Router DG834GB , i owuld be very very apreciated if sum1 could do this for me :)
Thx in advance

Ho3rnch3n

Snipz
12-08-2005, 09:24 PM
Run("cmd.exe")
Sleep(800)
Send("ipconfig /release{ENTER}")
Sleep(1200)
Send("ipconfig /renew{ENTER}")
Sleep(3600)
Send("exit{ENTER}")

there you go hope that helps

Zero3
12-09-2005, 08:09 AM
Run("cmd.exe")
Sleep(800)
Send("ipconfig /release{ENTER}")
Sleep(1200)
Send("ipconfig /renew{ENTER}")
Sleep(3600)
Send("exit{ENTER}")

there you go hope that helps

he is behind a router.....
ipconfig /release should not work

you are adsl or cable connection?
try unplug the modem for 15minute and reconnect
you should get a new ip in this way

Ho3rnch3n
12-09-2005, 02:14 PM
thx for this script but i dont think it works with my router
i got adsl

Ho3rnch3n

Snipz
12-09-2005, 04:40 PM
Aight ill see if I can find another.

Heres one more advanced

HotKeySet("{end}", "ExitBot")
Func ExitBot()
For $i = 1 to 3
KillProcesses()
Next
Exit
EndFunc

LogIp("==========================")
$StartIp = GetIp()
LogIp("Actual IP = " & $StartIp)
run("C:\program files\internet explorer\IEXPLORE.EXE http://192.168.1.1/adslok.cgi?enblInternet=1", "C:\program files\internet explorer")
WinWait("Connect to 192.168.1.1", "", 10)
ControlClick ("Connect to 192.168.1.1", "", 1)
Sleep (90000)
KillProcesses()
Exit



Func GetIp()
Do
SplashTextOn ( "", "... WAITING FOR NEW IP ...", 300, 20, 60, 20, 1, "" , "" , "" )
$GotIp = URLDownloadToFile("http://checkip.dyndns.org/", "temp")
until $GotIp = 1
$IpFile = FileOpen ("temp",0)
$Ip = FileReadLine ($IpFile, 1)
$Ip = StringReplace ($Ip, "<html><head><title>Current IP Check</title></head><body>Current IP Address: ", "")
$Ip = StringReplace ($Ip, "</body></html>", "")
SplashTextOn ( "", "CURRENT IP : " & $Ip & " ", 300, 20, 60, 20, 1, "" , "" , "" )
FileClose ($IpFile)
FileDelete ("temp")
Return $Ip
EndFunc

Func KillProcesses()
For $i = 1 to 3
ProcessClose("iexplore.exe")
Next
EndFunc

Func LogIp($String)
$LogFile = FileOpen (@SCRIPTDIR & "\LogIp.txt", 1)
FileWriteLine ($LogFile, @MON & "/" & @MDAY & " " & @HOUR & ":" & @MIN & ":" & @SEC & "> " & $String)
FileClose ($LogFile)
EndFunc

Cheeba
12-10-2005, 04:57 PM
You might just have a static IP like me, I've had the same IP for 2+ years

codfish124
12-11-2005, 06:44 PM
ya nothing workes 4 me iv event try to go to comcast and ask them to swich my ip that didnt help just made me buy a 2nd ip that i dont know how to use