Code

Download

Python2

python2.7 -c 'import urllib;urllib.urlretrieve ("<URL_FILE>", "<NEW_NAME>")'

Python3

python3 -c 'import urllib.request;urllib.request.urlretrieve("<URL_FILE>", "<NEW_NAME>")'

PHP

php -r '$file = file_get_contents("<URL_FILE>"); file_put_contents("<NEW_NAME>",$file);'

Ruby

ruby -e 'require "net/http"; File.write("<NEW_NAME>", Net::HTTP.get(URI.parse("<URL_FILE>")))'

Perl

perl -e 'use LWP::Simple; getstore("<URL_FILE>", "<NEW_NAME>");'

JavaScript

download.js
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));

VBScript

Upload

Python3

Set Server Python3 with Upload Option (and self-signed certificate).

Etc.

It is possible with all the other languages in the download section but also others.

Last updated

Was this helpful?