@@ -65,7 +65,7 @@ def file_exists(path, data)
65
65
} , 20
66
66
) . to_s
67
67
rescue ::Exception => e
68
- print_error ( "Error: #{ e . to_s } " )
68
+ print_error ( "#{ ip } : Error: #{ e . to_s } " )
69
69
return nil
70
70
end
71
71
@@ -86,7 +86,7 @@ def do_put(path, data)
86
86
} , 20
87
87
)
88
88
rescue ::Exception => e
89
- print_error ( "Error: #{ e . to_s } " )
89
+ print_error ( "#{ ip } : Error: #{ e . to_s } " )
90
90
return nil
91
91
end
92
92
@@ -106,7 +106,7 @@ def do_delete(path)
106
106
} , 20
107
107
)
108
108
rescue ::Exception => e
109
- print_error ( "Error: #{ e . to_s } " )
109
+ print_error ( "#{ ip } : Error: #{ e . to_s } " )
110
110
return nil
111
111
end
112
112
@@ -131,7 +131,7 @@ def run_host(ip)
131
131
# Append filename if there isn't one
132
132
if path !~ /(.+\. \w +)$/
133
133
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 } " )
135
135
end
136
136
137
137
# Upload file
@@ -152,7 +152,7 @@ def run_host(ip)
152
152
:exploited_at => Time . now . utc
153
153
)
154
154
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." )
156
156
end
157
157
158
158
when 'DELETE'
@@ -167,11 +167,11 @@ def run_host(ip)
167
167
168
168
# Delete our file
169
169
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?
171
171
172
172
# Check if DELETE was successful
173
173
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." )
175
175
else
176
176
turl = "#{ ( ssl ? 'https' : 'http' ) } ://#{ ip } :#{ rport } #{ path } "
177
177
print_good ( "File deleted: #{ turl } " )
0 commit comments