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. |

| Subject: | Re: Parse specific IP Range out of an NBE file |
|---|---|
| Date: | Mon, 27 Dec 2004 17:44:10 -0500 |
On Mon, 27 Dec 2004 15:08:34 -0700, Christopher J Bidwell <cbidwell@usgs.gov> wrote:
Is there a way that I can grep out a specific IP range out of an NBE file?
yes
grep '192\.168\.0\.[3-25]' old.nbe > new.nbe
the last bit is a bad regular expression, remember it matches charaters not what you want it to match. The [3-25] bit says match anything from '3' up to '2' or '5'. here is a simple way to get what you want: grep '192\.168\.0\.[3-9][^0-9]' old.nbe >new.nbe grep '192\.168\.0\.1[0-9][^0-9]' old.nbe >>new.nbe grep '192\.168\.0\.2[0-5][^0-9]' old.nbe >>new.nbe Now there are more compact ways of doing it but this should be clearer man grep for the details good luck, marc
I thought this would have worked but it doesn't give me the results I'm looking for. In this example I want to be able to grep out (and let me know if there is a better command for doing this that I'm not yet aware of): 192.168.0.[3-25] only. I was getting 192.168.0.50 in this result...Doesn't quite make sense. Any ideas? Thanks, Chris _______________________________________________ Nessus mailing list Nessus@list.nessus.org http://mail.nessus.org/mailman/listinfo/nessus
_______________________________________________ Nessus mailing list Nessus@list.nessus.org http://mail.nessus.org/mailman/listinfo/nessus
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Parse specific IP Range out of an NBE file, Christopher J Bidwell |
|---|---|
| Next by Date: | Re: Parse specific IP Range out of an NBE file, Erik Stephens |
| Previous by Thread: | Parse specific IP Range out of an NBE file, Christopher J Bidwell |
| Next by Thread: | Re: Parse specific IP Range out of an NBE file, Erik Stephens |
| Indexes: | [Date] [Thread] [Top] [All Lists] |