Skip to content

Commit 871f1b7

Browse files
committed
updated prints with ip-port reference. msftidy check. module load check. go rf reader..
1 parent 736bf12 commit 871f1b7

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

modules/auxiliary/scanner/http/rfcode_reader_enum.rb

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,13 @@ def initialize(info={})
4747

4848
def run_host(ip)
4949
unless is_app_rfreader?
50-
print_error("Application does not appear to be RFCode Reader. Module will not continue.")
50+
print_error("#{rhost}:#{rport} -> Application does not appear to be RFCode Reader. Module will not continue.")
5151
return
5252
end
5353

54-
print_status("Checking if authentication is required...")
54+
print_status("#{rhost}:#{rport} -> Checking if authentication is required...")
5555
unless is_auth_required?
56-
print_warning("Application does not require authentication.")
56+
print_warning("#{rhost}:#{rport} -> Application does not require authentication.")
5757
user = ''
5858
pass = ''
5959

@@ -62,7 +62,7 @@ def run_host(ip)
6262
return
6363
end
6464

65-
print_status("Brute-forcing...")
65+
print_status("#{rhost}:#{rport} -> Brute-forcing...")
6666
each_user_pass do |user, pass|
6767
do_login(user, pass)
6868
end
@@ -110,7 +110,7 @@ def is_auth_required?
110110
#
111111
def do_login(user, pass)
112112

113-
vprint_status("Trying username:'#{user.inspect}' with password:'#{pass.inspect}'")
113+
vprint_status("#{rhost}:#{rport} -> Trying username:'#{user.inspect}' with password:'#{pass.inspect}'")
114114
begin
115115
res = send_request_cgi(
116116
{
@@ -124,10 +124,10 @@ def do_login(user, pass)
124124
})
125125

126126
if not res or res.code == 401
127-
vprint_error("FAILED LOGIN. '#{user.inspect}' : '#{pass.inspect}' with code #{res.code}")
127+
vprint_error("#{rhost}:#{rport} -> FAILED LOGIN - '#{user.inspect}' : '#{pass.inspect}' with code #{res.code}")
128128
return :skip_pass
129129
else
130-
print_good("SUCCESSFUL LOGIN. '#{user.inspect}' : '#{pass.inspect}'")
130+
print_good("#{rhost}:#{rport} -> SUCCESSFUL LOGIN - '#{user.inspect}' : '#{pass.inspect}'")
131131

132132
collect_info(user, pass)
133133

@@ -144,7 +144,7 @@ def do_login(user, pass)
144144
return :next_user
145145
end
146146
rescue ::Rex::ConnectionRefused, ::Rex::HostUnreachable, ::Rex::ConnectionTimeout, ::Rex::ConnectionError, ::Errno::EPIPE
147-
print_error("HTTP Connection Failed, Aborting")
147+
print_error("#{rhost}:#{rport} -> HTTP Connection Failed, Aborting")
148148
return :abort
149149
end
150150
end
@@ -154,7 +154,7 @@ def do_login(user, pass)
154154
#
155155
def collect_info(user, pass)
156156

157-
vprint_status("Collecting information from app as '#{user.inspect}':'#{pass.inspect}'...")
157+
vprint_status("#{rhost}:#{rport} -> Collecting information from app as '#{user.inspect}':'#{pass.inspect}'...")
158158
begin
159159

160160
res = send_request_cgi(
@@ -171,7 +171,7 @@ def collect_info(user, pass)
171171
release_ver = JSON.parse(res.body)["release"]
172172
product_name = JSON.parse(res.body)["product"]
173173

174-
vprint_status("Collecting device platform info...")
174+
vprint_status("#{rhost}:#{rport} -> Collecting device platform info...")
175175
print_good("#{rhost}:#{rport} -> Release version: '#{release_ver}', Product Name: '#{product_name}'")
176176

177177
report_note(
@@ -194,7 +194,7 @@ def collect_info(user, pass)
194194
})
195195

196196
userlist = JSON.parse(res.body)
197-
vprint_status("Collecting user list...")
197+
vprint_status("#{rhost}:#{rport} -> Collecting user list...")
198198
print_good("#{rhost}:#{rport} -> User list & role: #{userlist}")
199199

200200
report_note(
@@ -218,15 +218,15 @@ def collect_info(user, pass)
218218
})
219219

220220
eth0_info = JSON.parse(res.body)["eth0"]
221-
vprint_status("Collecting interface info...")
222-
print_good("Interface eth0 info: #{eth0_info}")
221+
vprint_status("#{rhost}:#{rport} -> Collecting interface info...")
222+
print_good("#{rhost}:#{rport} -> Interface eth0 info: #{eth0_info}")
223223

224224
report_note(
225225
:host => rhost,
226226
:proto => 'tcp',
227227
:port => rport,
228228
:sname => "RFCode Reader",
229-
:data => '#{rhost}:#{rport} -> Interface eth0: #{eth0_info}'
229+
:data => 'Interface eth0: #{eth0_info}'
230230
)
231231

232232
return

0 commit comments

Comments
 (0)