handle the database not being connected

git-svn-id: file:///home/svn/framework3/trunk@7366 4d416f70-5f16-0410-b530-b9f4589650da
unstable
James Lee 2009-11-05 18:17:38 +00:00
parent 0c12d36cad
commit c9f5ce05e1
1 changed files with 8 additions and 0 deletions

View File

@ -19,6 +19,10 @@ class Plugin::CredCollect < Msf::Plugin
end
def cmd_db_hashes()
if not self.framework.db.active
print_error("Database not connected")
return
end
framework.db.each_note do |note|
if note.ntype == "auth_HASH"
print_line(note.data)
@ -27,6 +31,10 @@ class Plugin::CredCollect < Msf::Plugin
end
def cmd_db_tokens()
if not self.framework.db.active
print_error("Database not connected")
return
end
framework.db.each_note do |note|
if note.ntype == "auth_TOKEN"
print_line("#{note.host.address} - #{note.data}")