Regular expressions are a means of matching a pattern of characters within a string.

learn more… | top users | synonyms (1)

-1
votes
1answer
268 views

extracting ip address from a file [closed]

I'm trying to extract all the IP address from a file. FILE *>i85.95.2.160/29 172.16.24.4 0 200 0 64515 4445 15412 i *>i85.112.80.0/28 172.16.24.4 0 200 ...
-1
votes
1answer
463 views

How to “grep -v” private/broadcast IPv4 addresses?

time nmap -n -iR 0 -sL | cut -d " " -f 5 | egrep -v "^10.*|^172.[16\-32].*|^192.168.*|^[224\-255].*" > RANDOM-IPS.txt so the important part is: egrep -v ...
-1
votes
1answer
31 views

SMTP log anonymize script

I have a SMTP log with records in the format below: 6,222.3.4.5,3040,100.2.3.4,25,UNKNOWN,0,1,……,9337bc-929a-34c0-29a8-b3a89c834b29 ,protocol,SMTP ,745663746,STATUS-COMPLETE ,VALID ...
-2
votes
1answer
25 views

Regular expression in unzip files argument not working

I'm trying to view the contents of a zip archive using an extremely simple regular expression. This works: rmorton@Rockette:~$ unzip -l Downloads/WeiDU-Linux-236.zip "*/i386/tolower" "*/i386/weidu" ...