Sign in to follow this  
Followers 0
ConsultingJoe

Simple Tracert Script

6 posts in this topic

Let me know what you guys think. I want to make it so it creates a gui and draws out the routes and hops. That would be cool.

filedelete( @tempdir & "\output.txt" )
$ip = InputBox( "TRACERT", "Enter Site or IP", "www.yahoo.com" )
$hops = InputBox( "TRACERT", "Enter Hops", 15 )
$timeout = InputBox( "TRACERT", "Enter Timeout in miliseconds", 100 )
TrayTip( "TRACERT", "Processing, Please Wait", 5, 16)
RunWait (@ComSpec & " /c " & "tracert" & " -d " & "www.yahoo.com" & " -h " & $hops & " -w " & $timeout & " >> " & @tempdir & "\output.txt", "", @SW_HIDE)
$output = FileRead( @tempdir & "\output.txt" )
filedelete( @tempdir & "\output.txt" )
$output = StringStripCR ( $output )
msgbox(0,"Tracert Complete",$output)

Is there something else I could add? let me know


[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

Share this post


Link to post
Share on other sites



I saw the amazing neotrace, wouldn't it be great if this was like that


[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

Share this post


Link to post
Share on other sites

Let me know what you guys think. I want to make it so it creates a gui and draws out the routes and hops. That would be cool.

filedelete( @tempdir & "\output.txt" )
$ip = InputBox( "TRACERT", "Enter Site or IP", "www.yahoo.com" )
$hops = InputBox( "TRACERT", "Enter Hops", 15 )
$timeout = InputBox( "TRACERT", "Enter Timeout in miliseconds", 100 )
TrayTip( "TRACERT", "Processing, Please Wait", 5, 16)
RunWait (@ComSpec & " /c " & "tracert" & " -d " & "www.yahoo.com" & " -h " & $hops & " -w " & $timeout & " >> " & @tempdir & "\output.txt", "", @SW_HIDE)
$output = FileRead( @tempdir & "\output.txt" )
filedelete( @tempdir & "\output.txt" )
$output = StringStripCR ( $output )
msgbox(0,"Tracert Complete",$output)

Is there something else I could add? let me know

This will send the output directly to an edit control, and includes a function to abort the trace by pressing escape. This is from an earlier program I released in this forum, Client Network Utility.

Note $timeOut setting and $ClientWeb destination variables.

Opt("GUICloseOnESC", 0)
HotKeySet("{Esc}", "abortTrace")

GUICtrlSetData($Edit1, "Tracing Route To: " & $ClientWeb & " - press Escape to quit" & @crlf, 1)
Sleep(1000)
$trinfo = Run(@ComSpec & " /c tracert -h 30 -w " & $timeOut & " " & $ClientWeb, @SystemDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)    
While 1
            
$line = StdoutRead($trinfo, -1)
If @error = -1  Then 
ExitLoop
Else
GUICtrlSetData($Edit1, $line, 1)
EndIf
Wend

Func abortTrace()
    GUICtrlSetData($Edit1, @crlf & @crlf & "Command Aborted" & @crlf, 1)
    $line = ""
    $trinfo = ""
    SetError(-1)
    HotKeySet("{Esc}")
                    
EndFunc

Share this post


Link to post
Share on other sites

I get an error on the edit


[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

Share this post


Link to post
Share on other sites

I get an error on the edit

You need to build the gui and add the edit control. Also make this a function and call it somehow.

You can download the full program script here: http://www.autoitscript.com/forum/index.ph...topic=21857&hl=

Note: the exit function was added after the release of this script.

Share this post


Link to post
Share on other sites

Oh ok, I remeber this, nice job. I thought it would be cool to have it find every pc within a small LAN or WAN. I found neotrace and Gave up


[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0