Convert decimal to hex in Bash?

A quicky for my archives: Convert decimal to hex in Bash, and hexadecimal to decimal. In mathematics and computing, hexadecimal (also base 16, or hex) is a positional numeral system with a radix, or base, of 16. It uses sixteen distinct symbols, most often the symbols 0-9 to represent values zero to nine, and A, B, C, D, E, F (or alternatively a-f) to represent values ten to fifteen. If you want to convert hexadecimal values to decimal and decimal values to hexadecimal, here’s how. All on the bash prompt…

Continue reading “Convert decimal to hex in Bash?”

How to delete all MAILER-DAEMON emails in Postfix queue

How to delete all MAILER-DAEMON emails from your Postfix queue, when it matches a sender or recipient email address condition. When a large scale spam run was sent through your mail servers, you need to clean up and remove those spam messages. Doing so guarantees normal, valid email messages being sent quickly, and the spam messages never leave your queue. In Postfix, there are various similar commands to delete messages from the Postfix mail queue. Based on the Message-ID and/or email address…

Continue reading “How to delete all MAILER-DAEMON emails in Postfix queue”

TLS: Test SMTP AUTH PLAIN authentication and verify StartTLS connections

Test StartTLS/TLS SMTP connections with OpenSSL, and SMTP-authentication from the Linux and Windows command line. While investigating SMTP authentication issues, over an Transport Layer Security (TLS) encrypted SMTP connection, it’s always handy if you are able to test the SMTP authentication and StartTLS connection from the command line.

Continue reading “TLS: Test SMTP AUTH PLAIN authentication and verify StartTLS connections”

Grep for forensic log parsing and analysis on Windows Server IIS

Use GnuWin32 ported tools like grep.exe and find.exe to find backdoor files in websites, check visitor’s IP addresses or hits to backdoors in IIS log files: forensic log analysis with grep. Search for Joomla, WordPress, Drupal PHP backdoors within your website, clean up a hacked website and keep a website secure.

Continue reading “Grep for forensic log parsing and analysis on Windows Server IIS”

Check IP address blacklist status in Bash

Here is a Linux Bash shell script to check whether an IP address is listed in a DNSBL blacklist, or RBL. This is a modified version of a by J65nko posted Bash script to check an IP address reputation status in several blacklists. I’ve added HttpBl as backlist and an API key is required for this list. Using this script in Bash you can quickly test if an IP address is blacklisted.

Continue reading “Check IP address blacklist status in Bash”