Sign in to follow this  
Followers 0
spyrorocks

Pinger

12 posts in this topic




#4 ·  Posted (edited)

I know there is a ping function its just that i need to be able to send my own ping packet. how would you send your own coustom ping pacet though autoit?

I don't think any tcp/ip function in autoIt will help.

but before you do that, do you know how ping packets look like?(requests/echos)

Edited by rbhkamal

"When the power of love overcomes the love of power, the world will know peace"-Jimi Hendrix

Share this post


Link to post
Share on other sites

use command prompt :P


[color=#FF0000][b] COMPUTERS ARE MADE OF NUMBERS SUCH AS 1010101110010101010101 AND SCRIPTING IS THE KEY TO THE DOOR door=101010101010101 and so on and the the key=scripting

Share this post


Link to post
Share on other sites

use command prompt :P

Doesn't that mean to use "ping.exe" :nuke:

"When the power of love overcomes the love of power, the world will know peace"-Jimi Hendrix

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

Use the address as a parameter to the script?

;run as: scriptname address
;example for script named my_ping:
;my_ping www.AutoItScript.com

If $CmdLine[0] <> 1 Then
    MsgBox(0, "", "No parameter found!")
    Exit
EndIf
$speed = Ping($CmdLine[1], 1000)
MsgBox(0, "", $speed)
Edited by xcal

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

Try something like this:

#include <Constants.au3>
Dim $log, $output
$log=Run ( @ComSpec & ' /c ping 127.0.0.1', '', @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD )
While 1
    $line = StdoutRead($log)
    If @error Then ExitLoop
    $output = $output & @CR & $line
Wend
While 1
    $line = StderrRead($log)
    If @error Then ExitLoop
    $output = $output & @CR & $line
Wend
MsgBox (0, 'Ping', $output)

You can replace "ping 127.0.0.1" with your own program and/or ip. You will have to do some String-commands to get what you want. :P

Edited by dabus

Share this post


Link to post
Share on other sites

TCPSend() or so.

If you want somthing that can just blurt out random packets without a reciever, well...that's different.

Share this post


Link to post
Share on other sites

#12 ·  Posted (edited)

the 'ping' packet is a special case packet for intergated into TCP/TP. There is only one type of 'ping' packet...if you alter it, it is no logner a 'ping' packet...its is just data..the kind you would send with TCPSend()

You could send the data that is in the Ping packet with TCPSend() and it woudl be the same as ping...

read this- http://pcausa.com/resources/ndispacket_decode.htm

So really you could go TCPSend ("TheDataShownOnThatLink") and it would be a 'ping' packet

Edited by evilertoaster

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