Jump to content

Help with "TCPSend ..."


Recommended Posts

Hello,

The TCP protocol has been killing me for that past couple of days. I tried to figure out how to send a keystroke from a client to a server using TCP. For example, I want to send the keystroke "{ENTER}" to the server with this syntax:"

TCPSend($ConnectedSocket, "{ENTER}")oÝ÷ Ø¥²kçmè^Æö¥¹êÔÄFG²jÊ®¢Ýªê-jëh×6TCPSend($ConnectedSocket, "0D")

What I get on the sever is the text {ENTER} or 0D instead of the keystroke of ENTER key.

Please suggest me how to solve this problem :). Any input is highly appreciated :P.

Edited by dudenyc
Link to comment
Share on other sites

Hi!

Study this two codes:

; Server
TCPStartup()
$listen=TcpListen(@IPAddress1,1337)
Do
    sleep(250)
    $connectedsocket=TCPAccept($listen)
Until $connectedsocket<>-1
Do
    Sleep(100)
    $data=TCPRecv($connectedsocket,1024)
    If $data<>"" Then Send($data)
Until False

; Client
TCPStartup()
$connectedsocket=TCPConnect(@IPAddress1,1337)
sleep(2000)
TcpSend($connectedsocket,"{ENTER}")

:)

Broken link? PM me and I'll send you the file!

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...