Shell – Check SSL Certificate


Just a few minutes after trying to check domain’s SSL Certificate expiry date with python which requires around ten lines of code, I found a shell script which doing that task in just one line, here’s the script

#!/bin/bash

echo | openssl s_client -servername example.com -connect example.com:443 2>/dev/null | openssl x509 -noout -dates

 

source:

Linux ls Color Code


  • * Normal file: White (or the default colour used by the command line window)
  • * Directory: Blue
  • * Symbolic link: Cyan
  • * Pipe: Yellow
  • * Socket: Magenta
  • * Block device driver: Bold yellow foreground, with black background
  • * Character device driver: Bold yellow foreground, with black background
  • * Orphaned syminks: Blinking Bold white, with red background
  • * Missing links: Blinking Bold white, with red background
  • * Archives or compressed files: Red (e.g. .tar, .gz, .zip, .rpm)
  • * Image files: Magenta (.jpg, gif, bmp, png, tif)

source:

http://www.codeunit.co.za/2009/11/05/linux-ls-colour-coding-in-putty/