Gallopsled / pwntools

CTF framework and exploit development library
http://pwntools.com
Other
11.74k stars 1.67k forks source link

Add tube helper to upload files #2367

Open peace-maker opened 4 months ago

peace-maker commented 4 months ago

Challenges often only give you a shell on a socket so I regularly reimplement uploading of files using some appending of base64 chunks to a temporary file and decoding afterwards.

This logic can be included in something like tube.upload_file_chunked with options to control the target path, chunk size and upload strategy. Depending on which tools are installed on the remote you should be able to choose how the data is encoded and decoded.

This should be clearly distinguished from any upload abilities the ssh module offers.