Articles tagged with #awk weekly




Change colors of ls output in the bash shell

Usually colorization is put in action via alias : alias ls='ls --color=auto' You can turn off the colors each time you run ls: ls --color=never or change the alias itself to disable fancy colors permanently or even simple \ls . But to change the colors you'd need to cause …



Cisco CUCM CDR report - call duration and called numbers extraction script

Yesterday I had to extract some data from a CDR report for a client, namely call start time, its duartion and the called number. And while I am sure Google has zillion scripts to be found, it was much faster to hack this one-liner . The script extracts the following fields …



Bash script to generate random passwords

Here I stumbled on an intro into Bash scripting for NetOps by John Kristoff " Introduction to Shell and Perl scripting for Network Operators" and could't help but do it my way. Here it is, bash script that generates random password of printable characters, up to 15 at least. 1 2 …



Check duplex and speed settings of all interfaces in one go

One of the first things you do when checking connectivity issues on the Checkpoint (or any networking gear for that matter) is to see speed and duplex parameters of the interfaces. But have you tried to do it on a firewall with 15-20 interfaces ? No fun entering one by one …



awk weekly - Security rule hits statistics . Checkpoint

As I mentioned before once you export firewall logs into human-readable format you can do lots of interesting things - for example script that gives statistics of how many times each Security rule was hit . Be aware that this counts explicit Security rules only - i.e. the ones you see in …



See what your users are doing - awk one-line scripts to parse Aladdin eSafe logs

HISTORICAL NOTE Aladdin was an Israeli company known for its security eTokens and mail filtering appliances - eSafe. In 2009 it was bought by Safenet primarily for the token/DRM line, and soon the eSafe appliance was discontinued. Later the Safenet was in turn acquired by Gemalto. You can read about …



List of valid domain names for load testing DNS

I am currently running a bunch of tests on DNS resolver software called Unbound to see what it is worth and for that needed a list of valid domain names in different but controllable TLDs. The only resource to download such list I could find was 3 million records file …



SSH brute force is on the rise, awk script to count failed SSH attempts

SSH brute forcing is still in high demand. I have , for my own testing and pleasure, virtual servers scattered around the world. All of them being of the Linux/BSD family I manage by SSH. Also I have on purpose no static IP at home for various reasons (saving me …



Schedule fw monitor to run unattended via cron

Not a groundbreaking idea but worth remembering that you can also run scheduled fw monitor using the cron. In case you have some problem occurring at the late night hours or you want to run debug at night when system is loaded less or put your case here this is …



Alert on change of SOA in domain

This comes from unpleasant experience of mine. One of my clients’ domain records (MX for the case involved) was mistakenly changed. While it was a human error and trying to fix humans is rolling the rock of Sisyphus,damage would be much lesser had I known about the change immediately …