Indents and Keywords

git-svn-id: file:///home/svn/framework3/trunk@12898 4d416f70-5f16-0410-b530-b9f4589650da
unstable
Carlos Perez 2011-06-10 03:36:48 +00:00
parent 9a2f23bd61
commit 1fced297f4
2 changed files with 12 additions and 12 deletions

View File

@ -41,10 +41,10 @@ class Metasploit3 < Msf::Post
session_type = session.type session_type = session.type
print_status("Running module against #{sysinfo['Computer']}") print_status("Running module against #{sysinfo['Computer']}")
if not ::File.exists?(datastore['RESOURCE']) if not ::File.exists?(datastore['RESOURCE'])
raise "Resource File does not exists!" raise "Resource File does not exists!"
else else
::File.open(datastore['RESOURCE'], "r").each_line do |cmd| ::File.open(datastore['RESOURCE'], "br").each_line do |cmd|
next if cmd.strip.length < 1 next if cmd.strip.length < 1
next if cmd[0,1] == "#" next if cmd[0,1] == "#"
begin begin
tmpout = "\n" tmpout = "\n"
@ -64,7 +64,7 @@ class Metasploit3 < Msf::Post
rescue ::Exception => e rescue ::Exception => e
print_status("Error Running Command #{cmd.chomp}: #{e.class} #{e}") print_status("Error Running Command #{cmd.chomp}: #{e.class} #{e}")
end end
end end
end end
end end
end end

View File

@ -40,10 +40,10 @@ class Metasploit3 < Msf::Post
def run def run
print_status("Running module against #{sysinfo['Computer']}") print_status("Running module against #{sysinfo['Computer']}")
if not ::File.exists?(datastore['RESOURCE']) if not ::File.exists?(datastore['RESOURCE'])
raise "Resource File does not exists!" raise "Resource File does not exists!"
else else
::File.open(datastore['RESOURCE'], "r").each_line do |cmd| ::File.open(datastore['RESOURCE'], "r").each_line do |cmd|
next if cmd.strip.length < 1 next if cmd.strip.length < 1
next if cmd[0,1] == "#" next if cmd[0,1] == "#"
begin begin
print_status "Running command #{cmd.chomp}" print_status "Running command #{cmd.chomp}"
@ -51,7 +51,7 @@ class Metasploit3 < Msf::Post
rescue ::Exception => e rescue ::Exception => e
print_status("Error Running Command #{cmd.chomp}: #{e.class} #{e}") print_status("Error Running Command #{cmd.chomp}: #{e.class} #{e}")
end end
end end
end end
end end
end end