|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnet.spy.nmap.NmapParser
NMAP log parser. After creating an nmap machine parseable log, you can parse the log like this:
NmapParser np = new NmapParser("/path/to/log/file");
for(Enumeration e = p.entries(); e.hasMoreElements(); ) {
NmapEntry ne = (NmapEntry)e.nextElement();
System.out.println(ne);
}
NOTE: That's not a very useful example, please read the rest of the documentation and play around before complaining.
| Constructor Summary | |
NmapParser(String inputFile)
Construct an NmapParser object to parse a given text file. |
|
| Method Summary | |
Enumeration |
entries()
gets an enumeration of all of the entries. |
NmapEntry |
entry(String ip)
gets an NmapEntry for a specific IP address |
Vector |
listeningOn(int port)
gets a list of NmapEntries for hosts listening on a given port. |
static void |
main(String[] args)
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public NmapParser(String inputFile)
throws IOException
inputFile - the path to a machine readable NMAP log file.
IOException - if an error occurs while opening or reading
the log file.| Method Detail |
public Enumeration entries()
public NmapEntry entry(String ip)
ip - IP address to look up
public Vector listeningOn(int port)
port - port number we're looking forpublic String toString()
public static void main(String[] args)
throws Exception
Exception
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||