Sign in to follow this  
Followers 0
rambo3889

Tcpsend binary

8 posts in this topic

#1 ·  Posted (edited)

Hey

Here is the story of what im trying to accomplish:

On my dad's work he is the person which stand for the computers al though he dont know a lot about computers

And his boss have told him to get a way to be able to run programs on the computers at work (Those computers is running a server) and be able to get files from the computers and send from his computer to the remote computer

And he have searched the net in something like 4 hours for a remote control program and after those hours he asked me if i could make such a program to him (Client wish i used to control the computers , and server which is on the remote computers ) and i said that i would try.

So i made a server and client wish can run the programs fine but now i need to be able to have the client to send a file to the server and save it automaticly and i also need to be able to have the server send files to the client i hope this can be done in a binary

So i ask : Could anyone modyfie my code and put in someway to receive and send binary files or at least just lead my in the right way?

I have tryed to modyfie my code so i could use the binary func which i have found in this thread

Binary function

Btw I know modyfie is spelled wrong dont know how to spell it

Client:

#include <GUIconstants.au3>

Opt("WinTitleMatchMode", 2)
$portAddress = 666
$ipAddress=InputBox("Ip","Enter the ip to connect to",@IPAddress1)
TCPStartup()
$connectedSocket = TCPConnect($ipAddress, $portAddress)
If @error Or $connectedSocket < 1 Then
    MsgBox(0, "", "Error the ip have none server running on port 666")
    Exit
EndIf
#region TheGuis
$maingui = GUICreate("Remote controller", 200, 200, -1, -1, -1)
$runinput=GUICtrlCreateInput("",0,0,150,20)
$runbut=GUICtrlCreateButton("Run",150,0,50,20)
$getinput=GUICtrlCreateInput("",0,20,150,20)
$getbutton=GUICtrlCreateButton("Get",150,20,50,20)
$sendinput=GUICtrlCreateInput("",0,40,150,20)
$sendinput=GUICtrlCreateButton("send",150,40,50,20)
GUISetState()
    While 1
    $msg = GUIGetMsg()
    Switch $msg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $runbut
            $data="run"&GUICtrlRead($runinput)
            TCPSend($connectedSocket,$data)
        Case $getbutton
            $data="get"&GUICtrlRead($getinput)
            TCPSend($connectedSocket,$data)
        Case $sendinput
        $data="send"&GUICtrlRead($sendinput)
        TCPSend($connectedSocket,$data) 
    EndSwitch
WEnd
TCPShutdown()

oÝ÷ Ù'«½êÚºÚ"µÍªØÜÂHÙÚÚØ[[[È[ÚÝ[HXHÈÙ[HXÙZ]H[H[ÈÚÚHÛ[Ý[ÝÈÈÂÐÑBÔÝ

BÌÍÚYÜÈHTYÜÌBÌÍÜÜYÜÈH
ÌÍØXØØ[Ý[HÔÝ[   ÌÍÚYÜË ÌÍÜÜYÜÊBÚ[HBQÂBIÌÍØÛÛXÝY[ÛØÚÙ]HÔXØÙ
    ÌÍØXØØ[Ý[BU[[ ÌÍØÛÛXÝY[ÛØÚÙ]    ÝÈBIÌÍÙHQÂBIÌÍÛÙÈHÔXÝ  ÌÍØÛÛXÝY[ÛØÚÙ]
LLBBIÌÍÙHÜBZY   ÌÍÛÙÈ  ÉÝÈ  ][ÝÉ][ÝÈ[BZYÝ[Ò[Ý    ÌÍÛÙË  ][ÝÜ[][ÝÊH[B[Ý[ÔYÚ
    ÌÍÛÙËÝ[Ó[    ÌÍÛÙÊKLÊJBH[YBZYÝ[Ò[Ý  ÌÍÛÙË  ][ÝÙÙ]   ][ÝÊH[H   ÌÍÙ[OTÝ[ÔYÚ
    ÌÍÛÙËÝ[Ó[    ÌÍÛÙÊKLÊNÓÝÈHØ[È[HÙ[YÈHÛY[[HÚXÚÈÛÛY][ÈHØ[ÈBNØ[Ø[[Ý[BBBBQ[YBBBBBQ[YU[[  ÌÍÙUÔÛÜÙTÛØÚÙ]
    ÌÍØÛÛXÝY[ÛØÚÙ]
BÑ[

[Edit]

I added a Then in the server in line 23

Edited by rambo3889

My Scripts:Radioblog Club Music DownloaderOther stuff:Fun movieIm serious read the help file it helps :PFight 'Till you drop. Never stop, You Cant give up. Til you reach the top Fight! you’re the best in town Fight!

Share this post


Link to post
Share on other sites



I have made a Remote Server with User-Defined and then AutoIt functions. Check my signature for the two posts. I have done little research into file sending and I know the technology is there. I may have limited knowledge on this, but I know all methods I have seen have been crude and slow. However, I may be wrong.

If you can make a way to send files, or find a method that works I will finish the search and update my Remote Server BETA for you. If you need.

Otherwise your a boat without a paddle.

AutoIt Smith

Share this post


Link to post
Share on other sites

I have made a Remote Server with User-Defined and then AutoIt functions. Check my signature for the two posts. I have done little research into file sending and I know the technology is there. I may have limited knowledge on this, but I know all methods I have seen have been crude and slow. However, I may be wrong.

If you can make a way to send files, or find a method that works I will finish the search and update my Remote Server BETA for you. If you need.

Otherwise your a boat without a paddle.

AutoIt Smith

When TCP was pretty new and fresh in AutoIt I did some testing with file-sending, and I

know Larry have posted about this many times. It worked very well and I don't remember

it being slow at all. I might post some code for this later when I have more time.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

And he have searched the net in something like 4 hours for a remote control program and after those hours he asked me if i could make such a program to him (Client wish i used to control the computers , and server which is on the remote computers ) and i said that i would try.

Two things.

1.) What's wrong with Windows Remote Desktop? You can run programs on the remote computer and you can transfer files (map local drives to remote computer).

2.) It took me 30 seconds to find loads of remote control software which are also able to transfer files. Google ist your friend.

Cheers

Kurt

Edited by /dev/null

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Share this post


Link to post
Share on other sites

When TCP was pretty new and fresh in AutoIt I did some testing with file-sending, and I

know Larry have posted about this many times. It worked very well and I don't remember

it being slow at all. I might post some code for this later when I have more time.

When TCP was new, most forms I found were extremely slow and crude. I remember running one made by Larry or another developer and it worked okay, with a few bugs. However after my computer crashed(needed to reload it) a while back I have been unable to locate the thread, and files were not backed up.

I would appreciate if you could (possibly) post ALL links you might have on this topic.

Thank you,

AutoIt Smith

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

When TCP was new, most forms I found were extremely slow and crude. I remember running

one made by Larry or another developer and it worked okay, with a few bugs. However after

my computer crashed(needed to reload it) a while back I have been unable to locate the thread,

and files were not backed up.

I would appreciate if you could (possibly) post ALL links you might have on this topic.

Thank you,

AutoIt Smith

Yes, I remember Larry made a couple of tests, and I also remember one of these became slower

and slower as he used StringLen on all of the received data all the time, to determine when the

transfer was finished. What I had used in my scripts was to only use StringLen on the last received

data, and adding this value to a variable, making it much faster.

Any links I can find you can find, and if you only find one then that should be enough, as long as

you get the concept of it :whistle:

Edit : let us not try to take over rambo's topic :)

Edited by Helge

Share this post


Link to post
Share on other sites

I did not mean to take it over, but if we find the method I will develop it into a function if he needs so all he has to do is SendFile($FilePath).

So a link would be appreciated as I am leaving in 4 hours and would like to help him.

Share this post


Link to post
Share on other sites

@/dev/null

i asked him about the option 2 you told me and he says that his boss say is not allowed to use shareware (The company dont want to pay)

He is not allowed to use The windows remote control (I dont know why) And second the boss says that there is spyware included in most freewares


My Scripts:Radioblog Club Music DownloaderOther stuff:Fun movieIm serious read the help file it helps :PFight 'Till you drop. Never stop, You Cant give up. Til you reach the top Fight! you’re the best in town Fight!

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