Jump to content

How to capture AutoIt UDP traffic with Wireshark?


Recommended Posts

What AutoIt sends depends on your script. Can you show what you have so far?

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2021-06-05 - Version 1.5.4.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2021-06-14 - Version 1.6.5.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
Task Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - Wiki, WebDriver - Wiki

 

Link to post
Share on other sites

Once again. Can you post the code of the script which uses UDP?

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2021-06-05 - Version 1.5.4.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2021-06-14 - Version 1.6.5.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
Task Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - Wiki, WebDriver - Wiki

 

Link to post
Share on other sites

#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 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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...