Made the printing of the packages optional

git-svn-id: file:///home/svn/framework3/trunk@12795 4d416f70-5f16-0410-b530-b9f4589650da
unstable
Carlos Perez 2011-06-01 03:37:37 +00:00
parent 33d1e147a7
commit 2473e9c754
1 changed files with 12 additions and 5 deletions

View File

@ -30,6 +30,10 @@ class Metasploit3 < Msf::Post
'Platform' => [ 'linux' ],
'SessionTypes' => [ 'shell' ]
))
register_options(
[
OptBool.new('VERBOSE', [false, 'Show list of Packages.', false]),
], self.class)
end
@ -42,13 +46,16 @@ class Metasploit3 < Msf::Post
print_good("Info:")
print_good("\t#{distro[:version]}")
print_good("\t#{distro[:kernel]}")
print_good("Packages:")
installed_pkg = get_pakages(distro[:distro])
store_loot("linux.packages", "text/plain", session, installed_pkg, "installed_packages.txt", "Linux Installed Packages")
pkg_loot = store_loot("linux.packages", "text/plain", session, installed_pkg, "installed_packages.txt", "Linux Installed Packages")
print_status("Package list saved to loot file: #{pkg_loot}")
if datastore['VERBOSE']
print_good("Packages:")
# Print the Packages
installed_pkg.each_line do |p|
print_good("\t#{p.chomp}")
# Print the Packages
installed_pkg.each_line do |p|
print_good("\t#{p.chomp}")
end
end
end