TeraBit Posted December 9, 2011 Share Posted December 9, 2011 How to capture AutoIt UDP/TCP traffic with Wireshark? Autoit is using http over udp or binary data send over udp? how to make communication using udp and http standarts? Should I use tcp? Link to comment Share on other sites More sharing options...
water Posted December 9, 2011 Share Posted December 9, 2011 What AutoIt sends depends on your script. Can you show what you have so far? My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
TeraBit Posted December 9, 2011 Author Share Posted December 9, 2011 I used RawCap to capture loopback interface. I have found out that AutoIt UPD uses binary to deliver data. Is this right? Also for some strange reason while opened dump file in Wireshark - it pointed out that there are errors in UDP geader checksum. WHY?PrintScreen : Link to comment Share on other sites More sharing options...
water Posted December 10, 2011 Share Posted December 10, 2011 Once again. Can you post the code of the script which uses UDP? My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
TeraBit Posted December 10, 2011 Author Share Posted December 10, 2011 expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <ButtonConstants.au3> HotKeySet("{esc}", "Cleanup") HotKeySet("{enter}", "sendData") Global $ConnectedSocket = -1 Global $MainSocket Local $g_IP, $RogueSocket, $GOOEY, $edit, $input, $butt, $msg Local $ret, $recv $g_IP = "127.0.0.1" $_INCOMING_FLAG = "UDP DATA: " OnAutoItExitRegister ("Cleanup") ; 1. UDP Listener ### Start The UDP Services ### ;============================================== UDPStartup() OnAutoItExitRegister ("Cleanup") ; 1. UDP Listener ### Create a Listening "SOCKET" ;============================================== $socket = UDPBind($g_IP, 65432) If @error <> 0 Then Exit ; 3. GUI ### Create a GUI for chatting ;============================================== $GOOEY = GUICreate("P2P Chat", 300, 200) $edit = GUICtrlCreateEdit("", 10, 40, 280, 150, $WS_DISABLED) $input = GUICtrlCreateInput("", 10, 10, 200, 20) $butt = GUICtrlCreateButton("Send", 210, 10, 80, 20, $BS_DEFPUSHBUTTON) GUISetState() ; GUI Message Loop ;============================================== While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop If $msg = $butt Then sendData() $data = UDPRecv($socket, 200) If $data <> "" Then GUICtrlSetData($edit, GUICtrlRead($edit) & $_INCOMING_FLAG &$data & @CRLF) EndIf ;~ Sleep(50) WEnd GUIDelete($GOOEY) Func sendData() If $socket <> 0 Then $status = UDPSend($socket, GUICtrlRead($input)) If $status = 0 Then MsgBox(0, "ERROR", "Error while sending UDP message: " & @error) Exit EndIf ElseIf $ret > 0 Then ; UPDATE EDIT CONTROL WITH DATA WE SENT ;---------------------------------------------------------------- GUICtrlSetData($edit, GUICtrlRead($edit) & GUICtrlRead($input) & @CRLF) GUICtrlSetData($input, "") EndIf EndFunc ;==>sendData Func Lookup() ; If no connection look for one Return 0 EndFunc ;==>Lookup Func Cleanup() UDPCloseSocket($socket) UDPShutdown() EndFunc ;==>Cleanup Link to comment Share on other sites More sharing options...
jvanegmond Posted December 10, 2011 Share Posted December 10, 2011 Your RawCap is broken or something. AutoIt does not even control the checksum part of the UDP message, Windows does that. This checksum would never be 0x0000.So what's your real question? HTTP over UDP? Writing HTTP packets is easy, trivial. Here's some sample code, but it's on the wrong end of the spectrum. github.com/jvanegmond 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