Skip to content

Commit f0ff4a0

Browse files
committed
Added IP addresses to output.
1 parent 55348d7 commit f0ff4a0

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

modules/auxiliary/scanner/http/http_put.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def file_exists(path, data)
6565
}, 20
6666
).to_s
6767
rescue ::Exception => e
68-
print_error("Error: #{e.to_s}")
68+
print_error("#{ip}: Error: #{e.to_s}")
6969
return nil
7070
end
7171

@@ -86,7 +86,7 @@ def do_put(path, data)
8686
}, 20
8787
)
8888
rescue ::Exception => e
89-
print_error("Error: #{e.to_s}")
89+
print_error("#{ip}: Error: #{e.to_s}")
9090
return nil
9191
end
9292

@@ -106,7 +106,7 @@ def do_delete(path)
106106
}, 20
107107
)
108108
rescue ::Exception => e
109-
print_error("Error: #{e.to_s}")
109+
print_error("#{ip}: Error: #{e.to_s}")
110110
return nil
111111
end
112112

@@ -131,7 +131,7 @@ def run_host(ip)
131131
# Append filename if there isn't one
132132
if path !~ /(.+\.\w+)$/
133133
path << "#{Rex::Text.rand_text_alpha(5)}.txt"
134-
vprint_status("No filename specified. Using: #{path}")
134+
vprint_status("#{ip}: No filename specified. Using: #{path}")
135135
end
136136

137137
# Upload file
@@ -152,7 +152,7 @@ def run_host(ip)
152152
:exploited_at => Time.now.utc
153153
)
154154
else
155-
print_error("File doesn't seem to exist. The upload probably failed.")
155+
print_error("#{ip}: File doesn't seem to exist. The upload probably failed.")
156156
end
157157

158158
when 'DELETE'
@@ -167,11 +167,11 @@ def run_host(ip)
167167

168168
# Delete our file
169169
res = do_delete(path)
170-
vprint_status("Reply: #{res.code.to_s}") if not res.nil?
170+
vprint_status("#{ip}: Reply: #{res.code.to_s}") if not res.nil?
171171

172172
# Check if DELETE was successful
173173
if res.nil? or file_exists(path, data)
174-
print_error("DELETE failed. File is still there.")
174+
print_error("#{ip}: DELETE failed. File is still there.")
175175
else
176176
turl = "#{(ssl ? 'https' : 'http')}://#{ip}:#{rport}#{path}"
177177
print_good("File deleted: #{turl}")

0 commit comments

Comments
 (0)