@@ -47,13 +47,13 @@ def initialize(info={})
47
47
48
48
def run_host ( ip )
49
49
unless is_app_rfreader?
50
- print_error ( "#{ rhost } :#{ rport } -> 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 ( "#{ rhost } :#{ rport } -> Checking if authentication is required..." )
54
+ print_status ( "#{ rhost } :#{ rport } - Checking if authentication is required..." )
55
55
unless is_auth_required?
56
- print_warning ( "#{ rhost } :#{ rport } -> 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 ( "#{ rhost } :#{ rport } -> 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 ( "#{ rhost } :#{ rport } -> 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 ( "#{ rhost } :#{ rport } -> 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 ( "#{ rhost } :#{ rport } -> 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 ( "#{ rhost } :#{ rport } -> 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 ( "#{ rhost } :#{ rport } -> 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,15 +171,16 @@ 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 ( "#{ rhost } :#{ rport } -> Collecting device platform info..." )
175
- print_good ( "#{ rhost } :#{ rport } -> Release version: '#{ release_ver } ', Product Name: '#{ product_name } '" )
174
+ vprint_status ( "#{ rhost } :#{ rport } - Collecting device platform info..." )
175
+ print_good ( "#{ rhost } :#{ rport } - Release version: '#{ release_ver } ', Product Name: '#{ product_name } '" )
176
176
177
177
report_note (
178
178
:host => rhost ,
179
179
:proto => 'tcp' ,
180
180
:port => rport ,
181
181
:sname => "RFCode Reader" ,
182
- :data => 'Release Version: #{release_ver}, Product: #{product_name}'
182
+ :data => 'Release Version: #{release_ver}, Product: #{product_name}' ,
183
+ :type => 'Info'
183
184
)
184
185
185
186
res = send_request_cgi (
@@ -194,15 +195,16 @@ def collect_info(user, pass)
194
195
} )
195
196
196
197
userlist = JSON . parse ( res . body )
197
- vprint_status ( "#{ rhost } :#{ rport } -> Collecting user list..." )
198
- print_good ( "#{ rhost } :#{ rport } -> User list & role: #{ userlist } " )
198
+ vprint_status ( "#{ rhost } :#{ rport } - Collecting user list..." )
199
+ print_good ( "#{ rhost } :#{ rport } - User list & role: #{ userlist } " )
199
200
200
201
report_note (
201
202
:host => rhost ,
202
203
:proto => 'tcp' ,
203
204
:port => rport ,
204
205
:sname => "RFCode Reader" ,
205
- :data => 'User List & Roles: #{userlist}'
206
+ :data => 'User List & Roles: #{userlist}' ,
207
+ :type => 'Info'
206
208
)
207
209
208
210
@@ -218,15 +220,16 @@ def collect_info(user, pass)
218
220
} )
219
221
220
222
eth0_info = JSON . parse ( res . body ) [ "eth0" ]
221
- vprint_status ( "#{ rhost } :#{ rport } -> Collecting interface info..." )
222
- print_good ( "#{ rhost } :#{ rport } -> Interface eth0 info: #{ eth0_info } " )
223
+ vprint_status ( "#{ rhost } :#{ rport } - Collecting interface info..." )
224
+ print_good ( "#{ rhost } :#{ rport } - Interface eth0 info: #{ eth0_info } " )
223
225
224
226
report_note (
225
227
:host => rhost ,
226
228
:proto => 'tcp' ,
227
229
:port => rport ,
228
230
:sname => "RFCode Reader" ,
229
- :data => 'Interface eth0: #{eth0_info}'
231
+ :data => 'Interface eth0: #{eth0_info}' ,
232
+ :type => 'Info'
230
233
)
231
234
232
235
return
0 commit comments