|
You last visited: Today at 02:14
Advertisement
[Autoit Request]MSN Monitor
Discussion on [Autoit Request]MSN Monitor within the General Coding forum part of the Coders Den category.
12/04/2008, 16:16
|
#1
|
elite*gold: 0
Join Date: Oct 2007
Posts: 9
Received Thanks: 0
|
[Autoit Request]MSN Monitor
Hey, i want to make a basic analyzer for MSN messenger,
Code:
$ip = "192.168.1.2"
TCPStartup()
$packet = TCPConnect($ip, 2374)
While 1
TCPAccept($packet)
$rec = TCPRecv($packet,1000000)
if $rec <> "" Then
FileWriteLine("Packet.txt",$rec)
EndIf
WEnd
Func onAutoitExit()
TCPShutdown()
EndFunc
But this doesn't work, need advice !
|
|
|
12/04/2008, 22:05
|
#2
|
elite*gold: 2
Join Date: Oct 2006
Posts: 218
Received Thanks: 138
|
Using TCPConnect as a TCPAccept parameter don't work.
You should read the manual, it shows how to build a new connection
|
|
|
12/05/2008, 08:31
|
#3
|
elite*gold: 0
Join Date: Oct 2007
Posts: 9
Received Thanks: 0
|
Quote:
Originally Posted by |Mirage|
Using TCPConnect as a TCPAccept parameter don't work.
You should read the manual, it shows how to build a new connection
|
Should i make it TCPListen ?
|
|
|
12/05/2008, 11:21
|
#4
|
elite*gold: 2
Join Date: Oct 2006
Posts: 218
Received Thanks: 138
|
Yes, but i can't really help you with a full script, the functions don't work with my machine
|
|
|
12/05/2008, 12:18
|
#5
|
elite*gold: 0
Join Date: Aug 2005
Posts: 1,245
Received Thanks: 60
|
Quote:
;SERVER!! Start Me First !!!!!!!!!!!!!!!
$g_IP = "127.0.0.1"
; Start The TCP Services
;==============================================
TCPStartUp()
; Create a Listening "SOCKET"
;==============================================
$MainSocket = TCPListen($g_IP, 65432, 100 )
If $MainSocket = -1 Then Exit
; look for client connection
;--------------------
While 1
$ConnectedSocket = TCPAccept( $MainSocket)
If $ConnectedSocket >= 0 Then
msgbox(0,"","my server - Client Connected")
exit
EndIf
Wend
|
Ich kann das grad nicht testen,
aber da das von offizieller Seite stammt
geh ich schwer davon aus das das funktioniert.
Quote:
$rec = TCPRecv($packet,1000000)
|
Ob das so richtig is...
Btw, vlt musst du den socket auch forken...
|
|
|
12/05/2008, 12:32
|
#6
|
elite*gold: 0
Join Date: Oct 2007
Posts: 9
Received Thanks: 0
|
Quote:
Originally Posted by verT!c4L
Ich kann das grad nicht testen,
aber da das von offizieller Seite stammt
geh ich schwer davon aus das das funktioniert.
Ob das so richtig is...
Btw, vlt musst du den socket auch forken...
|
Hat nicht funktioniert!
Didn't work !
|
|
|
12/05/2008, 12:55
|
#7
|
elite*gold: 0
Join Date: Aug 2005
Posts: 1,245
Received Thanks: 60
|
Quote:
Originally Posted by verT!c4L
Btw, vlt musst du den socket auch forken...
|
Ich befinde mich grad in einer meiner Grauzonen,
aber wenn ich mich recht entsinne, muss man
Sockets forken um mehrere Clients daran zu hängen.
Da MSN ja Client No.1 ist, müsste dein Script "Client No.2"
darstellen...
Edit:
Ein angeblich funktionierender TCP Client in Autoit:
(google suche: autoit socket forken)
Quote:
PHP Code:
;------------------------------- ; AutoIt TCP Client made by b2k5 ;------------------------------- #include <GUIConstants.au3> $Form1 = GUICreate("TCPClient", 640, 480) $Edit1 = GUICtrlCreateEdit("", 0, 0, 640, 460, $ES_READONLY + $WS_VSCROLL + $ES_AUTOVSCROLL + $WS_HSCROLL + $ES_AUTOHSCROLL) $Input1 = GUICtrlCreateInput("", 0, 460, 600, 20) $Button1 = GUICtrlCreateButton("Send", 600, 460, 40, 20) $connected = 0 Global $socket Global $sendtxt HotKeySet("{ENTER}", "SendThatShit") GUISetState(@SW_SHOW) GUICtrlSetState($Input1, $GUI_FOCUS) TCPStartup() While 1 $msg = GUIGetMsg() $recv = TCPRecv($socket, 1024) Select Case $msg = $GUI_EVENT_CLOSE If $connected = 1 Then TCPSend($socket, "QUIT :TCPClient exited." & @CRLF) TCPCloseSocket($socket) TCPShutdown() EndIf ExitLoop Case $msg = $Button1 SendThatShit() Case Else If $recv <> "" Then GUICtrlSetData($Edit1, GUICtrlRead($Edit1) & $recv & @CRLF) If StringInStr($recv, "PING") Then $Pingval = StringSplit($recv, " ") $Pong = "PONG :" & $Pingval[2] TCPSend($socket, $Pong & @CRLF) GUICtrlSetData($Edit1, GUICtrlRead($Edit1) & $Pong & @CRLF) ToolTip("Ping? Pong!") Sleep(2000) ToolTip("") EndIf EndIf EndSelect WEnd Exit Func SendThatShit() If WinActive("TCPClient") Then $sendtxt = GUICtrlRead($Input1) GUICtrlSetData($Input1, "") If $sendtxt <> "" Then If $connected = 1 Then If StringInStr($sendtxt, "QUIT") Then TCPSend($socket, $sendtxt & @CRLF) $connected = 0 Else TCPSend($socket, $sendtxt & @CRLF) EndIf Else If StringInStr($sendtxt, "/connect") Then $server = StringSplit($sendtxt, " ") $serversplit = StringSplit($server[2], ":") $ip = TCPNameToIP($serversplit[1]) $port = $serversplit[2] $socket = TCPConnect($ip, $port) If $socket = -1 Then MsgBox(64, "TCPClient", "Connection Failure.") $connected = 0 Else MsgBox(64, "TCPClient", "Connected successfully.") $connected = 1 SendAtConnect() EndIf Else MsgBox(64, "TCPClient", "Not connected.") EndIf EndIf EndIf Else Send("{ENTER}") EndIf EndFunc ;==>SendThatShit Func SendAtConnect() TCPSend($socket, "NICK TCPClient" & @CRLF) TCPSend($socket, 'USER TCPClient "TCPClient" "TCPClient" :TCPClient' & @CRLF) EndFunc ;==>SendAtConnect
|
Man beachte vorallem / keep attention at the parameter:
Quote:
PHP Code:
$recv = TCPRecv($socket, 1024)
|
Vorallem da 1024 bekanntermaßen Standard ist...
Nicht wie bei dir/ wrong parameter:
Quote:
PHP Code:
$rec = TCPRecv($packet,1000000)
|
|
|
|
Similar Threads
|
[Request] Monitor for multiple Clients
05/31/2009 - SRO Private Server - 2 Replies
Hey,
I would like to have a (Bot-)Monitor where I can control multiple Clients.
For example it should have hide/show function.
Does something like this exist for ECSRO or could someone make it?
Would be great ;D
|
Monitor ausschalt befehl in monitor
03/18/2009 - General Coding - 11 Replies
wie scho oben steht gibts so nen auto it befehl?
|
autoit request
03/05/2008 - Cabal Online - 2 Replies
I'm trying to make an autoit script to click a color every 10 sec i understand how to pixel search but i dont know how to make the code for the rest could anyone help me?
p.s. I found out how to pixel search from bob16 tut , I tryed to edit his script but i really dont know enough about this to do it
|
All times are GMT +2. The time now is 02:14.
|
|