handle the database not being connected
git-svn-id: file:///home/svn/framework3/trunk@7366 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
0c12d36cad
commit
c9f5ce05e1
|
@ -19,6 +19,10 @@ class Plugin::CredCollect < Msf::Plugin
|
||||||
end
|
end
|
||||||
|
|
||||||
def cmd_db_hashes()
|
def cmd_db_hashes()
|
||||||
|
if not self.framework.db.active
|
||||||
|
print_error("Database not connected")
|
||||||
|
return
|
||||||
|
end
|
||||||
framework.db.each_note do |note|
|
framework.db.each_note do |note|
|
||||||
if note.ntype == "auth_HASH"
|
if note.ntype == "auth_HASH"
|
||||||
print_line(note.data)
|
print_line(note.data)
|
||||||
|
@ -27,6 +31,10 @@ class Plugin::CredCollect < Msf::Plugin
|
||||||
end
|
end
|
||||||
|
|
||||||
def cmd_db_tokens()
|
def cmd_db_tokens()
|
||||||
|
if not self.framework.db.active
|
||||||
|
print_error("Database not connected")
|
||||||
|
return
|
||||||
|
end
|
||||||
framework.db.each_note do |note|
|
framework.db.each_note do |note|
|
||||||
if note.ntype == "auth_TOKEN"
|
if note.ntype == "auth_TOKEN"
|
||||||
print_line("#{note.host.address} - #{note.data}")
|
print_line("#{note.host.address} - #{note.data}")
|
||||||
|
|
Loading…
Reference in New Issue