Some command-line tools produce nicely coloured output when running on ANSI terminals. However, when saving output of these tools into a text file for sharing, these colors are often lost, either due to copy/pasting that is not aware of colour codes or because the tools themselves detect the redirection and then output plain text only :)
In cases where tools preserve the ANSI colour codes on redirection, tiny aha (ANSI HTML Adapter) tool written by Alexander Matthes can be helpful when sharing the output with others. Its available from Debian packages or as source code at GitHub.
Its HTML output will look like below—this particular output example is from command which red-coloured output parts should catch recipient’s attention.
sslscan example.org:443 | aha --title "sslscan example.org:443" > output.html
Version: -static OpenSSL 1.0.1m-dev xx XXX xxxx Testing SSL server example.org on port 443 TLS renegotiation: Secure session renegotiation supported TLS Compression: Compression disabled Heartbleed: TLS 1.0 not vulnerable to heartbleed TLS 1.1 not vulnerable to heartbleed TLS 1.2 not vulnerable to heartbleed Supported Server Cipher(s): Accepted SSLv3 256 bits DHE-RSA-AES256-SHA Accepted SSLv3 256 bits AES256-SHA Accepted SSLv3 128 bits DHE-RSA-AES128-SHA Accepted SSLv3 128 bits AES128-SHA Accepted SSLv3 128 bits RC4-SHA Accepted SSLv3 128 bits RC4-MD5 Accepted SSLv3 112 bits EDH-RSA-DES-CBC3-SHA Accepted SSLv3 112 bits DES-CBC3-SHA Accepted TLSv1.0 256 bits DHE-RSA-AES256-SHA Accepted TLSv1.0 256 bits AES256-SHA Accepted TLSv1.0 128 bits DHE-RSA-AES128-SHA Accepted TLSv1.0 128 bits AES128-SHA Accepted TLSv1.0 128 bits RC4-SHA Accepted TLSv1.0 128 bits RC4-MD5 Accepted TLSv1.0 112 bits EDH-RSA-DES-CBC3-SHA Accepted TLSv1.0 112 bits DES-CBC3-SHA Preferred Server Cipher(s): SSLv3 256 bits DHE-RSA-AES256-SHA TLSv1.0 256 bits DHE-RSA-AES256-SHA SSL Certificate: Signature Algorithm: sha256WithRSAEncryption RSA Key Strength: 2048 Subject: example.org Altnames: DNS:example.org, DNS:www.example.org Issuer: COMODO RSA Domain Validation Secure Server CA
No comments:
Post a Comment