Base64 encoding is the simplest way to upload small binary or text files.
cat file | base64
printf 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' | base64 -d > file
Just prepare the last command on you xterm, it can be many lines long, then copy/paste/exec on you target.