Made the printing of the packages optional
git-svn-id: file:///home/svn/framework3/trunk@12795 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
33d1e147a7
commit
2473e9c754
|
@ -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,14 +46,17 @@ 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}")
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue