Skip to content

Commit 72a9c86

Browse files
committed
setting rfcode_reader_enum straight. more updates.
1 parent ffa18d4 commit 72a9c86

File tree

1 file changed

+42
-14
lines changed

1 file changed

+42
-14
lines changed

modules/auxiliary/scanner/http/rfcode_reader_enum.rb

Lines changed: 42 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,10 @@ def initialize(info={})
4141

4242
#
4343
# Info-Only
44-
# Identify logged in user: /rfcode_reader/api/whoami.json?_dc=1369680704481
45-
# Capture list of users: /rfcode_reader/api/userlist.json?_dc=1370353972710
46-
# Interface configuration: /rfcode_reader/api/interfacestatus.json?_dc=1369678668067
44+
# Identify logged in user: /rfcode_reader/api/whoami.json
45+
# Capture list of users: /rfcode_reader/api/userlist.json
46+
# Interface configuration: /rfcode_reader/api/interfacestatus.json
47+
# Device platform details: /rfcode_reader/api/version.json
4748
#
4849

4950
def run_host(ip)
@@ -73,7 +74,14 @@ def run_host(ip)
7374
# What's the point of running this module if the app actually isn't RFCode Reader?
7475
#
7576
def is_app_rfreader?
76-
res = send_request_raw({'uri' => '/rfcode_reader/api/whoami.json?_dc=1369680704481'})
77+
res = send_request_cgi(
78+
{
79+
'uri' => '/rfcode_reader/api/whoami.json',
80+
'vars_get' =>
81+
{
82+
'_dc' => '1369680704481'
83+
}
84+
})
7785
return (res and res.code != 404)
7886
end
7987

@@ -87,9 +95,13 @@ def is_auth_required?
8795

8896
res = send_request_cgi(
8997
{
90-
'uri' => '/rfcode_reader/api/whoami.json?_dc=1369680704481',
98+
'uri' => '/rfcode_reader/api/whoami.json',
9199
'method' => 'GET',
92-
'authorization' => basic_auth(user,pass)
100+
'authorization' => basic_auth(user,pass),
101+
'vars_get' =>
102+
{
103+
'_dc' => '1369680704481'
104+
}
93105
})
94106

95107
return (res and res.body =~ /{ }/) ? false : true
@@ -104,9 +116,13 @@ def do_login(user, pass)
104116
begin
105117
res = send_request_cgi(
106118
{
107-
'uri' => '/rfcode_reader/api/whoami.json?_dc=1369680704481',
119+
'uri' => '/rfcode_reader/api/whoami.json',
108120
'method' => 'GET',
109-
'authorization' => basic_auth(user,pass)
121+
'authorization' => basic_auth(user,pass),
122+
'vars_get' =>
123+
{
124+
'_dc' => '1369680704481'
125+
}
110126
})
111127

112128
if not res or res.code == 401
@@ -145,9 +161,13 @@ def collect_info(user, pass)
145161

146162
res = send_request_cgi(
147163
{
148-
'uri' => '/rfcode_reader/api/version.json?_dc=1370460180056',
164+
'uri' => '/rfcode_reader/api/version.json',
149165
'method' => 'GET',
150-
'authorization' => basic_auth(user,pass)
166+
'authorization' => basic_auth(user,pass),
167+
'vars_get' =>
168+
{
169+
'_dc' => '1370460180056'
170+
}
151171
})
152172

153173
release_ver = JSON.parse(res.body)["release"]
@@ -158,9 +178,13 @@ def collect_info(user, pass)
158178

159179
res = send_request_cgi(
160180
{
161-
'uri' => '/rfcode_reader/api/userlist.json?_dc=1370353972710',
181+
'uri' => '/rfcode_reader/api/userlist.json',
162182
'method' => 'GET',
163-
'authorization' => basic_auth(user,pass)
183+
'authorization' => basic_auth(user,pass),
184+
'vars_get' =>
185+
{
186+
'_dc' => '1370353972710'
187+
}
164188
})
165189

166190
userlist = JSON.parse(res.body)
@@ -169,9 +193,13 @@ def collect_info(user, pass)
169193

170194
res = send_request_cgi(
171195
{
172-
'uri' => '/rfcode_reader/api/interfacestatus.json?_dc=1369678668067',
196+
'uri' => '/rfcode_reader/api/interfacestatus.json',
173197
'method' => 'GET',
174-
'authorization' => basic_auth(user,pass)
198+
'authorization' => basic_auth(user,pass),
199+
'vars_get' =>
200+
{
201+
'_dc' => '1369678668067'
202+
}
175203
})
176204

177205
eth0_info = JSON.parse(res.body)["eth0"]

0 commit comments

Comments
 (0)