Ethical Hacking

Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package.
Computer Forensics Training at InfoSec Institute

Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors.




Network Security Nessus-Users
[Top] [All Lists]

Re: Parse specific IP Range out of an NBE file

Subject: Re: Parse specific IP Range out of an NBE file
Date: Mon, 27 Dec 2004 15:55:52 -0700
On Dec 27, 2004, at 3:08 PM, Christopher J Bidwell wrote:

Is there a way that I can grep out a specific IP range out of an NBE file?

grep '192\.168\.0\.[3-25]' old.nbe > new.nbe

I thought this would have worked but it doesn't give me the results I'm
looking for.

You're giving it a regular expression and those semantics are hard to represent with regular expressions. You could try this awk recipe:


gawk -F '[|]' '$1 != "results" { print $0; } $1 == "results" { split($3, quads, "[.]"); if (quads[4] >= 3 && quads[4] <= 25) print $0; }' old.nbe > new.nbe

It's a messy one-liner, but can be made prettier with newlines & indentation if this is going into a script.


Best regards, Erik Stephens www.edgeos.com Managed Vulnerability Assessment Services

_______________________________________________
Nessus mailing list
Nessus@list.nessus.org
http://mail.nessus.org/mailman/listinfo/nessus

<Prev in Thread] Current Thread [Next in Thread>