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 duration 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 in AWK . The script extracts the …



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" https://www.cymru.com/jtk/talks/nanog54-intro-scripting.pdf and could't help but do it my way. Here it is, bash script that generates random password of printable …



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 …



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 …



Scan of the week – scan by country scan by continent

Dis+claimer - all this stuff I bring to your attention is for educational purposes only, and what may be fine and ok here and for me can easily get you somewhere else in trouble so use your discretion here . Happy scanning. "...Don't know much about geography" as the song goes …