msftidy pass on msf*

git-svn-id: file:///home/svn/framework3/trunk@14035 4d416f70-5f16-0410-b530-b9f4589650da
unstable
Joshua Drake 2011-10-23 12:04:41 +00:00
parent 62c8c6ea9f
commit 5905ef3fad
4 changed files with 13 additions and 10 deletions

14
msfcli
View File

@ -63,10 +63,10 @@ $stderr.puts "[*] Please wait while we load the module tree..."
$framework = Msf::Simple::Framework.create
if ($framework.modules.failed.length > 0)
print("Warning: The following modules could not be loaded!\n\n")
$framework.modules.failed.each_pair do |file, err|
print("\t#{file}: #{err}\n\n")
end
print("Warning: The following modules could not be loaded!\n\n")
$framework.modules.failed.each_pair do |file, err|
print("\t#{file}: #{err}\n\n")
end
end
if (not exploit_name)
@ -228,19 +228,19 @@ case mode.downcase
con = Msf::Ui::Console::Driver.new(
Msf::Ui::Console::Driver::DefaultPrompt,
Msf::Ui::Console::Driver::DefaultPromptChar,
{
{
'Framework' => $framework
}
)
con.run_single("use #{module_class}/#{exploit.refname}")
ARGV.each do |arg|
k,v = arg.split("=", 2)
con.run_single("set #{k} #{v}")
end
con.run_single("exploit")
# If we have sessions or jobs, keep running
if $framework.sessions.length > 0 or $framework.jobs.length > 0
con.run

View File

@ -235,8 +235,8 @@ case cmd
"0x%.8x" % seg.base_address,
seg.size.to_s,
(((seg.readable == true) ? "r" : "") +
((seg.writable == true) ? "w" : "") +
((seg.executable == true) ? "x" : ""))
((seg.writable == true) ? "w" : "") +
((seg.executable == true) ? "x" : ""))
]
}

2
msfrop
View File

@ -164,5 +164,5 @@ if opts[:export]
puts "Error writing #{opts[:export]} file"
exit(1)
end
ropbuilder.print_msg("%bld%redSuccess!%clr gadgets exported to %bld%cya#{opts[:export]}%clr\n", color)
ropbuilder.print_msg("%bld%redSuccess!%clr gadgets exported to %bld%cya#{opts[:export]}%clr\n", color)
end

View File

@ -1,5 +1,8 @@
#!/usr/bin/env ruby
# $Id$
# $Revision$
msfbase = __FILE__
while File.symlink?(msfbase)
msfbase = File.expand_path(File.readlink(msfbase), File.dirname(msfbase))