Land #2426 - make use of Msf::Config.data_directory

bug/bundler_fix
sinn3r 2013-10-21 13:07:33 -05:00
commit 032da9be10
No known key found for this signature in database
GPG Key ID: 2384DB4EF06F730B
129 changed files with 172 additions and 172 deletions

View File

@ -32,7 +32,7 @@ module Auxiliary::JohnTheRipper
)
@run_path = nil
@john_path = ::File.join(Msf::Config.install_root, "data", "john")
@john_path = ::File.join(Msf::Config.data_directory, "john")
autodetect_platform
end

View File

@ -23,7 +23,7 @@ module Auxiliary::MimeTypes
end
def mime_load_extension_map
path = File.join( Msf::Config.install_root, "data", "mime.yml")
path = File.join( Msf::Config.data_directory, "mime.yml")
@extension_map = YAML.load_file(path)
end

View File

@ -3653,7 +3653,7 @@ class DBManager
data = ::File.open(args[:filename], "rb") {|f| f.read(f.stat.size)}
wspace = args[:wspace] || args['wspace'] || workspace
bl = validate_ips(args[:blacklist]) ? args[:blacklist].split : []
basedir = args[:basedir] || args['basedir'] || ::File.join(Msf::Config.install_root, "data", "msf")
basedir = args[:basedir] || args['basedir'] || ::File.join(Msf::Config.data_directory, "msf")
allow_yaml = false
btag = nil

View File

@ -19,7 +19,7 @@ module Exploit::CmdStagerDebugAsm
register_advanced_options(
[
OptString.new( 'DECODERSTUB', [ true, 'The debug.exe assembly listing decoder stub to use.',
File.join(Msf::Config.install_root, "data", "exploits", "cmdstager", "debug_asm")]),
File.join(Msf::Config.data_directory, "exploits", "cmdstager", "debug_asm")]),
], self.class)
end

View File

@ -19,7 +19,7 @@ module Exploit::CmdStagerDebugWrite
register_advanced_options(
[
OptString.new( 'DECODERSTUB', [ true, 'The debug.exe file-writing decoder stub to use.',
File.join(Msf::Config.install_root, "data", "exploits", "cmdstager", "debug_write")]),
File.join(Msf::Config.data_directory, "exploits", "cmdstager", "debug_write")]),
], self.class)
end

View File

@ -19,7 +19,7 @@ module Exploit::CmdStagerVBS
register_advanced_options(
[
OptString.new( 'DECODERSTUB', [ true, 'The VBS base64 file decoder stub to use.',
File.join(Msf::Config.install_root, "data", "exploits", "cmdstager", "vbs_b64")]),
File.join(Msf::Config.data_directory, "exploits", "cmdstager", "vbs_b64")]),
], self.class)
end

View File

@ -19,7 +19,7 @@ module Exploit::CmdStagerVBS::ADODB
register_advanced_options(
[
OptString.new( 'DECODERSTUB', [ true, 'The VBS base64 file decoder stub to use.',
File.join(Msf::Config.install_root, "data", "exploits", "cmdstager", "vbs_b64_adodb")]),
File.join(Msf::Config.data_directory, "exploits", "cmdstager", "vbs_b64_adodb")]),
], self.class)
end

View File

@ -51,7 +51,7 @@ module Exploit::Java
# Instantiate the JVM with a classpath pointing to the JDK tools.jar
# and our javatoolkit jar.
classpath = File.join(Msf::Config.install_root, "data", "exploits", "msfJavaToolkit.jar")
classpath = File.join(Msf::Config.data_directory, "exploits", "msfJavaToolkit.jar")
classpath += ":" + toolsjar
classpath += ":" + datastore['ADDCLASSPATH'] if datastore['ADDCLASSPATH']

View File

@ -75,7 +75,7 @@ module Exploit::Remote::MSSQL
register_advanced_options(
[
OptPath.new('HEX2BINARY', [ false, "The path to the hex2binary script on the disk",
File.join(Msf::Config.install_root, "data", "exploits", "mssql", "h2b")
File.join(Msf::Config.data_directory, "exploits", "mssql", "h2b")
]),
OptString.new('DOMAIN', [ true, 'The domain to use for windows authentication', 'WORKSTATION'])
], Msf::Exploit::Remote::MSSQL)

View File

@ -34,7 +34,7 @@ module Exploit::Remote::MSSQL_SQLI
register_advanced_options(
[
OptPath.new('HEX2BINARY', [ false, "The path to the hex2binary script on the disk",
File.join(Msf::Config.install_root, "data", "exploits", "mssql", "h2b")
File.join(Msf::Config.data_directory, "exploits", "mssql", "h2b")
])
], Msf::Exploit::Remote::MSSQL_SQLI)

View File

@ -150,7 +150,7 @@ module Exploit::Remote::MYSQL
def mysql_upload_sys_udf(arch=:win32,target_path=nil)
fname = (arch == :win32 ? "lib_mysqludf_sys_32.dll" : "lib_mysqludf_sys_64.dll")
sys_dll = File.join( Msf::Config.install_root, "data", "exploits", "mysql", fname )
sys_dll = File.join( Msf::Config.data_directory, "exploits", "mysql", fname )
data = File.open(sys_dll, "rb") {|f| f.read f.stat.size}
blob = "0x"
blob << data.unpack("C*").map {|x| "%02x" % [x]}.join

View File

@ -150,7 +150,7 @@ module Exploit::Remote::SunRPC
end
def progresolv(number)
names = File.join(Msf::Config.install_root, "data", "wordlists", "rpc_names.txt")
names = File.join(Msf::Config.data_directory, "wordlists", "rpc_names.txt")
File.open(names, "rb").each_line do |line|
next if line.empty? || line =~ /^\s*#/

View File

@ -40,7 +40,7 @@ class Metasploit3 < Msf::Auxiliary
[
Opt::RPORT(8080),
OptPath.new('SENSITIVE_FILES', [ true, "File containing senstive files, one per line",
File.join(Msf::Config.install_root, "data", "wordlists", "sensitive_files.txt") ]),
File.join(Msf::Config.data_directory, "wordlists", "sensitive_files.txt") ]),
OptInt.new('MAXDIRS', [ true, 'The maximum directory depth to search', 7]),
], self.class)
end

View File

@ -41,7 +41,7 @@ class Metasploit3 < Msf::Auxiliary
Opt::RPORT(8443),
OptBool.new('SSL', [true, 'Use SSL', true]),
OptPath.new('SENSITIVE_FILES', [ true, "File containing senstive files, one per line",
File.join(Msf::Config.install_root, "data", "wordlists", "sensitive_files.txt") ]),
File.join(Msf::Config.data_directory, "wordlists", "sensitive_files.txt") ]),
], self.class)
end

View File

@ -655,7 +655,7 @@ class Metasploit3 < Msf::Auxiliary
FROM sys.user$
where password != 'null' and type# = 1
|
ordfltpss = "#{File.join(Msf::Config.install_root, "data", "wordlists", "oracle_default_hashes.txt")}"
ordfltpss = "#{File.join(Msf::Config.data_directory, "wordlists", "oracle_default_hashes.txt")}"
returnedstring = prepare_exec(query)
accts = {}
returnedstring.each do |record|

View File

@ -36,7 +36,7 @@ class Metasploit3 < Msf::Auxiliary
OptString.new('RHOST', [true, "SMTP server address",'127.0.0.1']),
OptString.new('RPORT', [true, "SMTP server port",'25']),
OptString.new('YAML_CONFIG', [true, "Full path to YAML Configuration file",
File.join(Msf::Config.install_root, "data","emailer_config.yaml")]),
File.join(Msf::Config.data_directory,"emailer_config.yaml")]),
], self.class)
# Hide this option from the user

View File

@ -38,7 +38,7 @@ class Metasploit3 < Msf::Auxiliary
register_advanced_options([
OptPath.new('CrawlerModulesDir', [true, 'The base directory containing the crawler modules',
File.join(Msf::Config.install_root, "data", "msfcrawler")
File.join(Msf::Config.data_directory, "msfcrawler")
]),
OptBool.new('EnableUl', [ false, "Enable maximum number of request per URI", true ]),
OptBool.new('StoreDB', [ false, "Store requests in database", false ]),

View File

@ -55,7 +55,7 @@ class Metasploit3 < Msf::Auxiliary
metadata_file_data << "2013-01-08T14:14:00Z</dcterms:modified></cp:coreProperties>"
#where to find the skeleton files required for creating an empty document
data_dir = File.join(Msf::Config.install_root, "data", "exploits", "docx")
data_dir = File.join(Msf::Config.data_directory, "exploits", "docx")
zip_data = {}

View File

@ -31,7 +31,7 @@ class Metasploit3 < Msf::Auxiliary
'DisclosureDate' => 'Nov 10 2009'
))
register_options([
OptPath.new('EOTFILE', [ true, "The EOT template to use to generate the trigger", File.join(Msf::Config.install_root, "data", "exploits", "pricedown.eot")]),
OptPath.new('EOTFILE', [ true, "The EOT template to use to generate the trigger", File.join(Msf::Config.data_directory, "exploits", "pricedown.eot")]),
], self.class)
end

View File

@ -26,7 +26,7 @@ class Metasploit3 < Msf::Auxiliary
OptString.new('DOMAIN', [ true, "The target domain name"]),
OptAddress.new('NS', [ false, "Specify the name server to use for queries, otherwise use the system DNS" ]),
OptPath.new('WORDLIST', [ true, "Wordlist file for domain name brute force.",
File.join(Msf::Config.install_root, "data", "wordlists", "namelist.txt")])
File.join(Msf::Config.data_directory, "wordlists", "namelist.txt")])
], self.class)
register_advanced_options(

View File

@ -37,7 +37,7 @@ class Metasploit3 < Msf::Auxiliary
OptBool.new('ENUM_IP6', [ true, 'Brute force hosts with IPv6 AAAA records',false]),
OptBool.new('ENUM_RVL', [ true, 'Reverse lookup a range of IP addresses', false]),
OptBool.new('ENUM_SRV', [ true, 'Enumerate the most common SRV records', true]),
OptPath.new('WORDLIST', [ false, "Wordlist for domain name bruteforcing", ::File.join(Msf::Config.install_root, "data", "wordlists", "namelist.txt")]),
OptPath.new('WORDLIST', [ false, "Wordlist for domain name bruteforcing", ::File.join(Msf::Config.data_directory, "wordlists", "namelist.txt")]),
OptAddress.new('NS', [ false, "Specify the nameserver to use for queries (default is system DNS)" ]),
OptAddressRange.new('IPRANGE', [false, "The target address range or CIDR identifier"]),
OptBool.new('STOP_WLDCRD', [ true, 'Stops bruteforce enumeration if wildcard resolution is detected', false])

View File

@ -31,11 +31,11 @@ class Metasploit3 < Msf::Auxiliary
Opt::RPORT(5984),
OptString.new('TARGETURI', [false, "TARGETURI for CouchDB. Default here is /", "/"]),
OptPath.new('USERPASS_FILE', [ false, "File containing users and passwords separated by space, one pair per line",
File.join(Msf::Config.install_root, "data", "wordlists", "http_default_userpass.txt") ]),
File.join(Msf::Config.data_directory, "wordlists", "http_default_userpass.txt") ]),
OptPath.new('USER_FILE', [ false, "File containing users, one per line",
File.join(Msf::Config.install_root, "data", "wordlists", "http_default_users.txt") ]),
File.join(Msf::Config.data_directory, "wordlists", "http_default_users.txt") ]),
OptPath.new('PASS_FILE', [ false, "File containing passwords, one per line",
File.join(Msf::Config.install_root, "data", "wordlists", "http_default_pass.txt") ]),
File.join(Msf::Config.data_directory, "wordlists", "http_default_pass.txt") ]),
OptBool.new('USER_AS_PASS', [ false, "Try the username as the password for all users", false]),
], self.class)
end

View File

@ -31,11 +31,11 @@ class Metasploit3 < Msf::Auxiliary
register_options(
[
OptPath.new('USERPASS_FILE', [ false, "File containing (space-seperated) users and passwords, one pair per line",
File.join(Msf::Config.install_root, "data", "wordlists", "db2_default_userpass.txt") ]),
File.join(Msf::Config.data_directory, "wordlists", "db2_default_userpass.txt") ]),
OptPath.new('USER_FILE', [ false, "File containing users, one per line",
File.join(Msf::Config.install_root, "data", "wordlists", "db2_default_user.txt") ]),
File.join(Msf::Config.data_directory, "wordlists", "db2_default_user.txt") ]),
OptPath.new('PASS_FILE', [ false, "File containing passwords, one per line",
File.join(Msf::Config.install_root, "data", "wordlists", "db2_default_pass.txt") ]),
File.join(Msf::Config.data_directory, "wordlists", "db2_default_pass.txt") ]),
], self.class)
end

View File

@ -39,7 +39,7 @@ class Metasploit3 < Msf::Auxiliary
[
OptString.new('URI', [true, 'The path to users Home Page', '/']),
OptPath.new('USER_FILE', [ true, "File containing users, one per line",
File.join(Msf::Config.install_root, "data", "wordlists", "unix_users.txt") ]),
File.join(Msf::Config.data_directory, "wordlists", "unix_users.txt") ]),
], self.class)
deregister_options(

View File

@ -35,7 +35,7 @@ class Metasploit3 < Msf::Auxiliary
[
OptInt.new('ErrorCode', [ true, "The expected http code for non existant directories", 404]),
OptPath.new('HTTP404Sigs', [ false, "Path of 404 signatures to use",
File.join(Msf::Config.install_root, "data", "wmap", "wmap_404s.txt")
File.join(Msf::Config.data_directory, "wmap", "wmap_404s.txt")
]
),
OptBool.new('NoDetailMessages', [ false, "Do not display detailed test messages", true ]),

View File

@ -34,7 +34,7 @@ class Metasploit3 < Msf::Auxiliary
[
OptInt.new('ErrorCode', [ true, "Error code for non existent directory", 404]),
OptPath.new('HTTP404Sigs', [ false, "Path of 404 signatures to use",
File.join(Msf::Config.install_root, "data", "wmap", "wmap_404s.txt")
File.join(Msf::Config.data_directory, "wmap", "wmap_404s.txt")
]
),
OptBool.new('NoDetailMessages', [ false, "Do not display detailed test messages", true ])

View File

@ -34,9 +34,9 @@ class Metasploit3 < Msf::Auxiliary
register_options([
OptString.new('TARGETURI', [true, 'Path to the iDRAC Administration page', '/data/login']),
OptPath.new('USER_FILE', [ false, "File containing users, one per line",
File.join(Msf::Config.install_root, "data", "wordlists", "idrac_default_user.txt") ]),
File.join(Msf::Config.data_directory, "wordlists", "idrac_default_user.txt") ]),
OptPath.new('PASS_FILE', [ false, "File containing passwords, one per line",
File.join(Msf::Config.install_root, "data", "wordlists", "idrac_default_pass.txt") ]),
File.join(Msf::Config.data_directory, "wordlists", "idrac_default_pass.txt") ]),
OptInt.new('RPORT', [true, "Default remote port", 443])
], self.class)

View File

@ -29,7 +29,7 @@ class Metasploit3 < Msf::Auxiliary
[
OptString.new('PATH', [ true, "The path to identify files", '/']),
OptPath.new('DICTIONARY', [ false, "Path of word dictionary to use",
File.join(Msf::Config.install_root, "data", "wmap", "wmap_dirs.txt")
File.join(Msf::Config.data_directory, "wmap", "wmap_dirs.txt")
]
)

View File

@ -41,11 +41,11 @@ class Metasploit3 < Msf::Auxiliary
OptString.new('PATH', [ true, "The path to identify files", '/']),
OptInt.new('ERROR_CODE', [ true, "Error code for non existent directory", 404]),
OptPath.new('DICTIONARY', [ false, "Path of word dictionary to use",
File.join(Msf::Config.install_root, "data", "wmap", "wmap_dirs.txt")
File.join(Msf::Config.data_directory, "wmap", "wmap_dirs.txt")
]
),
OptPath.new('HTTP404S', [ false, "Path of 404 signatures to use",
File.join(Msf::Config.install_root, "data", "wmap", "wmap_404s.txt")
File.join(Msf::Config.data_directory, "wmap", "wmap_404s.txt")
]
)
], self.class)

View File

@ -39,7 +39,7 @@ class Metasploit3 < Msf::Auxiliary
[
OptString.new('USERNAME', [ false, "Username for authentication (default: admin)","admin" ]),
OptPath.new('PASS_FILE', [ false, "File containing passwords, one per line",
File.join(Msf::Config.install_root, "data", "wordlists", "http_default_pass.txt") ]),
File.join(Msf::Config.data_directory, "wordlists", "http_default_pass.txt") ]),
], self.class)
end

View File

@ -37,7 +37,7 @@ class Metasploit3 < Msf::Auxiliary
[
OptString.new('USERNAME', [ false, "Username for authentication (default: admin)","admin" ]),
OptPath.new('PASS_FILE', [ false, "File containing passwords, one per line",
File.join(Msf::Config.install_root, "data", "wordlists", "http_default_pass.txt") ]),
File.join(Msf::Config.data_directory, "wordlists", "http_default_pass.txt") ]),
], self.class)
end

View File

@ -40,7 +40,7 @@ class Metasploit3 < Msf::Auxiliary
[
OptString.new('USERNAME', [ false, "Username for authentication (default: admin)","admin" ]),
OptPath.new('PASS_FILE', [ false, "File containing passwords, one per line",
File.join(Msf::Config.install_root, "data", "wordlists", "http_default_pass.txt") ]),
File.join(Msf::Config.data_directory, "wordlists", "http_default_pass.txt") ]),
], self.class)
end

View File

@ -26,11 +26,11 @@ class Metasploit3 < Msf::Auxiliary
register_options(
[
OptPath.new('USERPASS_FILE', [ false, "File containing users and passwords separated by space, one pair per line",
File.join(Msf::Config.install_root, "data", "wordlists", "http_default_userpass.txt") ]),
File.join(Msf::Config.data_directory, "wordlists", "http_default_userpass.txt") ]),
OptPath.new('USER_FILE', [ false, "File containing users, one per line",
File.join(Msf::Config.install_root, "data", "wordlists", "http_default_users.txt") ]),
File.join(Msf::Config.data_directory, "wordlists", "http_default_users.txt") ]),
OptPath.new('PASS_FILE', [ false, "File containing passwords, one per line",
File.join(Msf::Config.install_root, "data", "wordlists", "http_default_pass.txt") ]),
File.join(Msf::Config.data_directory, "wordlists", "http_default_pass.txt") ]),
OptString.new('TARGETURI', [true, 'The URI path to dolibarr', '/dolibarr/'])
], self.class)
end

View File

@ -33,7 +33,7 @@ class Metasploit3 < Msf::Auxiliary
[
false,
"File containing users and passwords",
File.join(Msf::Config.install_root, "data", "wordlists", "cms400net_default_userpass.txt")
File.join(Msf::Config.data_directory, "wordlists", "cms400net_default_userpass.txt")
])
], self.class)

View File

@ -29,7 +29,7 @@ class Metasploit3 < Msf::Auxiliary
OptString.new('PATH', [ true, "The path to identify files", '/']),
OptString.new('EXT', [ false, "Append file extension to use", '']),
OptPath.new('DICTIONARY', [ false, "Path of word dictionary to use",
File.join(Msf::Config.install_root, "data", "wmap", "wmap_files.txt")
File.join(Msf::Config.data_directory, "wmap", "wmap_files.txt")
]
)
], self.class)
@ -38,7 +38,7 @@ class Metasploit3 < Msf::Auxiliary
[
OptInt.new('ErrorCode', [ true, "The expected http code for non existant files", 404]),
OptPath.new('HTTP404Sigs', [ false, "Path of 404 signatures to use",
File.join(Msf::Config.install_root, "data", "wmap", "wmap_404s.txt")
File.join(Msf::Config.data_directory, "wmap", "wmap_404s.txt")
]
),
OptBool.new('NoDetailMessages', [ false, "Do not display detailed test messages", true ]),

View File

@ -27,11 +27,11 @@ class Metasploit3 < Msf::Auxiliary
[
Opt::RPORT(2381),
OptPath.new('USERPASS_FILE', [ false, "File containing users and passwords separated by space, one pair per line",
File.join(Msf::Config.install_root, "data", "wordlists", "http_default_userpass.txt") ]),
File.join(Msf::Config.data_directory, "wordlists", "http_default_userpass.txt") ]),
OptPath.new('USER_FILE', [ false, "File containing users, one per line",
File.join(Msf::Config.install_root, "data", "wordlists", "http_default_users.txt") ]),
File.join(Msf::Config.data_directory, "wordlists", "http_default_users.txt") ]),
OptPath.new('PASS_FILE', [ false, "File containing passwords, one per line",
File.join(Msf::Config.install_root, "data", "wordlists", "http_default_pass.txt") ]),
File.join(Msf::Config.data_directory, "wordlists", "http_default_pass.txt") ]),
], self.class)
end

View File

@ -35,11 +35,11 @@ class Metasploit3 < Msf::Auxiliary
register_options(
[
OptPath.new('USERPASS_FILE', [ false, "File containing users and passwords separated by space, one pair per line",
File.join(Msf::Config.install_root, "data", "wordlists", "http_default_userpass.txt") ]),
File.join(Msf::Config.data_directory, "wordlists", "http_default_userpass.txt") ]),
OptPath.new('USER_FILE', [ false, "File containing users, one per line",
File.join(Msf::Config.install_root, "data", "wordlists", "http_default_users.txt") ]),
File.join(Msf::Config.data_directory, "wordlists", "http_default_users.txt") ]),
OptPath.new('PASS_FILE', [ false, "File containing passwords, one per line",
File.join(Msf::Config.install_root, "data", "wordlists", "http_default_pass.txt") ]),
File.join(Msf::Config.data_directory, "wordlists", "http_default_pass.txt") ]),
OptString.new('AUTH_URI', [ false, "The URI to authenticate against (default:auto)" ]),
OptString.new('REQUESTTYPE', [ false, "Use HTTP-GET or HTTP-PUT for Digest-Auth, PROPFIND for WebDAV (default:GET)", "GET" ])
], self.class)

View File

@ -25,7 +25,7 @@ class Metasploit3 < Msf::Auxiliary
register_options(
[
OptString.new('TARGETURI', [ true, "The path to the Joomla install", '/']),
OptPath.new('PLUGINS', [ true, "Path to list of plugins to enumerate", File.join(Msf::Config.install_root, "data", "wordlists", "joomla.txt")])
OptPath.new('PLUGINS', [ true, "Path to list of plugins to enumerate", File.join(Msf::Config.data_directory, "wordlists", "joomla.txt")])
], self.class)
end

View File

@ -32,7 +32,7 @@ class Metasploit3 < Msf::Auxiliary
register_options(
[
OptPath.new('SENSITIVE_FILES', [ true, "File containing senstive files, one per line",
File.join(Msf::Config.install_root, "data", "wordlists", "sensitive_files.txt") ]),
File.join(Msf::Config.data_directory, "wordlists", "sensitive_files.txt") ]),
OptString.new('USERNAME',[ true, 'User to login with', 'admin']),
OptString.new('PASSWORD',[ true, 'Password to login with', 'password']),

View File

@ -30,7 +30,7 @@ class Metasploit3 < Msf::Auxiliary
[
OptString.new('PATH', [ true, "The path to detect mod_negotiation", '/']),
OptPath.new('FILEPATH',[true, "path to file with file names",
File.join(Msf::Config.install_root, "data", "wmap", "wmap_files.txt")])
File.join(Msf::Config.data_directory, "wmap", "wmap_files.txt")])
], self.class)
end

View File

@ -30,7 +30,7 @@ class Metasploit3 < Msf::Auxiliary
register_options(
[
OptPath.new('FILELIST', [ true, "File containing sensitive files, one per line",
File.join(Msf::Config.install_root, "data", "wordlists", "sensitive_files.txt") ]),
File.join(Msf::Config.data_directory, "wordlists", "sensitive_files.txt") ]),
OptString.new('USERNAME',[ true, 'User to login with', 'admin']),
OptString.new('PASSWORD',[ true, 'Password to login with', 'password'])
], self.class)

View File

@ -26,7 +26,7 @@ class Metasploit3 < Msf::Auxiliary
)
register_options(
[
OptPath.new('TARGETURIS', [ true, "Path to list of URIs to request", File.join(Msf::Config.install_root, "data", "wordlists", "http_owa_common.txt")])
OptPath.new('TARGETURIS', [ true, "Path to list of URIs to request", File.join(Msf::Config.data_directory, "wordlists", "http_owa_common.txt")])
], self.class)
end

View File

@ -36,7 +36,7 @@ class Metasploit3 < Msf::Auxiliary
[
OptInt.new('ErrorCode', [ true, "The expected http code for non existant files", 404]),
OptPath.new('HTTP404Sigs', [ false, "Path of 404 signatures to use",
File.join(Msf::Config.install_root, "data", "wmap", "wmap_404s.txt")
File.join(Msf::Config.data_directory, "wmap", "wmap_404s.txt")
]
),
OptBool.new('NoDetailMessages', [ false, "Do not display detailed test messages", true ])

View File

@ -36,11 +36,11 @@ class Metasploit3 < Msf::Auxiliary
Opt::RPORT(8000),
OptString.new('URI', [true, "URI for Splunk Web login. Default is /en-US/account/login", "/en-US/account/login"]),
OptPath.new('USERPASS_FILE', [ false, "File containing users and passwords separated by space, one pair per line",
File.join(Msf::Config.install_root, "data", "wordlists", "http_default_userpass.txt") ]),
File.join(Msf::Config.data_directory, "wordlists", "http_default_userpass.txt") ]),
OptPath.new('USER_FILE', [ false, "File containing users, one per line",
File.join(Msf::Config.install_root, "data", "wordlists", "http_default_users.txt") ]),
File.join(Msf::Config.data_directory, "wordlists", "http_default_users.txt") ]),
OptPath.new('PASS_FILE', [ false, "File containing passwords, one per line",
File.join(Msf::Config.install_root, "data", "wordlists", "http_default_pass.txt") ])
File.join(Msf::Config.data_directory, "wordlists", "http_default_pass.txt") ])
], self.class)
end

View File

@ -34,7 +34,7 @@ class Metasploit3 < Msf::Auxiliary
[
OptInt.new('ErrorCode', [ true, "Error code for non existent directory", 404]),
OptPath.new('HTTP404Sigs', [ false, "Path of 404 signatures to use",
File.join(Msf::Config.install_root, "data", "wmap", "wmap_404s.txt")
File.join(Msf::Config.data_directory, "wmap", "wmap_404s.txt")
]
),
OptBool.new('NoDetailMessages', [ false, "Do not display detailed test messages", true ])

View File

@ -44,7 +44,7 @@ class Metasploit3 < Msf::Auxiliary
Opt::RPORT(8080),
OptString.new('URI', [true, 'The path of the Apache Tomcat Administration page', '/admin/j_security_check']),
OptPath.new('USER_FILE', [ true, "File containing users, one per line",
File.join(Msf::Config.install_root, "data", "wordlists", "tomcat_mgr_default_users.txt") ]),
File.join(Msf::Config.data_directory, "wordlists", "tomcat_mgr_default_users.txt") ]),
], self.class)
deregister_options('PASSWORD','PASS_FILE','USERPASS_FILE','USER_AS_PASS','STOP_ON_SUCCESS','BLANK_PASSWORDS','USERNAME')

View File

@ -58,11 +58,11 @@ class Metasploit3 < Msf::Auxiliary
Opt::RPORT(8080),
OptString.new('URI', [true, "URI for Manager login. Default is /manager/html", "/manager/html"]),
OptPath.new('USERPASS_FILE', [ false, "File containing users and passwords separated by space, one pair per line",
File.join(Msf::Config.install_root, "data", "wordlists", "tomcat_mgr_default_userpass.txt") ]),
File.join(Msf::Config.data_directory, "wordlists", "tomcat_mgr_default_userpass.txt") ]),
OptPath.new('USER_FILE', [ false, "File containing users, one per line",
File.join(Msf::Config.install_root, "data", "wordlists", "tomcat_mgr_default_users.txt") ]),
File.join(Msf::Config.data_directory, "wordlists", "tomcat_mgr_default_users.txt") ]),
OptPath.new('PASS_FILE', [ false, "File containing passwords, one per line",
File.join(Msf::Config.install_root, "data", "wordlists", "tomcat_mgr_default_pass.txt") ]),
File.join(Msf::Config.data_directory, "wordlists", "tomcat_mgr_default_pass.txt") ]),
], self.class)
register_autofilter_ports([ 80, 443, 8080, 8081, 8000, 8008, 8443, 8444, 8880, 8888, 9080, 19300 ])

View File

@ -33,7 +33,7 @@ class Metasploit3 < Msf::Auxiliary
register_options(
[
OptPath.new('SENSITIVE_FILES', [ true, "File containing senstive files, one per line",
File.join(Msf::Config.install_root, "data", "wordlists", "sensitive_files.txt") ]),
File.join(Msf::Config.data_directory, "wordlists", "sensitive_files.txt") ]),
], self.class)
end

View File

@ -26,11 +26,11 @@ class Metasploit3 < Msf::Auxiliary
register_options(
[
OptPath.new('USERPASS_FILE', [ false, "File containing users and passwords separated by space, one pair per line",
File.join(Msf::Config.install_root, "data", "wordlists", "http_default_userpass.txt") ]),
File.join(Msf::Config.data_directory, "wordlists", "http_default_userpass.txt") ]),
OptPath.new('USER_FILE', [ false, "File containing users, one per line",
File.join(Msf::Config.install_root, "data", "wordlists", "http_default_users.txt") ]),
File.join(Msf::Config.data_directory, "wordlists", "http_default_users.txt") ]),
OptPath.new('PASS_FILE', [ false, "File containing passwords, one per line",
File.join(Msf::Config.install_root, "data", "wordlists", "http_default_pass.txt") ]),
File.join(Msf::Config.data_directory, "wordlists", "http_default_pass.txt") ]),
OptString.new('TARGETURI', [true, 'The URI path to dolibarr', '/vcms2/'])
], self.class)
end

View File

@ -32,7 +32,7 @@ class Metasploit3 < Msf::Auxiliary
[
OptInt.new('ErrorCode', [ true, "The expected http code for non existant files", 404]),
OptPath.new('HTTP404Sigs', [ false, "Path of 404 signatures to use",
File.join(Msf::Config.install_root, "data", "wmap", "wmap_404s.txt")
File.join(Msf::Config.data_directory, "wmap", "wmap_404s.txt")
]
),
OptBool.new('NoDetailMessages', [ false, "Do not display detailed test messages", true ]),

View File

@ -44,14 +44,14 @@ class Metasploit3 < Msf::Auxiliary
[
false,
"File containing usernames, one per line",
File.join(Msf::Config.install_root, "data", "wordlists", "multi_vendor_cctv_dvr_users.txt")
File.join(Msf::Config.data_directory, "wordlists", "multi_vendor_cctv_dvr_users.txt")
]),
OptPath.new(
'PASS_FILE',
[
false,
"File containing passwords, one per line",
File.join(Msf::Config.install_root, "data", "wordlists", "multi_vendor_cctv_dvr_pass.txt")
File.join(Msf::Config.data_directory, "wordlists", "multi_vendor_cctv_dvr_pass.txt")
]),
OptBool.new('STOP_ON_SUCCESS', [false, "Stop guessing when a credential works for a host", true]),
OptPort.new('HTTP_PORT', [true, "The HTTP port for the IE ActiveX web client interface", 80]),

View File

@ -40,7 +40,7 @@ class Metasploit3 < Msf::Auxiliary
OptString.new('SID', [ false, 'Oracle SID' ]),
OptInt.new('TIMEOUT', [false, 'Time to wait for HTTP responses', 60]),
OptPath.new('USERPASS_FILE', [ false, "File containing users and passwords separated by space, one pair per line",
File.join(Msf::Config.install_root, "data", "wordlists", "oracle_default_userpass.txt") ]),
File.join(Msf::Config.data_directory, "wordlists", "oracle_default_userpass.txt") ]),
OptBool.new('USER_AS_PASS', [ false, "Try the username as the password for all users", false]),
], self.class)

View File

@ -37,7 +37,7 @@ class Metasploit3 < Msf::Auxiliary
register_options(
[
OptPath.new('USERPASS_FILE', [ false, "File containing (space-seperated) users and passwords, one pair per line",
File.join(Msf::Config.install_root, "data", "wordlists", "oracle_default_userpass.txt") ]),
File.join(Msf::Config.data_directory, "wordlists", "oracle_default_userpass.txt") ]),
OptString.new('SID', [ true, 'The instance (SID) to authenticate against', 'XE'])
], self.class)

View File

@ -28,7 +28,7 @@ class Metasploit3 < Msf::Auxiliary
register_options(
[
OptPath.new('SID_FILE', [ false, "File containing instance names, one per line", File.join(Msf::Config.install_root, "data", "wordlists", "sid.txt") ]),
OptPath.new('SID_FILE', [ false, "File containing instance names, one per line", File.join(Msf::Config.data_directory, "wordlists", "sid.txt") ]),
OptString.new('SID', [ false, 'A specific SID to attempt.' ]),
Opt::RPORT(1521)
], self.class)

View File

@ -34,11 +34,11 @@ class Metasploit3 < Msf::Auxiliary
register_options(
[
OptPath.new('USERPASS_FILE', [ false, "File containing (space-seperated) users and passwords, one pair per line",
File.join(Msf::Config.install_root, "data", "wordlists", "postgres_default_userpass.txt") ]),
File.join(Msf::Config.data_directory, "wordlists", "postgres_default_userpass.txt") ]),
OptPath.new('USER_FILE', [ false, "File containing users, one per line",
File.join(Msf::Config.install_root, "data", "wordlists", "postgres_default_user.txt") ]),
File.join(Msf::Config.data_directory, "wordlists", "postgres_default_user.txt") ]),
OptPath.new('PASS_FILE', [ false, "File containing passwords, one per line",
File.join(Msf::Config.install_root, "data", "wordlists", "postgres_default_pass.txt") ]),
File.join(Msf::Config.data_directory, "wordlists", "postgres_default_pass.txt") ]),
], self.class)
deregister_options('SQL')

View File

@ -33,7 +33,7 @@ class Metasploit3 < Msf::Auxiliary
OptInt.new('BATCHSIZE', [true, 'The number of hosts to probe in each set', 256]),
OptString.new('PASSWORD', [ false, 'The password to test' ]),
OptPath.new('PASS_FILE', [ false, "File containing communities, one per line",
File.join(Msf::Config.install_root, "data", "wordlists", "snmp_default_pass.txt")
File.join(Msf::Config.data_directory, "wordlists", "snmp_default_pass.txt")
])
], self.class)

View File

@ -24,7 +24,7 @@ class Metasploit3 < Msf::Auxiliary
Opt::RPORT(69),
Opt::CHOST,
OptPath.new('DICTIONARY', [ true, 'The list of filenames',
File.join(Msf::Config.install_root, "data", "wordlists", "tftp.txt") ])
File.join(Msf::Config.data_directory, "wordlists", "tftp.txt") ])
], self.class)
end

View File

@ -37,15 +37,15 @@ class Metasploit3 < Msf::Auxiliary
[
OptPort.new('SRVPORT', [ true, "The local port to listen on.", 80 ]),
OptPath.new('TEMPLATE', [ false, "The HTML template to serve in responses",
File.join(Msf::Config.install_root, "data", "exploits", "capture", "http", "index.html")
File.join(Msf::Config.data_directory, "exploits", "capture", "http", "index.html")
]
),
OptPath.new('SITELIST', [ false, "The list of URLs that should be used for cookie capture",
File.join(Msf::Config.install_root, "data", "exploits", "capture", "http", "sites.txt")
File.join(Msf::Config.data_directory, "exploits", "capture", "http", "sites.txt")
]
),
OptPath.new('FORMSDIR', [ false, "The directory containing form snippets (example.com.txt)",
File.join(Msf::Config.install_root, "data", "exploits", "capture", "http", "forms")
File.join(Msf::Config.data_directory, "exploits", "capture", "http", "forms")
]
),
OptAddress.new('AUTOPWN_HOST',[ false, "The IP address of the browser_autopwn service ", nil ]),

View File

@ -44,7 +44,7 @@ class Metasploit3 < Msf::Auxiliary
register_advanced_options([
OptPath.new('ProtocolBase', [true, 'The base directory containing the protocol decoders',
File.join(Msf::Config.install_root, "data", "exploits", "psnuffle")
File.join(Msf::Config.data_directory, "exploits", "psnuffle")
]),
], self.class)
deregister_options('RHOST')

View File

@ -43,7 +43,7 @@ class Metasploit3 < Msf::Auxiliary
register_options(
[
OptPath.new('SITELIST', [ false, "YAML file of URL/Replacement pairs for GET replacement",
File.join(Msf::Config.install_root, "data", "exploits", "wifi", "airpwn", "sitelist.yml")
File.join(Msf::Config.data_directory, "exploits", "wifi", "airpwn", "sitelist.yml")
]),
OptBool.new('USESITEFILE', [ true, "Use site list file for match/response", "false"]),
OptString.new('FILTER', [ true, "Default BPF filter", "port 80"]),

View File

@ -26,7 +26,7 @@ class Metasploit3 < Msf::Auxiliary
register_options(
[
OptPath.new('DNSLIST', [ false, "YAML file of DNS entries for replacement",
File.join(Msf::Config.install_root, "data", "exploits", "wifi", "dnspwn", "dnslist.yml")
File.join(Msf::Config.data_directory, "exploits", "wifi", "dnspwn", "dnslist.yml")
]),
OptBool.new('USEDNSFILE', [ true, "Use dns list file for response", "false"]),
OptString.new('FILTER', [ true, "Default BPF filter", "port 53"]),

View File

@ -80,7 +80,7 @@ class Metasploit4 < Msf::Exploit::Local
#
# Metasm does not support FreeBSD executable generation.
#
path = File.join(Msf::Config.install_root, "data", "exploits", "CVE-2013-2171.bin")
path = File.join(Msf::Config.data_directory, "exploits", "CVE-2013-2171.bin")
x = File.open(path, 'rb') { |f| f.read(f.stat.size) }
x.gsub(/MSFABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890/, payload_fname.ljust(40, "\x00"))
end

View File

@ -52,7 +52,7 @@ class Metasploit3 < Msf::Exploit::Remote
end
def exploit
path = File.join( Msf::Config.install_root, "data", "exploits", "CVE-2008-5499.swf" )
path = File.join( Msf::Config.data_directory, "exploits", "CVE-2008-5499.swf" )
fd = File.open( path, "rb" )
@swf = fd.read(fd.stat.size)
fd.close

View File

@ -158,7 +158,7 @@ class Metasploit3 < Msf::Exploit::Remote
# @return [String] the contents of the .swf file used to trigger the exploit
def flash_trigger
swf_path = File.join(Msf::Config.install_root, "data", "exploits", "cve-2013-0758.swf")
swf_path = File.join(Msf::Config.data_directory, "exploits", "cve-2013-0758.swf")
@flash_trigger ||= File.read(swf_path)
end

View File

@ -87,7 +87,7 @@ class Metasploit3 < Msf::Exploit::Remote
def exploit
# load the static jar file
path = File.join( Msf::Config.install_root, "data", "exploits", "CVE-2012-0507.jar" )
path = File.join( Msf::Config.data_directory, "exploits", "CVE-2012-0507.jar" )
fd = File.open( path, "rb" )
@jar_data = fd.read(fd.stat.size)
fd.close

View File

@ -83,7 +83,7 @@ class Metasploit3 < Msf::Exploit::Remote
def exploit
# load the static jar file
path = File.join( Msf::Config.install_root, "data", "exploits", "CVE-2008-5353.jar" )
path = File.join( Msf::Config.data_directory, "exploits", "CVE-2008-5353.jar" )
fd = File.open( path, "rb" )
@jar_data = fd.read(fd.stat.size)
fd.close

View File

@ -91,7 +91,7 @@ No automatic targetting for now ...
def exploit
# load the static jar
path = File.join(Msf::Config.install_root, "data", "exploits", "CVE-2009-3867.jar")
path = File.join(Msf::Config.data_directory, "exploits", "CVE-2009-3867.jar")
fd = File.open(path, "rb")
@jar_data = fd.read(fd.stat.size)
fd.close

View File

@ -78,15 +78,15 @@ class Metasploit3 < Msf::Exploit::Remote
def setup
path = File.join(Msf::Config.install_root, "data", "exploits", "cve-2013-1488", "Exploit.class")
path = File.join(Msf::Config.data_directory, "exploits", "cve-2013-1488", "Exploit.class")
@exploit_class = File.open(path, "rb") {|fd| fd.read(fd.stat.size) }
path = File.join(Msf::Config.install_root, "data", "exploits", "cve-2013-1488", "FakeDriver.class")
path = File.join(Msf::Config.data_directory, "exploits", "cve-2013-1488", "FakeDriver.class")
@driver_class = File.open(path, "rb") {|fd| fd.read(fd.stat.size) }
path = File.join(Msf::Config.install_root, "data", "exploits", "cve-2013-1488", "FakeDriver2.class")
path = File.join(Msf::Config.data_directory, "exploits", "cve-2013-1488", "FakeDriver2.class")
@driver2_class = File.open(path, "rb") {|fd| fd.read(fd.stat.size) }
path = File.join(Msf::Config.install_root, "data", "exploits", "cve-2013-1488", "META-INF", "services", "java.lang.Object")
path = File.join(Msf::Config.data_directory, "exploits", "cve-2013-1488", "META-INF", "services", "java.lang.Object")
@object_services = File.open(path, "rb") {|fd| fd.read(fd.stat.size) }
path = File.join(Msf::Config.install_root, "data", "exploits", "cve-2013-1488", "META-INF", "services", "java.sql.Driver")
path = File.join(Msf::Config.data_directory, "exploits", "cve-2013-1488", "META-INF", "services", "java.sql.Driver")
@driver_services = File.open(path, "rb") {|fd| fd.read(fd.stat.size) }
@exploit_class_name = rand_text_alpha("Exploit".length)

View File

@ -110,7 +110,7 @@ class Metasploit3 < Msf::Exploit::Remote
jar.add_file(full, '')
end
end
fd = File.open(File.join( Msf::Config.install_root, "data", "exploits", "CVE-2012-4681", path ), "rb")
fd = File.open(File.join( Msf::Config.data_directory, "exploits", "CVE-2012-4681", path ), "rb")
data = fd.read(fd.stat.size)
jar.add_file(path.join("/"), data)
fd.close

View File

@ -76,9 +76,9 @@ class Metasploit3 < Msf::Exploit::Remote
def setup
path = File.join(Msf::Config.install_root, "data", "exploits", "cve-2012-5076_2", "Exploit.class")
path = File.join(Msf::Config.data_directory, "exploits", "cve-2012-5076_2", "Exploit.class")
@exploit_class = File.open(path, "rb") {|fd| fd.read(fd.stat.size) }
path = File.join(Msf::Config.install_root, "data", "exploits", "cve-2012-5076_2", "B.class")
path = File.join(Msf::Config.data_directory, "exploits", "cve-2012-5076_2", "B.class")
@loader_class = File.open(path, "rb") {|fd| fd.read(fd.stat.size) }
@exploit_class_name = rand_text_alpha("Exploit".length)

View File

@ -94,7 +94,7 @@ class Metasploit3 < Msf::Exploit::Remote
jar.add_file(full, '')
end
end
fd = File.open(File.join( Msf::Config.install_root, "data", "exploits", "cve-2012-5076", path ), "rb")
fd = File.open(File.join( Msf::Config.data_directory, "exploits", "cve-2012-5076", path ), "rb")
data = fd.read(fd.stat.size)
jar.add_file(path.join("/"), data)
fd.close

View File

@ -77,9 +77,9 @@ class Metasploit3 < Msf::Exploit::Remote
def setup
path = File.join(Msf::Config.install_root, "data", "exploits", "cve-2013-0422", "Exploit.class")
path = File.join(Msf::Config.data_directory, "exploits", "cve-2013-0422", "Exploit.class")
@exploit_class = File.open(path, "rb") {|fd| fd.read(fd.stat.size) }
path = File.join(Msf::Config.install_root, "data", "exploits", "cve-2013-0422", "B.class")
path = File.join(Msf::Config.data_directory, "exploits", "cve-2013-0422", "B.class")
@loader_class = File.open(path, "rb") {|fd| fd.read(fd.stat.size) }
@exploit_class_name = rand_text_alpha("Exploit".length)

View File

@ -111,7 +111,7 @@ class Metasploit3 < Msf::Exploit::Remote
jar.add_file(full, '')
end
end
fd = File.open(File.join( Msf::Config.install_root, "data", "exploits", "cve-2013-0431", path ), "rb")
fd = File.open(File.join( Msf::Config.data_directory, "exploits", "cve-2013-0431", path ), "rb")
data = fd.read(fd.stat.size)
jar.add_file(path.join("/"), data)
fd.close

View File

@ -74,9 +74,9 @@ class Metasploit3 < Msf::Exploit::Remote
def setup
path = File.join(Msf::Config.install_root, "data", "exploits", "cve-2012-5088", "Exploit.class")
path = File.join(Msf::Config.data_directory, "exploits", "cve-2012-5088", "Exploit.class")
@exploit_class = File.open(path, "rb") {|fd| fd.read(fd.stat.size) }
path = File.join(Msf::Config.install_root, "data", "exploits", "cve-2012-5088", "B.class")
path = File.join(Msf::Config.data_directory, "exploits", "cve-2012-5088", "B.class")
@loader_class = File.open(path, "rb") {|fd| fd.read(fd.stat.size) }
@exploit_class_name = rand_text_alpha("Exploit".length)

View File

@ -85,11 +85,11 @@ class Metasploit3 < Msf::Exploit::Remote
def setup
path = File.join(Msf::Config.install_root, "data", "exploits", "cve-2013-2460", "Exploit.class")
path = File.join(Msf::Config.data_directory, "exploits", "cve-2013-2460", "Exploit.class")
@exploit_class = File.open(path, "rb") {|fd| fd.read(fd.stat.size) }
path = File.join(Msf::Config.install_root, "data", "exploits", "cve-2013-2460", "ExpProvider.class")
path = File.join(Msf::Config.data_directory, "exploits", "cve-2013-2460", "ExpProvider.class")
@provider_class = File.open(path, "rb") {|fd| fd.read(fd.stat.size) }
path = File.join(Msf::Config.install_root, "data", "exploits", "cve-2013-2460", "DisableSecurityManagerAction.class")
path = File.join(Msf::Config.data_directory, "exploits", "cve-2013-2460", "DisableSecurityManagerAction.class")
@action_class = File.open(path, "rb") {|fd| fd.read(fd.stat.size) }
@exploit_class_name = rand_text_alpha(EXPLOIT_STRING.length)

View File

@ -79,13 +79,13 @@ class Metasploit3 < Msf::Exploit::Remote
def setup
path = File.join(Msf::Config.install_root, "data", "exploits", "jre7u17", "Exploit.class")
path = File.join(Msf::Config.data_directory, "exploits", "jre7u17", "Exploit.class")
@exploit_class = File.open(path, "rb") {|fd| fd.read(fd.stat.size) }
path = File.join(Msf::Config.install_root, "data", "exploits", "jre7u17", "Union1.class")
path = File.join(Msf::Config.data_directory, "exploits", "jre7u17", "Union1.class")
@union1_class = File.open(path, "rb") {|fd| fd.read(fd.stat.size) }
path = File.join(Msf::Config.install_root, "data", "exploits", "jre7u17", "Union2.class")
path = File.join(Msf::Config.data_directory, "exploits", "jre7u17", "Union2.class")
@union2_class = File.open(path, "rb") {|fd| fd.read(fd.stat.size) }
path = File.join(Msf::Config.install_root, "data", "exploits", "jre7u17", "SystemClass.class")
path = File.join(Msf::Config.data_directory, "exploits", "jre7u17", "SystemClass.class")
@system_class = File.open(path, "rb") {|fd| fd.read(fd.stat.size) }
@exploit_class_name = rand_text_alpha("Exploit".length)

View File

@ -100,7 +100,7 @@ class Metasploit3 < Msf::Exploit::Remote
jar.add_file(full, '')
end
end
fd = File.open(File.join( Msf::Config.install_root, "data", "exploits", "cve-2011-3544", path ), "rb")
fd = File.open(File.join( Msf::Config.data_directory, "exploits", "cve-2011-3544", path ), "rb")
data = fd.read(fd.stat.size)
jar.add_file(path.join("/"), data)
fd.close

View File

@ -87,7 +87,7 @@ class Metasploit3 < Msf::Exploit::Remote
jar.add_file(full, '')
end
end
fd = File.open(File.join( Msf::Config.install_root, "data", "exploits", "cve-2010-0094", path ), "rb")
fd = File.open(File.join( Msf::Config.data_directory, "exploits", "cve-2010-0094", path ), "rb")
data = fd.read(fd.stat.size)
jar.add_file(path.join("/"), data)
fd.close

View File

@ -199,7 +199,7 @@ EOF
def exploit
path = File.join(Msf::Config.install_root, "data", "exploits", "CVE-2009-3869.jar")
path = File.join(Msf::Config.data_directory, "exploits", "CVE-2009-3869.jar")
fd = File.open(path, "rb")
@jar_data = fd.read(fd.stat.size)
fd.close

View File

@ -69,11 +69,11 @@ class Metasploit3 < Msf::Exploit::Remote
end
def setup
path = File.join(Msf::Config.install_root, "data", "exploits", "CVE-2013-2465", "Exploit.class")
path = File.join(Msf::Config.data_directory, "exploits", "CVE-2013-2465", "Exploit.class")
@exploit_class = File.open(path, "rb") {|fd| fd.read(fd.stat.size) }
path = File.join(Msf::Config.install_root, "data", "exploits", "CVE-2013-2465", "Exploit$MyColorModel.class")
path = File.join(Msf::Config.data_directory, "exploits", "CVE-2013-2465", "Exploit$MyColorModel.class")
@color_model_class = File.open(path, "rb") {|fd| fd.read(fd.stat.size) }
path = File.join(Msf::Config.install_root, "data", "exploits", "CVE-2013-2465", "Exploit$MyColorSpace.class")
path = File.join(Msf::Config.data_directory, "exploits", "CVE-2013-2465", "Exploit$MyColorSpace.class")
@color_space_class = File.open(path, "rb") {|fd| fd.read(fd.stat.size) }
@exploit_class_name = rand_text_alpha("Exploit".length)

View File

@ -94,7 +94,7 @@ class Metasploit3 < Msf::Exploit::Remote
jar.add_file(full, '')
end
end
fd = File.open(File.join( Msf::Config.install_root, "data", "exploits", "cve-2010-0840", path ), "rb")
fd = File.open(File.join( Msf::Config.data_directory, "exploits", "cve-2010-0840", path ), "rb")
data = fd.read(fd.stat.size)
jar.add_file(path.join("/"), data)
fd.close

View File

@ -86,7 +86,7 @@ class Metasploit3 < Msf::Exploit::Remote
def exploit
# load the static jar file
path = File.join( Msf::Config.install_root, "data", "exploits", "CVE-2012-1723.jar" )
path = File.join( Msf::Config.data_directory, "exploits", "CVE-2012-1723.jar" )
fd = File.open( path, "rb" )
@jar_data = fd.read(fd.stat.size)
fd.close

View File

@ -81,7 +81,7 @@ class Metasploit3 < Msf::Exploit::Remote
def exploit
# load the class data
path = File.join(Msf::Config.install_root, "data", "exploits", "QTJavaExploit.class")
path = File.join(Msf::Config.data_directory, "exploits", "QTJavaExploit.class")
fd = File.open(path, "rb")
@class_data = fd.read(fd.stat.size)
fd.close

View File

@ -98,7 +98,7 @@ class Metasploit3 < Msf::Exploit::Remote
# We need this class as a wrapper to run in a thread. For some reason
# the Payload class is giving illegal access exceptions without it.
path = File.join(Msf::Config.install_root, "data", "java", "metasploit", "PayloadServlet.class")
path = File.join(Msf::Config.data_directory, "java", "metasploit", "PayloadServlet.class")
fd = File.open(path, "rb")
servlet = fd.read(fd.stat.size)
fd.close

View File

@ -231,7 +231,7 @@ EOT
def send_serialized_request(file_name , replace_params = {})
path = File.join( Msf::Config.install_root, "data", "exploits", "jboss_jmxinvoker", "DeploymentFileRepository", file_name)
path = File.join( Msf::Config.data_directory, "exploits", "jboss_jmxinvoker", "DeploymentFileRepository", file_name)
data = File.open( path, "rb" ) { |fd| data = fd.read(fd.stat.size) }
replace_params.each { |key, value| data.gsub!(key, value) }

View File

@ -138,12 +138,12 @@ class Metasploit3 < Msf::Exploit::Remote
]
jar = Rex::Zip::Jar.new
jar.add_files(files, File.join(Msf::Config.install_root, "data", "exploits", "CVE-2008-6508"))
jar.add_files(files, File.join(Msf::Config.data_directory, "exploits", "CVE-2008-6508"))
plugin_author = datastore['PLUGINAUTHOR'] || rand_text_alphanumeric(8+rand(8))
plugin_desc = datastore['PLUGINDESC'] || rand_text_alphanumeric(8+rand(8))
plugin_xml = File.open(File.join(Msf::Config.install_root, "data", "exploits", "CVE-2008-6508", "plugin.xml"), "rb") {|fd| fd.read() }
plugin_xml = File.open(File.join(Msf::Config.data_directory, "exploits", "CVE-2008-6508", "plugin.xml"), "rb") {|fd| fd.read() }
plugin_xml.gsub!(/PLUGINNAME/, plugin_name)
plugin_xml.gsub!(/PLUGINDESCRIPTION/, plugin_desc)
plugin_xml.gsub!(/PLUGINAUTHOR/, plugin_author)

View File

@ -99,7 +99,7 @@ class Metasploit3 < Msf::Exploit::Remote
end
end
fd = File.open(File.join( Msf::Config.install_root, "data", "exploits", "batik_svg", path ), "rb")
fd = File.open(File.join( Msf::Config.data_directory, "exploits", "batik_svg", path ), "rb")
data = fd.read(fd.stat.size)
jar.add_file(path.join("/"), data)
fd.close

View File

@ -89,7 +89,7 @@ class Metasploit3 < Msf::Exploit::Remote
def exploit
# load the xml data
path = File.join(Msf::Config.install_root, "data", "exploits", "google_proxystylesheet.xml")
path = File.join(Msf::Config.data_directory, "exploits", "google_proxystylesheet.xml")
fd = File.open(path, "rb")
@xml_data = fd.read(fd.stat.size)
fd.close

View File

@ -52,7 +52,7 @@ class Metasploit3 < Msf::Exploit::Remote
OptString.new('POSTDATA', [false, "The POST data to send, with the include parameter changed to XXpathXX"]),
OptString.new('HEADERS', [false, "Any additional HTTP headers to send, cookies for example. Format: \"header:value,header2:value2\""]),
OptPath.new('PHPRFIDB', [false, "A local file containing a list of URLs to try, with XXpathXX replacing the URL",
File.join(Msf::Config.install_root, "data", "exploits", "php", "rfi-locations.dat")
File.join(Msf::Config.data_directory, "exploits", "php", "rfi-locations.dat")
])
], self.class)
end

View File

@ -60,7 +60,7 @@ class Metasploit3 < Msf::Exploit::Remote
def exploit
# NOTE: The 0day used Vera.ttf (785d2fd45984c6548763ae6702d83e20)
path = File.join( Msf::Config.install_root, "data", "exploits", "cve-2010-2883.ttf" )
path = File.join( Msf::Config.data_directory, "exploits", "cve-2010-2883.ttf" )
fd = File.open( path, "rb" )
@ttf_data = fd.read(fd.stat.size)
fd.close

View File

@ -270,7 +270,7 @@ pluginspage="http://www.macromedia.com/go/getflashplayer">
end
def create_swf
path = ::File.join( Msf::Config.install_root, "data", "exploits", "CVE-2012-0754.swf" )
path = ::File.join( Msf::Config.data_directory, "exploits", "CVE-2012-0754.swf" )
fd = ::File.open( path, "rb" )
swf = fd.read(fd.stat.size)
fd.close

View File

@ -225,7 +225,7 @@ class Metasploit3 < Msf::Exploit::Remote
end
def create_swf
path = ::File.join( Msf::Config.install_root, "data", "exploits", "CVE-2012-1535", "Main.swf" )
path = ::File.join( Msf::Config.data_directory, "exploits", "CVE-2012-1535", "Main.swf" )
fd = ::File.open( path, "rb" )
swf = fd.read(fd.stat.size)
fd.close

View File

@ -422,7 +422,7 @@ class Metasploit3 < Msf::Exploit::Remote
end
def create_swf
path = ::File.join( Msf::Config.install_root, "data", "exploits", "CVE-2012-0779.swf" )
path = ::File.join( Msf::Config.data_directory, "exploits", "CVE-2012-0779.swf" )
fd = ::File.open( path, "rb" )
swf = fd.read(fd.stat.size)
fd.close

View File

@ -176,7 +176,7 @@ class Metasploit3 < Msf::Exploit::Remote
end
def create_swf
path = ::File.join( Msf::Config.install_root, "data", "exploits", "mp4player.swf" )
path = ::File.join( Msf::Config.data_directory, "exploits", "mp4player.swf" )
fd = ::File.open( path, "rb" )
swf = fd.read(fd.stat.size)
fd.close

View File

@ -68,7 +68,7 @@ class Metasploit3 < Msf::Exploit::Remote
def exploit
# src for the flash file: external/source/exploits/CVE-2011-2110/CVE-2011-2110.as
# full aslr/dep bypass using the info leak as per malware
path = File.join( Msf::Config.install_root, "data", "exploits", "CVE-2011-2110.swf" )
path = File.join( Msf::Config.data_directory, "exploits", "CVE-2011-2110.swf" )
fd = File.open( path, "rb" )
@swf = fd.read(fd.stat.size)
fd.close

View File

@ -65,7 +65,7 @@ class Metasploit3 < Msf::Exploit::Remote
end
def exploit
path = File.join( Msf::Config.install_root, "data", "exploits", "CVE-2011-0609.swf" )
path = File.join( Msf::Config.data_directory, "exploits", "CVE-2011-0609.swf" )
fd = File.open( path, "rb" )
@swf = fd.read(fd.stat.size)
fd.close

View File

@ -121,7 +121,7 @@ class Metasploit3 < Msf::Exploit::Remote
end
def exploit
path = File.join(Msf::Config.install_root, "data", "exploits", "CVE-2011-0611.swf")
path = File.join(Msf::Config.data_directory, "exploits", "CVE-2011-0611.swf")
f = File.open(path, "rb")
@trigger = f.read(f.stat.size)
f.close

View File

@ -69,7 +69,7 @@ class Metasploit3 < Msf::Exploit::Remote
def exploit
# load the static swf file
path = File.join( Msf::Config.install_root, "data", "exploits", "CVE-2010-1297.swf" )
path = File.join( Msf::Config.data_directory, "exploits", "CVE-2010-1297.swf" )
fd = File.open( path, "rb" )
@swf_data = fd.read(fd.stat.size)
fd.close

View File

@ -58,7 +58,7 @@ class Metasploit3 < Msf::Exploit::Remote
#
def exploit
path = File.join( Msf::Config.install_root, "data", "exploits", "shockwave_rcsl.dir" )
path = File.join( Msf::Config.data_directory, "exploits", "shockwave_rcsl.dir" )
fd = File.open( path, "rb" )
@dir_data = fd.read(fd.stat.size)
fd.close

View File

@ -121,7 +121,7 @@ class Metasploit3 < Msf::Exploit::Remote
end
if request.uri =~ /\.msi$/
msi_source = ::File.join(Msf::Config.install_root, "data", "exploits", "exec_payload.msi")
msi_source = ::File.join(Msf::Config.data_directory, "exploits", "exec_payload.msi")
source = ::File.open(msi_source, "rb"){|fd| fd.read(fd.stat.size) }
print_status("Sending msi")
send_response(cli, source, {'Content-Type'=>'application/octet-stream'})

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