Sign in to follow this  
Daedalus711

File transfers

Recommended Posts

Jus started trying to make a file transfer server/client. I'm jus wondering if there are any special considerations I'd have to take into account, or is it jus like transfering data normaly? So far, I'm trying to send the file info first (name, size, which works fine), then the data (which is read fine by the client, but the server receives it very corrupted). So, yeah, any info would be greatly appreciated.

Share this post


Link to post
Share on other sites
File data is just like other data.

If writing a transfer service that will be open on the general internet, you have to be very careful to not let anyone specify arbitrary names, as special names have special meanings on various OS-es (/dev/kmem, or com:, or c:\windows\system32\..., or ../../bin/ls, or ...)

Also, whenever you're writing services to run on the general internet, you have to be careful to handle all kinds of bad data without leading to buffer overruns or taking unexpected paths through the source. Else it will be exploited, and your machine will be 'r0xx0red' (aka 'pwnd').

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