recon-cli 0.80.6

Versatile network reconnaissance CLI: HTTP/TLS/DNS, multi-protocol probes, and a Rhai script engine
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Usage: recon --script tls [HOST [PORT]]
//
// TLS certificate inspection: CN, issuer, expiry, days remaining.

let host = if args.len() > 1 { args[1] } else { "example.com" };
let port = if args.len() > 2 { parse_int(args[2]) } else { 443 };
let c = tls(host, port);
print(`${host}:${port}`);
print(`  CN:      ${c.subject.common_name}`);
print(`  issuer:  ${c.issuer.common_name}`);
print(`  expires: ${c.not_after} (${c.days_remaining} days)`);
if c.is_expired { return 2; }
if c.days_remaining < 30 {
    print(`  ⚠ EXPIRES IN < 30 DAYS`);
    return 1;
}
return 0;