@@ -47,13 +47,13 @@ def initialize(info={})
47
47
48
48
def run_host ( ip )
49
49
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." )
51
51
return
52
52
end
53
53
54
- print_status ( "Checking if authentication is required..." )
54
+ print_status ( "#{ rhost } : #{ rport } -> Checking if authentication is required..." )
55
55
unless is_auth_required?
56
- print_warning ( "Application does not require authentication." )
56
+ print_warning ( "#{ rhost } : #{ rport } -> Application does not require authentication." )
57
57
user = ''
58
58
pass = ''
59
59
@@ -62,7 +62,7 @@ def run_host(ip)
62
62
return
63
63
end
64
64
65
- print_status ( "Brute-forcing..." )
65
+ print_status ( "#{ rhost } : #{ rport } -> Brute-forcing..." )
66
66
each_user_pass do |user , pass |
67
67
do_login ( user , pass )
68
68
end
@@ -110,7 +110,7 @@ def is_auth_required?
110
110
#
111
111
def do_login ( user , pass )
112
112
113
- vprint_status ( "Trying username:'#{ user . inspect } ' with password:'#{ pass . inspect } '" )
113
+ vprint_status ( "#{ rhost } : #{ rport } -> Trying username:'#{ user . inspect } ' with password:'#{ pass . inspect } '" )
114
114
begin
115
115
res = send_request_cgi (
116
116
{
@@ -124,10 +124,10 @@ def do_login(user, pass)
124
124
} )
125
125
126
126
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 } " )
128
128
return :skip_pass
129
129
else
130
- print_good ( "SUCCESSFUL LOGIN. '#{ user . inspect } ' : '#{ pass . inspect } '" )
130
+ print_good ( "#{ rhost } : #{ rport } -> SUCCESSFUL LOGIN - '#{ user . inspect } ' : '#{ pass . inspect } '" )
131
131
132
132
collect_info ( user , pass )
133
133
@@ -144,7 +144,7 @@ def do_login(user, pass)
144
144
return :next_user
145
145
end
146
146
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" )
148
148
return :abort
149
149
end
150
150
end
@@ -154,7 +154,7 @@ def do_login(user, pass)
154
154
#
155
155
def collect_info ( user , pass )
156
156
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 } '..." )
158
158
begin
159
159
160
160
res = send_request_cgi (
@@ -171,7 +171,7 @@ def collect_info(user, pass)
171
171
release_ver = JSON . parse ( res . body ) [ "release" ]
172
172
product_name = JSON . parse ( res . body ) [ "product" ]
173
173
174
- vprint_status ( "Collecting device platform info..." )
174
+ vprint_status ( "#{ rhost } : #{ rport } -> Collecting device platform info..." )
175
175
print_good ( "#{ rhost } :#{ rport } -> Release version: '#{ release_ver } ', Product Name: '#{ product_name } '" )
176
176
177
177
report_note (
@@ -194,7 +194,7 @@ def collect_info(user, pass)
194
194
} )
195
195
196
196
userlist = JSON . parse ( res . body )
197
- vprint_status ( "Collecting user list..." )
197
+ vprint_status ( "#{ rhost } : #{ rport } -> Collecting user list..." )
198
198
print_good ( "#{ rhost } :#{ rport } -> User list & role: #{ userlist } " )
199
199
200
200
report_note (
@@ -218,15 +218,15 @@ def collect_info(user, pass)
218
218
} )
219
219
220
220
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 } " )
223
223
224
224
report_note (
225
225
:host => rhost ,
226
226
:proto => 'tcp' ,
227
227
:port => rport ,
228
228
:sname => "RFCode Reader" ,
229
- :data => '#{rhost}:#{rport} -> Interface eth0: #{eth0_info}'
229
+ :data => 'Interface eth0: #{eth0_info}'
230
230
)
231
231
232
232
return
0 commit comments