→ 🚀What's New? Join Us for the Fall Product Launch! Register Now !
‎04-01-2008 01:15 AM
#include <GUIConstants.au3>
Opt("TrayIconHide", 1)
TCPStartup()
Dim $szServerPC = $cmdline[1]
Dim $szIPADDRESS = TCPNameToIP($szServerPC)
Dim $nPORT = 5555
Dim $ConnectedSocket = -1
While $ConnectedSocket = -1
$ConnectedSocket = TCPConnect($szIPADDRESS, $nPORT)
WEnd
Dim $szData
If @error Then
MsgBox(4112, "Error", "TCPConnect failed with WSA error: " & @error)
Else
While 1
$szData = InputBox("My NetSender!", @LF & @LF & "Enter text to send to " & $cmdline[1] & "(" & $szIPADDRESS & "):")
$szData = $szData
If @error Or $szData = "" Then ExitLoop
TCPSend($ConnectedSocket, $szData)
If @error Then ExitLoop
WEnd
EndIf
#include <GUIConstants.au3>
#include <Constants.au3>
Opt("TrayIconHide", 1)
Dim $szIPADDRESS = @IPAddress1
Dim $nPORT = 5555
TCPStartUp()
$MainSocket = TCPListen($szIPADDRESS, $nPORT)
If $MainSocket = -1 Then Exit
Dim $ConnectedSocket = -1
Do
$ConnectedSocket = TCPAccept($MainSocket)
Until $ConnectedSocket <> -1
Dim $szIP_Accepted = SocketToIP($ConnectedSocket)
Dim $msg, $recv
While 1
$msg = GUIGetMsg()
$recv = TCPRecv( $ConnectedSocket, 2048 )
If @error Then ExitLoop
if $recv <> "" Then MsgBox(262208,"Message",$recv)
WEnd
If $ConnectedSocket <> -1 Then TCPCloseSocket( $ConnectedSocket )
TCPShutDown()
Func SocketToIP($SHOCKET)
Local $sockaddr = DLLStructCreate("short;ushort;uint;char[8]")
Local $aRet = DLLCall("Ws2_32.dll","int","getpeername","int",$SHOCKET, _
"ptr",DLLStructGetPtr($sockaddr),"int_ptr",DLLStructGetSize($sockaddr))
If Not @error And $aRet[0] = 0 Then
$aRet = DLLCall("Ws2_32.dll","str","inet_ntoa","int",DLLStructGetData($sockaddr,3))
If Not @error Then $aRet = $aRet[0]
Else
$aRet = 0
EndIf
$sockaddr = 0
Return $aRet
EndFunc
cmd.exe /K \\server\share$\Lansweeper\psexec.exe \\{computer} -c -s -i \\server\share$\Lansweeper\receive.exe | \\server\share$\Lansweeper\send.exe {computer}
‎10-02-2016 06:14 AM
‎10-28-2009 07:24 AM
‎10-27-2009 02:15 PM
‎10-27-2009 02:10 PM
‎10-27-2009 11:39 AM
receive.exe | send.exe hostname
‎10-27-2009 10:01 AM
‎07-08-2009 05:11 PM
‎07-08-2009 03:49 PM
‎05-19-2009 05:46 PM
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now