spyrorocks Posted August 22, 2006 Share Posted August 22, 2006 Hello all. I need some help. is there some way to make your own ping() function in autoit that doesent require any extra files, like ping.exe? Thanks in advance! [center] My Projects: Online AutoIt Compiler - AutoForum - AutoGuestbook - AutoIt Web-based Auto Installer - Pure AutoIt Zipping Functions - ConfuseGen - MindReader - P2PChat[/center] Link to comment Share on other sites More sharing options...
Danny35d Posted August 22, 2006 Share Posted August 22, 2006 Did you try Ping() from the help file? This is a function already build on AutoIT.Ping ( address or hostname [, timeout] ) AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line Link to comment Share on other sites More sharing options...
spyrorocks Posted August 23, 2006 Author Share Posted August 23, 2006 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? [center] My Projects: Online AutoIt Compiler - AutoForum - AutoGuestbook - AutoIt Web-based Auto Installer - Pure AutoIt Zipping Functions - ConfuseGen - MindReader - P2PChat[/center] Link to comment Share on other sites More sharing options...
rbhkamal Posted August 23, 2006 Share Posted August 23, 2006 (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 August 23, 2006 by rbhkamal "When the power of love overcomes the love of power, the world will know peace"-Jimi Hendrix Link to comment Share on other sites More sharing options...
THESCRIPTERIST Posted August 23, 2006 Share Posted August 23, 2006 use command prompt [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 Link to comment Share on other sites More sharing options...
rbhkamal Posted August 23, 2006 Share Posted August 23, 2006 use command prompt Doesn't that mean to use "ping.exe" "When the power of love overcomes the love of power, the world will know peace"-Jimi Hendrix Link to comment Share on other sites More sharing options...
xcal Posted August 23, 2006 Share Posted August 23, 2006 (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 August 23, 2006 by xcal How To Ask Questions The Smart Way Link to comment Share on other sites More sharing options...
dabus Posted August 23, 2006 Share Posted August 23, 2006 (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. Edited August 23, 2006 by dabus Link to comment Share on other sites More sharing options...
spyrorocks Posted August 25, 2006 Author Share Posted August 25, 2006 I need to be able to send my own packet of data to the remote machine. [center] My Projects: Online AutoIt Compiler - AutoForum - AutoGuestbook - AutoIt Web-based Auto Installer - Pure AutoIt Zipping Functions - ConfuseGen - MindReader - P2PChat[/center] Link to comment Share on other sites More sharing options...
evilertoaster Posted August 25, 2006 Share Posted August 25, 2006 TCPSend() or so. If you want somthing that can just blurt out random packets without a reciever, well...that's different. Link to comment Share on other sites More sharing options...
spyrorocks Posted August 25, 2006 Author Share Posted August 25, 2006 ok you know how the ping command sends packets? I need to ping a computer on the internet exept put my own custom data in the ping packet. [center] My Projects: Online AutoIt Compiler - AutoForum - AutoGuestbook - AutoIt Web-based Auto Installer - Pure AutoIt Zipping Functions - ConfuseGen - MindReader - P2PChat[/center] Link to comment Share on other sites More sharing options...
evilertoaster Posted August 25, 2006 Share Posted August 25, 2006 (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.htmSo really you could go TCPSend ("TheDataShownOnThatLink") and it would be a 'ping' packet Edited August 25, 2006 by evilertoaster 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