Fix msf/core and self.class msftidy warnings

Also fixed rex requires.
bug/bundler_fix
William Vu 2017-05-03 15:42:21 -05:00
parent 494711ee65
commit 64452de06d
3186 changed files with 2140 additions and 7875 deletions

View File

@ -3,8 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::HttpClient
@ -35,7 +33,7 @@ class MetasploitModule < Msf::Auxiliary
register_options(
[
OptString.new('PASSWORD', [ true, 'The password to reset to', 'admin'])
], self.class)
])
end
def run

View File

@ -3,8 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::HttpServer::HTML
@ -61,7 +59,7 @@ class MetasploitModule < Msf::Auxiliary
OptBool.new('HIDE_IFRAME', [
true, "Hide the exploit iframe from the user", true
])
], self.class)
])
end
def on_request_uri(cli, request)

View File

@ -3,8 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::HttpClient
@ -37,7 +35,7 @@ class MetasploitModule < Msf::Auxiliary
OptInt.new('TIME', [true, 'Time in seconds to show the image', 10]),
OptPath.new('FILE', [true, 'Image to upload and show']),
OptString.new('HttpPassword', [false, 'The password for AppleTV AirPlay'])
], self.class)
])
# We're not actually using any of these against AppleTV in our Rex HTTP client init,
# so deregister them so we don't overwhelm the user with fake options.

View File

@ -3,7 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
require 'uri'
class MetasploitModule < Msf::Auxiliary
@ -42,7 +41,7 @@ class MetasploitModule < Msf::Auxiliary
OptInt.new('TIME', [true, 'Time in seconds to show the video', 60]),
OptString.new('URL', [true, 'URL of video to show. Must use an IP address']),
OptString.new('HttpPassword', [false, 'The password for AppleTV AirPlay'])
], self.class)
])
# We're not actually using any of these against AppleTV in our Rex HTTP client init,
# so deregister them so we don't overwhelm the user with fake options.

View File

@ -4,8 +4,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Auxiliary::Report
include Msf::Exploit::Remote::Tcp

View File

@ -3,7 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
require 'metasploit/framework/aws/client'
class MetasploitModule < Msf::Auxiliary

View File

@ -4,8 +4,6 @@
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
@ -67,7 +65,7 @@ class MetasploitModule < Msf::Auxiliary
"backupexec_dump.mtf"
]
),
], self.class)
])
end
def run

View File

@ -4,8 +4,6 @@
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
@ -48,7 +46,7 @@ class MetasploitModule < Msf::Auxiliary
"Compromised by Metasploit!\r\n"
]
),
], self.class)
])
end
def auxiliary_commands

View File

@ -3,8 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::HttpClient
@ -30,7 +28,7 @@ class MetasploitModule < Msf::Auxiliary
register_options([
Opt::RPORT(8008)
], self.class)
])
end
def run

View File

@ -3,8 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::HttpClient
@ -30,7 +28,7 @@ class MetasploitModule < Msf::Auxiliary
register_options([
Opt::RPORT(8008),
OptString.new('VID', [true, 'Video ID', 'kxopViU98Xo'])
], self.class)
])
end
def run

View File

@ -2,8 +2,6 @@
# auxiliary/admin/cisco/cisco_asa_extrabacon.rb
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::SNMPClient
@ -46,7 +44,7 @@ class MetasploitModule < Msf::Auxiliary
register_options([
OptEnum.new('ASAVER', [ false, 'Target ASA version (default autodetect)', 'auto', ['auto']+@offsets.keys]),
], self.class)
])
deregister_options("VERSION")
datastore['VERSION'] = '2c' # SNMP v. 2c required it seems

View File

@ -3,8 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::HttpClient
@ -40,7 +38,7 @@ class MetasploitModule < Msf::Auxiliary
OptString.new('USERNAME', [true, 'Username to use', '']),
OptString.new('PASSWORD', [true, 'Password to use', '']),
OptBool.new('SSL', [true, 'Use SSL', true])
], self.class)
])
end
def run_host(ip)

View File

@ -4,8 +4,6 @@
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
@ -36,7 +34,7 @@ class MetasploitModule < Msf::Auxiliary
register_options(
[
Opt::RPORT(21),
], self.class)
])
end
def run

View File

@ -3,8 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::SMB::Client
@ -33,7 +31,7 @@ class MetasploitModule < Msf::Auxiliary
OptString.new('CMD', [ true, 'The command to execute', 'ver']),
OptString.new('SMBUser', [ true, 'The username to authenticate as', 'db2admin']),
OptString.new('SMBPass', [ true, 'The password for the specified username', 'db2admin'])
], self.class )
])
end
def run

View File

@ -4,8 +4,6 @@
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
@ -31,7 +29,7 @@ class MetasploitModule < Msf::Auxiliary
register_options([
Opt::RPORT(8030),
OptBool.new('SSL', [true, 'Use SSL', true])
], self.class)
])
end
def run

View File

@ -3,8 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::Tcp
@ -104,7 +102,7 @@ class MetasploitModule < Msf::Auxiliary
[
Opt::RPORT(8028),
OptString.new("PARAM", [false, 'Specify a parameter for the action'])
], self.class)
])
end
def run

View File

@ -3,8 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
@ -32,7 +30,7 @@ class MetasploitModule < Msf::Auxiliary
[
Opt::RPORT(3000),
OptString.new('CMD', [ false, 'The OS command to execute', 'hostname']),
], self.class)
])
end
def run

View File

@ -3,8 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
@ -32,7 +30,7 @@ class MetasploitModule < Msf::Auxiliary
[
Opt::RPORT(3500),
OptString.new('CMD', [ false, 'The OS command to execute', 'echo metasploit > metasploit.txt']),
], self.class)
])
end
def run

View File

@ -3,8 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::HttpClient

View File

@ -3,8 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::Tcp
@ -50,7 +48,7 @@ class MetasploitModule < Msf::Auxiliary
[
Opt::RPORT(5555),
OptString.new("CMD", [true, 'File to execute', 'Windows\System32\calc.exe'])
], self.class)
])
end

View File

@ -3,8 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Auxiliary::Report
@ -42,7 +40,7 @@ class MetasploitModule < Msf::Auxiliary
Opt::RPORT(8080),
OptString.new('USERNAME', [true, 'Username for the new account', 'msf']),
OptString.new('PASSWORD', [true, 'Password for the new account', 'p4ssw0rd'])
], self.class)
])
end
def get_service_desk_strong_name

View File

@ -3,8 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::HttpClient
include Msf::Auxiliary::Report

View File

@ -3,8 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::HttpServer::HTML
@ -87,7 +85,7 @@ class MetasploitModule < Msf::Auxiliary
"A URL to inject into a script tag in the context of the device web interface.",
''
])
], self.class)
])
end
def run

View File

@ -3,8 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::HttpClient
@ -47,7 +45,7 @@ class MetasploitModule < Msf::Auxiliary
OptString.new('USERNAME', [ true, 'The user to authenticate as', 'admin' ]),
OptString.new('PASSWORD', [ true, 'The password to authenticate with' ]),
OptString.new('PATH', [ true, 'The file to read or delete', "\\windows\\win.ini" ])
], self.class)
])
end
def run

View File

@ -3,7 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
require 'bcrypt'
require 'digest'
require 'openssl'

View File

@ -3,8 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::HttpClient
@ -30,7 +28,7 @@ class MetasploitModule < Msf::Auxiliary
[
OptString.new('FILE', [ true, 'The file to traverse for', '/etc/passwd']),
OptString.new('URL', [ true, 'The path to mimencode', '/cgi-bin/ck/mimencode']),
], self.class)
])
end
def run_host(ip)

View File

@ -3,8 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::HttpClient
@ -37,7 +35,7 @@ class MetasploitModule < Msf::Auxiliary
[
Opt::RPORT(80),
OptString.new('CMD', [ true, 'The command to execute', 'cat var/passwd'])
], self.class)
])
end
def run

View File

@ -3,8 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::HttpClient

View File

@ -3,8 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::HttpClient

View File

@ -3,8 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::HttpClient

View File

@ -4,8 +4,6 @@
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
@ -37,7 +35,7 @@ class MetasploitModule < Msf::Auxiliary
[
Opt::RPORT(8000),
OptString.new('CMD', [ false, "The command to execute.", "net user metasploit password /add" ]),
], self.class)
])
end
def run

View File

@ -3,8 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::HttpClient
@ -36,7 +34,7 @@ class MetasploitModule < Msf::Auxiliary
register_options(
[
OptString.new("TARGETURI", [true, 'The URI directory where basic auth is enabled', '/'])
], self.class)
])
end

View File

@ -3,8 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::HttpClient
@ -41,7 +39,7 @@ class MetasploitModule < Msf::Auxiliary
[
OptString.new('TARGETURI', [ true, "The request URI", '/']),
OptString.new('PASSWORD', [true, 'The password to set', 'pass'])
], self.class)
])
end
def check

View File

@ -4,8 +4,6 @@
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::HttpClient
@ -30,7 +28,7 @@ class MetasploitModule < Msf::Auxiliary
register_options(
[
OptInt.new('SID_MAX', [true, 'Maximum Session ID', 100])
], self.class)
])
end
def run

View File

@ -3,8 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::HTTP::JBoss
@ -42,7 +40,7 @@ class MetasploitModule < Msf::Auxiliary
Opt::RPORT(8080),
OptString.new('APPBASE', [ true, 'Application base name', 'payload']),
OptPath.new('WARFILE', [ false, 'The WAR file to deploy'])
], self.class)
])
end
def deploy_action(app_base, war_data)

View File

@ -3,8 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::HTTP::JBoss
@ -41,7 +39,7 @@ class MetasploitModule < Msf::Auxiliary
Opt::RPORT(8080),
OptString.new('APPBASE', [ true, 'Application base name', 'payload']),
OptPath.new('WARFILE', [ false, 'The WAR file to deploy'])
], self.class)
])
end
def deploy_action(app_base, war_data)

View File

@ -3,8 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::HttpClient
@ -41,7 +39,7 @@ class MetasploitModule < Msf::Auxiliary
Opt::RPORT(8080),
OptString.new('TARGETURI', [ true, 'Target URI', '/seam-booking/home.seam']),
OptString.new('CMD', [ true, "The command to execute."])
], self.class)
])
end
def run

View File

@ -3,8 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::HttpClient
@ -40,7 +38,7 @@ class MetasploitModule < Msf::Auxiliary
OptString.new('KASEYA_USER', [true, 'The username for the new admin account', 'msf']),
OptString.new('KASEYA_PASS', [true, 'The password for the new admin account', 'password']),
OptString.new('EMAIL', [true, 'The email for the new admin account', 'msf@email.loc'])
], self.class)
])
end

View File

@ -3,8 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::HttpClient

View File

@ -3,8 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
# for extracting files
require 'zip'
@ -41,7 +39,7 @@ class MetasploitModule < Msf::Auxiliary
OptString.new('TARGETURI', [true, "The base path to the limesurvey installation", '/']),
OptString.new('FILEPATH', [true, 'Path of the file to download', '/etc/passwd']),
OptInt.new('TRAVERSAL_DEPTH', [true, 'Traversal depth', 15])
], self.class)
])
end
def filepath

View File

@ -3,8 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::HttpClient
@ -35,7 +33,7 @@ class MetasploitModule < Msf::Auxiliary
OptString.new('HttpUsername',[ true, 'User to login with', 'admin']),
OptString.new('HttpPassword',[ true, 'Password to login with', 'password']),
OptString.new('CMD', [ true, 'The command to execute', 'telnetd -p 1337'])
], self.class)
])
end
def run

View File

@ -3,8 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::HttpClient

View File

@ -3,8 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::HttpClient
@ -50,7 +48,7 @@ class MetasploitModule < Msf::Auxiliary
OptString.new('ROUTER_NAME', [ false, 'Name of the router', 'cisco']),
OptString.new('WAN_DOMAIN', [ false, 'WAN Domain Name', 'test']),
OptString.new('WAN_MTU', [ false, 'WAN MTU', '1500'])
], self.class)
])
end
# If the user configured LANIP, use it. Otherwise, use RHOST.

View File

@ -3,8 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::HttpClient
@ -39,7 +37,7 @@ class MetasploitModule < Msf::Auxiliary
OptString.new('USERNAME', [true, 'The username for the new admin account', 'msf']),
OptString.new('PASSWORD', [true, 'The password for the new admin account', 'password']),
OptString.new('EMAIL', [true, 'The email for the new admin account', 'msf@email.loc'])
], self.class)
])
end

View File

@ -3,8 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Auxiliary::Report
@ -50,7 +48,7 @@ class MetasploitModule < Msf::Auxiliary
OptString.new('USERNAME', [false, 'The username to login as (IT360 target only)']),
OptString.new('PASSWORD', [false, 'Password for the specified username (IT360 target only)']),
OptString.new('DOMAIN_NAME', [false, 'Name of the domain to logon to (IT360 target only)'])
], self.class)
])
end

View File

@ -3,8 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Auxiliary::Report
@ -48,7 +46,7 @@ class MetasploitModule < Msf::Auxiliary
OptString.new('USERNAME', [false, 'The username to login as (IT360 target only)']),
OptString.new('PASSWORD', [false, 'Password for the specified username (IT360 target only)']),
OptString.new('DOMAIN_NAME', [false, 'Name of the domain to logon to (IT360 target only)'])
], self.class)
])
end

View File

@ -3,8 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::HttpClient
@ -46,7 +44,7 @@ class MetasploitModule < Msf::Auxiliary
OptString.new('USERNAME', [true, 'The username to login as', 'guest']),
OptString.new('PASSWORD', [true, 'Password for the specified username', 'guest']),
OptString.new('TARGETURI', [ true, "Password Manager Pro application URI", '/'])
], self.class)
])
end

View File

@ -3,8 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::HttpClient
@ -47,7 +45,7 @@ class MetasploitModule < Msf::Auxiliary
OptString.new('USERNAME', [ true, 'The user to authenticate as', 'superadmin@mutiny.com' ]),
OptString.new('PASSWORD', [ true, 'The password to authenticate with', 'password' ]),
OptString.new('PATH', [ true, 'The file to read or delete' ]),
], self.class)
])
end
def run

View File

@ -3,8 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Auxiliary::Report
@ -39,7 +37,7 @@ class MetasploitModule < Msf::Auxiliary
OptString.new('TARGETURI',
[ true, "The base path to NetFlow Analyzer", '/netflow' ]),
OptString.new('FILEPATH', [true, 'Path of the file to download', 'C:\\windows\\system.ini']),
], self.class)
])
end

View File

@ -3,8 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Auxiliary::Report
@ -40,12 +38,12 @@ class MetasploitModule < Msf::Auxiliary
OptString.new('USERNAME', [true, 'The username to login as', 'admin']),
OptString.new('PASSWORD', [true, 'Password for the specified username', 'admin']),
OptString.new('FILEPATH', [false, 'Path of the file to download minus the drive letter', '/Windows/System32/calc.exe']),
], self.class)
])
register_advanced_options(
[
OptInt.new('DEPTH', [false, 'Max depth to traverse', 15])
], self.class)
])
end
def authenticate

View File

@ -3,8 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::HttpClient

View File

@ -3,7 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
require 'time'
class MetasploitModule < Msf::Auxiliary
@ -41,12 +40,12 @@ class MetasploitModule < Msf::Auxiliary
register_options(
[
Opt::RPORT(80)
], self.class)
])
register_advanced_options(
[
OptInt.new('TIME_OFFSET', [true, 'Maximum time differential to try', 5000]),
OptInt.new('TIME_SURPLUS', [true, 'Increase this if you are sure the device is vulnerable and you are not getting through', 200])
], self.class)
])
end
def get_current_time

View File

@ -3,7 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
require 'nexpose'
class MetasploitModule < Msf::Auxiliary
@ -42,7 +41,7 @@ class MetasploitModule < Msf::Auxiliary
OptString.new('USERNAME', [true, "The Nexpose user", nil]),
OptString.new('PASSWORD', [true, "The Nexpose password", nil]),
OptString.new('FILEPATH', [true, "The filepath to read on the server", "/etc/shadow"])
], self.class)
])
end
def report_cred(opts)

View File

@ -3,8 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::HttpClient
@ -36,7 +34,7 @@ class MetasploitModule < Msf::Auxiliary
Opt::RPORT(3037),
OptBool.new('SSL', [true, 'Use SSL', true]),
OptString.new('RPATH', [ true, "The remote file path to delete", "c:\\test.txt" ]),
], self.class)
])
end
def run

View File

@ -3,8 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::HttpClient
@ -43,7 +41,7 @@ class MetasploitModule < Msf::Auxiliary
OptString.new('TARGETURI', [true, "Application path", '/']),
OptString.new('USERNAME', [false, 'The username to login as', 'admin']),
OptString.new('PASSWORD', [false, 'Password for the specified username', 'admin']),
], self.class)
])
end

View File

@ -3,8 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
require 'rex'
require 'net/dns'
require 'rexml/document'
@ -45,7 +43,7 @@ class MetasploitModule < Msf::Auxiliary
OptString.new('HttpPassword', [true, "The Openbravo password", "openbravo"]),
OptString.new('FILEPATH', [true, "The filepath to read on the server", "/etc/passwd"]),
OptString.new('ENDPOINT', [true, "The XML API REST endpoint to use", "ADUser"])
], self.class)
])
end
def run

View File

@ -3,7 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
require 'rexml/element'
class MetasploitModule < Msf::Auxiliary
@ -56,7 +55,7 @@ class MetasploitModule < Msf::Auxiliary
OptString.new('PASSWORD', [true, 'The password to set']),
OptBool.new('FLUSHTOKENS', [ true, 'Flush existing reset tokens before trying', true]),
OptInt.new('MAXINT', [true, 'Max integer to try (tokens begining with a higher int will fail)', 10])
], self.class)
])
end
def generate_token(account)

View File

@ -3,8 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Auxiliary::Report
@ -39,7 +37,7 @@ class MetasploitModule < Msf::Auxiliary
OptString.new("TARGETURI", [true, 'The path to the admin CGI script', '/cgi-bin/admin.cgi']),
OptString.new("USERNAME", [true, 'The username for your new account']),
OptString.new("PASSWORD", [true, 'The password for your new account'])
], self.class)
])
end
def run

View File

@ -4,8 +4,6 @@
##
require 'uri'
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::HttpClient
@ -44,7 +42,7 @@ class MetasploitModule < Msf::Auxiliary
Opt::RPORT(443),
OptString.new('FILEPATH', [true, 'The name of the file to download', '/etc/passwd']),
OptInt.new('DEPTH', [true, 'Traversal depth', 2])
], self.class)
])
end
def my_basename(filename)

View File

@ -3,8 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::HttpClient
@ -38,7 +36,7 @@ class MetasploitModule < Msf::Auxiliary
OptString.new('TARGETURI', [ true, "SysAid path", '/sysaid']),
OptString.new('USERNAME', [true, 'The username for the new admin account', 'msf']),
OptString.new('PASSWORD', [true, 'The password for the new admin account', 'password'])
], self.class)
])
end

View File

@ -3,8 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Auxiliary::Report
@ -44,7 +42,7 @@ class MetasploitModule < Msf::Auxiliary
OptPort.new('RPORT', [true, 'The target port', 8080]),
OptString.new('TARGETURI', [ true, "SysAid path", '/sysaid']),
OptString.new('FILEPATH', [false, 'Path of the file to download (escape Windows paths with a back slash)', '/etc/passwd']),
], self.class)
])
end
def get_traversal_path

View File

@ -3,7 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
require 'openssl'
class MetasploitModule < Msf::Auxiliary
@ -38,7 +37,7 @@ class MetasploitModule < Msf::Auxiliary
[
OptPort.new('RPORT', [true, 'The target port', 8080]),
OptString.new('TARGETURI', [ true, 'SysAid path', '/sysaid']),
], self.class)
])
end

View File

@ -3,7 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
require 'rubygems/package'
class MetasploitModule < Msf::Auxiliary
@ -34,7 +33,7 @@ class MetasploitModule < Msf::Auxiliary
register_options(
[
Opt::RPORT(80)
], self.class)
])
end
# Used for unpacking backup files

View File

@ -3,8 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::HttpClient
@ -30,7 +28,7 @@ class MetasploitModule < Msf::Auxiliary
Opt::RPORT(8180), # 8180 is default for FreeBSD. All other OSes it's 8080
OptString.new('TOMCAT_USER', [ false, 'The username to authenticate as', '']),
OptString.new('TOMCAT_PASS', [ false, 'The password for the specified username', '']),
], self.class)
])
end
def run_host(ip)

View File

@ -3,8 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::HttpClient
@ -43,7 +41,7 @@ class MetasploitModule < Msf::Auxiliary
OptPath.new('SENSITIVE_FILES', [ true, "File containing senstive files, one per line",
File.join(Msf::Config.data_directory, "wordlists", "sensitive_files.txt") ]),
OptInt.new('MAXDIRS', [ true, 'The maximum directory depth to search', 7]),
], self.class)
])
end
def extract_words(wordfile)

View File

@ -3,8 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::HttpClient
@ -43,7 +41,7 @@ class MetasploitModule < Msf::Auxiliary
OptBool.new('SSL', [true, 'Use SSL', true]),
OptPath.new('SENSITIVE_FILES', [ true, "File containing senstive files, one per line",
File.join(Msf::Config.data_directory, "wordlists", "sensitive_files.txt") ]),
], self.class)
])
end
def extract_words(wordfile)

View File

@ -3,8 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::HttpClient
@ -34,7 +32,7 @@ class MetasploitModule < Msf::Auxiliary
OptString.new('URI', [true, "TYPO3 Path", "/"]),
OptString.new('RFILE', [true, "The remote file to download", 'typo3conf/localconf.php']),
OptString.new('ENC_KEY', [false, "Encryption key if known", '']),
], self.class)
])
end
def enc_key(seed)

View File

@ -3,8 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::HttpClient
@ -41,7 +39,7 @@ class MetasploitModule < Msf::Auxiliary
OptString.new('URI', [true, "Typo3 Path", "/"]),
OptString.new('RFILE', [true, "The remote file to download", 'typo3conf/localconf.php']),
OptString.new('LFILE',[true, "The local filename to store the data", "localconf.php"]),
], self.class)
])
end
def run

View File

@ -3,7 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
require 'thread'
class MetasploitModule < Msf::Auxiliary
@ -37,7 +36,7 @@ class MetasploitModule < Msf::Auxiliary
OptString.new('URI', [true, "TYPO3 Path", "/"]),
OptString.new('RFILE', [true, "The remote file to download", 'typo3conf/localconf.php']),
OptInt.new('MAX_TRIES', [true, "Maximum tries", 10000]),
], self.class)
])
end

View File

@ -3,8 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::HttpClient
@ -55,7 +53,7 @@ class MetasploitModule < Msf::Auxiliary
OptString.new('URI', [true, "TYPO3 Path", "/"]),
OptString.new('RFILE', [true, "The remote file to download", 'typo3conf/localconf.php']),
OptString.new('ENC_KEY', [false, "Encryption key if known", '']),
], self.class)
])
end

View File

@ -3,8 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::HttpClient
@ -38,7 +36,7 @@ class MetasploitModule < Msf::Auxiliary
OptString.new('USERNAME', [true, 'The username for the new admin account', 'msf']),
OptString.new('PASSWORD', [true, 'The password for the new admin account', 'password']),
OptString.new('EMAIL', [true, 'The email for the new admin account', 'msf@email.loc'])
], self.class)
])
end
def user

View File

@ -3,8 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::HttpClient
include Msf::Auxiliary::Report

View File

@ -3,8 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::HttpClient
include Msf::Auxiliary::Report

View File

@ -3,8 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::HTTP::Wordpress
@ -40,7 +38,7 @@ class MetasploitModule < Msf::Auxiliary
[
OptString.new('USERNAME', [true, 'The WordPress username to authenticate with']),
OptString.new('PASSWORD', [true, 'The WordPress password to authenticate with'])
], self.class)
])
end
def check

View File

@ -3,8 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::HTTP::Wordpress
@ -34,7 +32,7 @@ class MetasploitModule < Msf::Auxiliary
register_options(
[
OptString.new('URI_PLUGIN', [true, 'The WordPress Symposium Plugin URI', 'wp-symposium'])
], self.class)
])
end
def check

View File

@ -3,8 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::HTTP::Wordpress
@ -41,7 +39,7 @@ class MetasploitModule < Msf::Auxiliary
[
OptString.new('USERNAME', [true, 'The WordPress username to authenticate with']),
OptString.new('PASSWORD', [true, 'The WordPress password to authenticate with'])
], self.class)
])
end
def check

View File

@ -3,8 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Auxiliary::Report

View File

@ -3,9 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
require 'rex'
class MetasploitModule < Msf::Auxiliary
include Msf::Auxiliary::Report
@ -48,7 +45,7 @@ class MetasploitModule < Msf::Auxiliary
OptString.new('PASSWORD', [ true, 'The Domain User password' ]),
OptString.new('DOMAIN', [ true, 'The Domain (upper case) Ex: DEMO.LOCAL' ]),
OptString.new('USER_SID', [ true, 'The Domain User SID, Ex: S-1-5-21-1755879683-3641577184-3486455962-1000'])
], self.class)
])
end
def run

View File

@ -3,8 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
@ -31,7 +29,7 @@ class MetasploitModule < Msf::Auxiliary
[
Opt::RPORT(7210),
OptString.new('CMD', [ false, 'The OS command to execute', 'hostname']),
], self.class)
])
end
def run

View File

@ -3,7 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
require 'msf/core/auxiliary/report'
class MetasploitModule < Msf::Auxiliary
@ -60,7 +59,7 @@ class MetasploitModule < Msf::Auxiliary
register_options(
[
Opt::RPORT(32764),
], self.class)
])
end
def run

View File

@ -3,8 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::Udp
@ -31,7 +29,7 @@ class MetasploitModule < Msf::Auxiliary
OptString.new("MAC", [true, 'Specify a MAC address', '00:90:27:85:cf:01']),
OptString.new("PASSWORD", [false, 'Specify a four or six-byte password']),
OptBool.new("IPV6", [false, 'Use IPv6 broadcast', false])
], self.class)
])
deregister_options('RHOST', 'RPORT')
end

View File

@ -3,8 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::Tcp

View File

@ -3,8 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::DCERPC
@ -35,7 +33,7 @@ class MetasploitModule < Msf::Auxiliary
Opt::RPORT(0),
OptString.new('COMMAND', [ true, 'The command to execute', 'cmd.exe']),
OptString.new('ARGS', [ true, 'The arguments to the command', '/c echo metasploit > metasploit.txt'])
], self.class )
])
end
def run

View File

@ -3,8 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::MSSQL

View File

@ -3,7 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
require 'msf/core/exploit/mssql_commands'
class MetasploitModule < Msf::Auxiliary
@ -33,7 +32,7 @@ class MetasploitModule < Msf::Auxiliary
register_options(
[
OptInt.new('FuzzNum', [true, 'Number of principal_ids to fuzz.', 10000]),
], self.class)
])
end
def run

View File

@ -3,7 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
require 'msf/core/exploit/mssql_commands'
class MetasploitModule < Msf::Auxiliary
@ -35,7 +34,7 @@ class MetasploitModule < Msf::Auxiliary
[
OptInt.new('START_RID', [true, 'RID to start fuzzing at.', 500]),
OptInt.new('END_RID', [true, 'RID to stop fuzzing at.', 3000])
], self.class)
])
end
def run

View File

@ -3,7 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
require 'msf/core/exploit/mssql_commands'
class MetasploitModule < Msf::Auxiliary
@ -31,7 +30,7 @@ class MetasploitModule < Msf::Auxiliary
register_options(
[
OptInt.new('FuzzNum', [true, 'Number of principal_ids to fuzz.', 300]),
], self.class)
])
end
def run

View File

@ -3,7 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
require 'msf/core/exploit/mssql_commands'
class MetasploitModule < Msf::Auxiliary

View File

@ -3,7 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
require 'msf/core/exploit/mssql_commands'
class MetasploitModule < Msf::Auxiliary

View File

@ -3,7 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
require 'msf/core/exploit/mssql_commands'
class MetasploitModule < Msf::Auxiliary

View File

@ -3,7 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
require 'msf/core/exploit/mssql_commands'
class MetasploitModule < Msf::Auxiliary

View File

@ -3,8 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
@ -28,7 +26,7 @@ class MetasploitModule < Msf::Auxiliary
register_options( [
OptString.new('CMD', [ false, 'Command to execute', 'cmd.exe /c echo OWNED > C:\\owned.exe']),
], self.class)
])
end
def run

View File

@ -3,8 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
@ -39,7 +37,7 @@ class MetasploitModule < Msf::Auxiliary
[
OptString.new('KEYWORDS', [ true, 'Keywords to search for','passw|credit|card']),
OptInt.new('SAMPLE_SIZE', [ true, 'Number of rows to sample', 1]),
], self.class)
])
end
def print_with_underline(str)

View File

@ -12,8 +12,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::MSSQL
@ -44,7 +42,7 @@ class MetasploitModule < Msf::Auxiliary
register_options(
[
OptString.new('NAMES', [ true, 'Pipe separated list of column names', 'passw|bank|credit|card']),
], self.class)
])
end
def print_with_underline(str)

View File

@ -3,8 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::MSSQL
@ -37,7 +35,7 @@ class MetasploitModule < Msf::Auxiliary
register_options(
[
OptString.new('SMBPROXY', [ true, 'IP of SMB proxy or sniffer.', '0.0.0.0']),
], self.class)
])
end
def run_host(ip)

View File

@ -3,8 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::MSSQL_SQLI
@ -44,7 +42,7 @@ class MetasploitModule < Msf::Auxiliary
register_options(
[
OptString.new('SMBPROXY', [ true, 'IP of SMB proxy or sniffer.', '0.0.0.0']),
], self.class)
])
end
def run

View File

@ -3,8 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
@ -29,7 +27,7 @@ class MetasploitModule < Msf::Auxiliary
register_options(
[
OptString.new('SQL', [ false, 'The SQL query to execute', 'select @@version']),
], self.class)
])
end
def auxiliary_commands

View File

@ -3,8 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::MSSQL
@ -26,7 +24,7 @@ class MetasploitModule < Msf::Auxiliary
OptPath.new('SQL_FILE', [ true, "File containing multiple SQL queries execute (one per line)"]),
OptString.new('QUERY_PREFIX', [ false, "string to append each line of the file",""]),
OptString.new('QUERY_SUFFIX', [ false, "string to prepend each line of the file",""])
], self.class)
])
end

View File

@ -3,8 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Auxiliary::Report

View File

@ -4,8 +4,6 @@
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
@ -25,7 +23,7 @@ class MetasploitModule < Msf::Auxiliary
register_options(
[
OptString.new('SQL', [ true, 'The SQL to execute.', 'select version()'])
], self.class)
])
end
def auxiliary_commands

Some files were not shown because too many files have changed in this diff Show More