Jump to content

Quick script to upload files to a server


Recommended Posts

This script is more of a example for the _netcode UDF. But i thought it might be usefull to someone.

With the client you can simply choose if you want to upload the contents of a directory or just a single file to the server. So the script just allows one way file transmissions.

In the header of the server.au3 you can define a few options. (If the traffic should be encrypted / If you want to deny the overwriting of files / how many clients simulatinously can be connected / where the files are stored to and some more).

If a upload failes then the client will tell you which file couldnt be uploaded and why.

The speed is up to the power of your pc and up to your line speed. 60 MB/s (40 MB/s with encryption) can be expected on a modern setup.

The script is available here

https://github.com/OfficialLambdax/_netcode_Core-UDF/tree/main/examples/extended examples/Transfer Files/netcode managemode

And you are going to need _netcode_Core.au3

https://github.com/OfficialLambdax/_netcode_Core-UDF

If the script doesnt work, then check the #include of the server.au3 and client.au3 for the _netcode_Core.au3 path. You might need to change this path.

Link to post
Share on other sites
  • 3 weeks later...

Updated the script to now use the, recently in v0.1.5.23 introduced, preshared RSA key handshake method to agree on a AES session key more safely.

The RSA keys are not set at default, but the script "#set preshared rsa keys.au3" script, in the same folder, can do that for you. It will create a fresh rsa key pair and writes them into the server.au3 and client.au3 scripts.

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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...