I am trying to keep this to a one-liner... How can I take the IP addresses as the are looping through and push them into another command? I have this part already.
netstat -antu | awk '$5 ~ /[0-9]:/{split($5, a, ":"); ips[a[1]]++} END {for (ip in ips) print ips[ip], ip | "sort -k1 -nr"}'
I...
I have a script I found that I am trying to adapt to read the ASCII characters of a file and convert them all to decimal. The script works but I can not tell the values apart once they are printed. I.E: 101961245175 but I need: 101:96:12:45:175
I don't care what the separator value is I just...
I am trying to search through raw pcap files for IP addresses that are returned in the DNS lookup process. The IP addresses in question are not the SRC or DST they are the IP addreses of the domain name that was looked up. The IP is stored in the response content, as such:
Wireshark summary...
I needed run ngrep against some pcap files for domain names contained in a text file. I was able to accomplish this with the following;
for i in `ls *.pcap`; do <domains.txt xargs -I % ngrep -t -i -W single -q % -I $i >>output.txt; done
However, it turns out the requirements were not explained...
Lack of sleep appears to be taking it's toll... I am attempting to enumerate the computers on the domain, loop through them to see if they have a specific registry KEY(not a value), and then document if the key was or was not there and if the computer was offline and not checked. The ping...
Normally I would think this to be an easy task but I guess I am having a bad week... I have searched but did not find a solution, hence the post.
Ok, so I have 40 or so files with data I need to clean up and build a report from. I am thinking of pulling the data I need from the files via awk...
I have a file “capinfos.txt” which contains:
pcap0000.pcap
Thu Feb 10 15:58:48 2011
Thu Feb 10 19:27:26 2011
pcap0001.pcap
Thu Feb 10 19:27:26 2011
Thu Feb 10 20:35:35 2011
pcap0002.pcap
Thu Feb 10 20:35:35 2011
Mon Feb 14 11:10:43 2011
pcap0003.pcap
Mon Feb 14 11:10:43 2011
Mon Feb...
I need to parse through a log file and extract all filenames for a given file extension. I have something ugly that is working but I know there has to be a better way... I need to exclude records that are searches for filenames with extensions (hence, the grep -v /search). I tried to avoid...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.