Home page logo

metasploit logo Metasploit mailing list archives

Re: How to find host in the database (db_host )
From: HD Moore <hdm () metasploit com>
Date: Tue, 06 Apr 2010 10:26:03 -0500

On 4/6/2010 4:56 AM, eski mo wrote:
Hi grp

want to find a method which returns true if supplied ip_address is
found in the hosts table (db_hosts) of the database

.. I tried

msf> db_create

msf > irb
[*] Starting IRB shell...
me = framework.db

want to do something like
me.has_host?('') (should return true/false).... but not working

host = framework.db.workspace.hosts.find_by_address('')
if host
 # do stuff

  By Date           By Thread  

Current thread:
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]