Sign in to follow this  
Followers 0
dudenyc

Help with "TCPSend ..."

3 posts in this topic

#1 ·  Posted (edited)

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

Share this post


Link to post
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!

Share this post


Link to post
Share on other sites

Nice monoceres, trick of the trade :P . Thank you for your help :).

Share this post


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
Sign in to follow this  
Followers 0