Posts

Showing posts from September, 2023

This is a SAMPLE TESTING MESSAGE sent through Cell Broadcasting System by Department of Telecommunication

Image
  This is a SAMPLE TESTING MESSAGE sent through Cell Broadcasting System by Department of Telecommunication, Government of India. Please ignore this message as no action is required from your end. This message has been sent to test Pan-India Emergency Alert System being implemented by National Disaster Management Authority. It aims to enhance public safety and provide timely alerts during emergencies. Timestamp: 12-10-2023 12:13 PM 21

Google's 25th Birthday - Google turns 25, celebrates birthday with a doodle.

Image
Google, everyone's favourite search engine, turned 25 years old on Wednesday and is celebrating its birthday with a doodle. Taking a “walk down memory lane”, the company showcased different doodles on its birthday over the years. The latest one comes with a GIF which turns ‘Google’ into ‘G25gle’ - marking the 25 years.

Shell script to check domain expiry date and send alerts to Slack on Ubuntu

  1. Create a file with list of domain names vi /home/ubuntu/domain_names.txt example.com example.in example.org exp123.com 2. Create a shell script for domain expiry check vi /home/ubuntu/domain-expiry-check.sh #!/bin/bash #Specify all the domains you want to check WEBSITE_LIST=` cat /home/ubuntu/domain_names.txt` #WEBSITE_LIST MAX_DAYS=30 MIN_DAYS=1 current_epoch=$( date '+%s' ) for dm in $WEBSITE_LIST do expiry_date=$(curl -s https://www.whatsmydns.net/api/domain?q= $dm | jq --raw-output '.[].expires | select( . != null )' ) echo -n " $dm - Expires on $expiry_date " expiry_epoch=$( date -- date = " $expiry_date " '+%s' ) epoch_diff=$((expiry_epoch - current_epoch)) days=$((epoch_diff / 86400 )) if [[ $days -lt $MAX_DAYS && $days -gt $MIN_DAYS ]]; then echo -n " $dm - Expires on $expiry_date and $days days remaining. " curl -X POST -H 'Content-type: application/json' -...