sykes Posted July 28, 2004 Share Posted July 28, 2004 OK Ok I know there hundreds of these things around, but I hadta go ahead and create one myself ... Feel free to critique or improve if you wantexpandcollapse popup$IP = InputBox("Starting IP", "Please enter the IP you want to start at" & @CRLF & "(Use . to seperate the Octets)") If @error = 1 Then MsgBox(0, "Error", "You Clicked Cancel ... Click OK To Exit") Exit EndIf If $IP = "" Then MsgBox(0, "Error", "An Invalid Value Was Entered" & @CRLF & "Click OK To Exit") Exit EndIf $END = InputBox("Ending IP", "Please enter the ending value of the last octet you wish to scan") If @error = 1 Then MsgBox(0, "Error", "You Clicked Cancel ... Click OK To Exit") Exit EndIf If $END > 255 Then MsgBox(0, "Error", "You Have Entered An Invalid Value" & @CRLF & "Maximum Value is 255") Exit EndIf If $END = "" Then MsgBox(0, "Error", "An Invalid Value Was Entered" & @CRLF & "Click OK To Exit") Exit EndIf If Not StringInStr($IP, ".") Then MsgBox(0, "", "You did not enter '.' Between Octets" & @CRLF & "Click OK To Exit") Exit EndIf $IP = StringSplit($IP, ".") If StringIsAlpha($IP[1]) Or StringIsAlpha($IP[2]) Or StringIsAlpha($IP[3]) Or StringIsAlpha($IP[4]) Then MsgBox(0, "", "Only Numeric Values Are Accepted" & @CRLF & "Click OK To Exit") Exit EndIf $NEXTIP = $IP[4] $IP = $IP[1] & "." & $IP[2] & "." & $IP[3] & "." $FILE = FileOpen("IPCheck.log", 2) While 1 SplashTextOn("Connectivity Test", "Currently Checking: " & $IP & $NEXTIP, 200, 50) $ERRORCODE = RunWait(@ComSpec & " /c ping -n 1 -l 5 " & $IP & $NEXTIP, "", @SW_HIDE) If $ERRORCODE = 0 Then FileWriteLine($FILE, $IP & $NEXTIP & " Is Alive") Else FileWriteLine($FILE, $IP & $NEXTIP & " Is Not Responding") EndIf $NEXTIP = $NEXTIP + 1 If $NEXTIP > $END Then SplashOff() ExitLoop EndIf Wend FileClose($FILE) RunWait(@WindowsDir & "\Notepad.exe " & @ScriptDir & "\IPCheck.log") ExitErrr.... Be sure to watch out for word wrap orDownload the source here: My Autoit Scripts We have enough youth. How about a fountain of SMART? Link to comment Share on other sites More sharing options...
ezzetabi Posted July 28, 2004 Share Posted July 28, 2004 Advice for the next time... Try to keep your lines at most 90 chars, so they'll fit well in the forum. Use _, if needed. Link to comment Share on other sites More sharing options...
pekster Posted July 28, 2004 Share Posted July 28, 2004 /me hugs nmap /me also know he can't emote on these forums [font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes. Link to comment Share on other sites More sharing options...
Coffee Posted July 28, 2004 Share Posted July 28, 2004 I sense an eve junkie Link to comment Share on other sites More sharing options...
pekster Posted July 28, 2004 Share Posted July 28, 2004 I sense an eve junkieNope. I just spend way too much time on IRC. [font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes. 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