Skip to content

Commit 7efe85d

Browse files
committed
php_include - added @wchen-r7's code improvements
1 parent 71a3f59 commit 7efe85d

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

lib/msf/core/exploit/http/server.rb

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -501,11 +501,7 @@ def remove_resource(name)
501501
# Guard against removing resources added by other modules
502502
if @my_resources.include?(name)
503503
@my_resources.delete(name)
504-
begin
505-
service.remove_resource(name)
506-
rescue ::Exception => e
507-
print_error("Exception: #{e.class} #{e}")
508-
end
504+
service.remove_resource(name)
509505
end
510506
end
511507

modules/exploits/unix/webapp/php_include.rb

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,6 @@ def datastore_headers
9292
end
9393

9494
def php_exploit
95-
# Set verbosity level
96-
verbose = datastore['VERBOSE'].to_s.downcase
97-
9895
uris = []
9996

10097
tpath = normalize_uri(datastore['PATH'])
@@ -137,7 +134,7 @@ def php_exploit
137134
uris.each do |uri|
138135
break if session_created?
139136

140-
print_status("Sending: #{rhost+tpath+uri}") if verbose == "true"
137+
vprint_status("Sending: #{rhost+tpath+uri}")
141138
begin
142139
if http_method == "GET"
143140
response = send_request_raw( {

0 commit comments

Comments
 (0)