-
Notifications
You must be signed in to change notification settings - Fork 19
/
README.txt
37 lines (30 loc) · 934 Bytes
/
README.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
Introduction
------------
These are a couple of shell tools to extract useful TCP/IP related information:
ipextract : extracts IP addresses from stdin
ipextractnet : extracts IP addresses with netmask from stdin
ipextracttcp : extracts tcp port (of form 123/tcp) from stdin
ipextractudp : extracts udp port (of form 123/udp) from stdin
ipextractsctp : extracts sctp port (of form 123/sctp) from stdin
ipextractfqdn : extracts FQDN (and IP addresses) from stdin
Usage
-----
Use by sourcing it from your shell:
. ipextract
Real world
----------
then run some of the scripts:
$ ipextract < /etc/hosts
127.0.0.1
255.255.255.255
$
For some example of real use:
ipextractfqdn < /var/log/snort/alert | sort -u
dmesg | ipextractudp
netstat -an | ipextractplusport
ifconfig | ipextract6
Automate usage:
---------------
Add it to your bashrc (or other RC file) for automatic inclusion
e.g.:
echo '. ~/bin/ipextract/ipextract' >> .bashrc