Skip to content

Commit 6ea5309

Browse files
committed
Apply rubocop changes and remove multiline print
1 parent 328be3c commit 6ea5309

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

modules/auxiliary/scanner/http/jenkins_login.rb

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,11 @@
88
require 'metasploit/framework/login_scanner/jenkins'
99

1010
class Metasploit3 < Msf::Auxiliary
11-
1211
include Msf::Auxiliary::Scanner
1312
include Msf::Exploit::Remote::HttpClient
1413
include Msf::Auxiliary::Report
1514
include Msf::Auxiliary::AuthBrute
16-
15+
1716
def initialize
1817
super(
1918
'Name' => 'Jenkins-CI Login Utility',
@@ -28,7 +27,7 @@ def initialize
2827
], self.class)
2928

3029
register_autofilter_ports([ 80, 443, 8080, 8081, 8000 ])
31-
30+
3231
deregister_options('RHOST')
3332
end
3433

@@ -40,7 +39,7 @@ def run_host(ip)
4039
user_file: datastore['USER_FILE'],
4140
userpass_file: datastore['USERPASS_FILE'],
4241
username: datastore['USERNAME'],
43-
user_as_pass: datastore['USER_AS_PASS'],
42+
user_as_pass: datastore['USER_AS_PASS']
4443
)
4544

4645
scanner = Metasploit::Framework::LoginScanner::Jenkins.new(
@@ -53,11 +52,11 @@ def run_host(ip)
5352
user_agent: datastore['UserAgent'],
5453
vhost: datastore['VHOST']
5554
)
56-
55+
5756
scanner.scan! do |result|
5857
credential_data = result.to_h
5958
credential_data.merge!(
60-
module_fullname: self.fullname,
59+
module_fullname: fullname,
6160
workspace_id: myworkspace_id
6261
)
6362
if result.success?
@@ -68,10 +67,8 @@ def run_host(ip)
6867
print_good "#{ip}:#{rport} - LOGIN SUCCESSFUL: #{result.credential}"
6968
else
7069
invalidate_login(credential_data)
71-
vprint_status "#{ip}:#{rport} - LOGIN FAILED: #{result.credential} (#{result.status}: #{result.proof})"
70+
print_status "#{ip}:#{rport} - LOGIN FAILED: #{result.credential} (#{result.status})"
7271
end
7372
end
74-
7573
end
76-
7774
end

0 commit comments

Comments
 (0)