nmap-search.pl
Searching the Greapable Nmap...

Description | Features | Bugs | Requirements | Download | Output | Usage/Docs | License

Description

Wirten by:
MadHat at Unspecific.com

Basically, this will allow you to search through a nmap -oG (grepable) file to look for specific things and reformat it for you.

Top | Description | Features | Bugs | Requirements | Download | Output | Usage/Docs | License

Features


Top | Description | Features | Bugs | Requirements | Download | Output | Usage/Docs | License

BUGS

  • really simple, so not a lot of options

Top | Description | Features | Bugs | Requirements | Download | Output | Usage/Docs | License

Requirements

perl (>5.6 prefered)
nmap (not needed for the program to run, but is needed to produce the searchable files)

Top | Description | Features | Bugs | Requirements | Download | Output | Usage/Docs | License

Download

nmap-search.pl

Top | Description | Features | Bugs | Requirements | Download | Output | Usage/Docs | License

Output

Sample Web Interface This is just an example, IT DOES NOT WORK

An example of the output...
madhat@avatar $ ./nmap-search.cgi -f sample.nmap os '!windows'
NOT searching for windows in field os
4 entries found

----------------------------------------
Host:  172.21.140.1 (router.sample.com)
IPID Seq:  All zeros
Ignored State:  closed (1557)
OS:  Cisco IOS 11.3 - 12.0(11)|Cisco IOS v11.14(CA)/12.0.2aT1/v12.0.3T
Ports:
         23     open    tcp             telnet
Seq Index:  1590


----------------------------------------
Host:  172.21.140.4 (172-21-140-4.sample.com)
IPID Seq:  All zeros
Ignored State:  closed (1557)
OS:  Cisco IOS 11.1(7)-11.2(8.10)
Ports:
         23     open    tcp             telnet
Seq Index:  3291


----------------------------------------
Host:  172.21.140.131 (172-21-140-131.sample.com)
IPID Seq:  Incremental
Ignored State:  closed (1553)
OS:  Lexmark Optra S Printer
Ports:
         7      open    tcp             echo
         79     open    tcp             finger
         80     open    tcp             http
         515    open    tcp             printer
         9100   open    tcp             jetdirect
Seq Index:  1


----------------------------------------
Host:  172.21.140.200 (172-21-140-200.sample.com)
Ignored State:  closed (1556)
OS:  D-Link 704P Ethernet Broadband Gateway
Ports:
         23     open    tcp             telnet
         80     open    tcp             http




Top | Description | Features | Bugs | Requirements | Download | Output | Usage/Docs | License

Usage

usage: ./nmap-search.pl [-f file] <field> <search>

<field> The field you want to look for (OS, host, port)
        may be shortened to the shortist non-duplicated string
        os may be o, host may be h, etc...

<search> is the search string you want to look for
        to search for an open port use port/state (21/open)

        you can use the bang (!) at the begining of a search
        to look for entries that do not contain that string
        to look for non Microsoft product,
        look for 'os' and '!microsoft'

        entries seperated by a space are automatically ORed
        but, the first one will determin the NOT(!) or not...
        so, if I used 'OS' for my field and
        '!microsoft windows cisco'
        this would find all entries that did not have
        microsoft, windows or cisco in the OS field.

[-f file] for the nmap (-oG) file you want to use as the DB


Top | Description | Features | Bugs | Requirements | Download | Output | Usage/Docs | License

Licensing

This product is released under the following License.

# Copyright (c) 2001-2002, MadHat (madhat@unspecific.com)
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
#   * Redistributions of source code must retain the above copyright
#     notice, this list of conditions and the following disclaimer.
#   * Redistributions in binary form must reproduce the above copyright
#     notice, this list of conditions and the following disclaimer in
#     the documentation and/or other materials provided with the distribution.
#   * Neither the name of MadHat Productions nor the names of its
#     contributors may be used to endorse or promote products derived
#     from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
# TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Top | Description | Features | Bugs | Requirements | Download | Output | Usage/Docs | License