There is log-file
with the output of ip-addresses
I want to scan from this file every printed address in
SRC= ... and then to make query with
whois (SRC= ...).
This query should be monitored.
Mine attempt is wrong and looks like this in a bash-script:
#/bin/bash while [ 1 ] do grep ‘SRC=ip-address’ /var/log/syslog >> /home/$user/topsecret001/pitbull001.txt; whois ‘SRC=ip-address’ >> /home/$user/topsecret001/pitbull002.txt; done
Can somebody help with a trick ? How should I define ip-address and how can
I use command
whois with this ip-address ?
The output of /var/log/syslog looks like this snippet here :
The output of /var/log/syslog looks like this - when there is a little alert (like today) :
Idea would be too - to perform a whois-query only if there is "invalid state" popping up in the line of the scrolling syslog.
Thank you for your contributions. I have learnt something by your codes. Often the solutions are looking easier than thought like here - cause I thought it would be more difficulty. I think with recent contribution of enzotib then this question is solved already now.