') + ')', 'gi'); if (regex.test(text)) { found = true; var frag = document.createDocumentFragment(); var parts = text.split(regex); parts.forEach(function(part, i) { if (i % 2 === 0) { frag.appendChild(document.createTextNode(part)); } else { var span = document.createElement('span'); span.className = 'userscript-highlight'; span.textContent = part; frag.appendChild(span); } }); node.parentNode.replaceChild(frag, node); } }); } else if (node.nodeType === 1 && node.childNodes) { // element var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT']; if (!skipTags.includes(node.tagName)) { Array.from(node.childNodes).forEach(highlight); } } } highlight(document.body); // Re-highlight on dynamic content var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1 || node.nodeType === 3) highlight(node); }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Strip utm_, fbclid, gclid, etc. from all links on page (function() { var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid', 'ref', 'ref_src', 'source', 'medium', 'campaign']; function cleanUrl(url) { try { var u = new URL(url, window.location.origin); var changed = false; trackingParams.forEach(function(p) { if (u.searchParams.has(p)) { u.searchParams.delete(p); changed = true; } }); return changed ? u.toString() : url; } catch (e) { return url; } } function cleanLinks() { document.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } cleanLinks(); var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1) { if (node.tagName === 'A') cleanLinks(); node.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Auto-enable theater mode on YouTube (function() { function tryTheater() { var btn = document.querySelector('button[aria-label="Theater mode"], ytd-player #player button[title="Theater mode"]'); if (btn && !btn.classList.contains('activated')) { btn.click(); } } // Try immediately tryTheater(); // Try after navigation (SPA) var lastUrl = location.href; setInterval(function() { if (location.href !== lastUrl) { lastUrl = location.href; setTimeout(tryTheater, 500); } }, 1000); // Also try on player load var observer = new MutationObserver(tryTheater); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Remove or un-stick sticky/fixed headers that block content (function() { function unstick() { document.querySelectorAll('header, nav, [role="banner"], .header, .navbar, .sticky, .fixed-top, [style*="position: fixed"], [style*="position:sticky"]').forEach(function(el) { if (el.style.position === 'fixed' || el.style.position === 'sticky' || getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') { el.style.position = 'static'; el.style.top = 'auto'; el.style.zIndex = 'auto'; } }); } unstick(); var observer = new MutationObserver(unstick); observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] }); })(); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); })(); GitHub - mirecl/tlschecker: Experimental TLS/SSL certificate command line checker · GitHub
Skip to content

Repository files navigation

TLSChecker

Experimental TLS/SSL certificate command-line checker

codecov

Docker run

DockerHub

docker run josebovet/tlschecker:v0.1.10 jpbd.dev

Install

Linux

curl -LO https://github.com/jbovet/tlschecker/releases/download/v0.1.10/tlschecker-linux
mv tlschecker-linux tlschecker
sudo install tlschecker /usr/local/bin/tlschecker

Osx

curl -LO https://github.com/jbovet/tlschecker/releases/download/v0.1.10/tlschecker-macos
mv tlschecker-macos tlschecker
sudo install tlschecker /usr/local/bin/tlschecker

➜ tlschecker --help
Experimental TLS/SSL certificate checker
Usage: tlschecker [OPTIONS] [ADDRESSES]...
Arguments:
[ADDRESSES]...
A space-delimited hosts list to be checked
Options:
-v, --verbose...
Enable verbose to see what is going on
-o <OUTPUT>
Enable verbose to see what is going on
[default: text]
Possible values:
- json: Enable JSON in the output
- text: Enable Text in the output
-h, --help
Print help (see a summary with '-h')
-V, --version
Print version

How to use

➜ tlschecker jpbd.dev expired.badssl.com
➜ ~ tlschecker jpbd.dev expired.badssl.com
--------------------------------------
Hostname: jpbd.dev
Issued domain: sni.cloudflaressl.com
Subject Name :
Country or Region: US
State or Province: California
Locality: San Francisco
Organizational Unit: None
Organization: Cloudflare, Inc.
Common Name: sni.cloudflaressl.com
Issuer Name:
Country or Region: US
Organization: Cloudflare, Inc.
Common Name: Cloudflare Inc ECC CA-3
Valid from: Jul 2 00:00:00 2022 GMT
Valid to: Jul 2 23:59:59 2023 GMT
Days left: 123
Expired: false
Certificate version: 2
Certificate algorithm: ecdsa-with-SHA256
Certificate S/N: 20332696690017175202539153893006852358
Subject Alternative Names:
DNS Name: sni.cloudflaressl.com
DNS Name: jpbd.dev
DNS Name: *.jpbd.dev
Additional Certificates (if supplied):
Chain #1
Subject: "sni.cloudflaressl.com"
Valid from: "Jul 2 00:00:00 2022 GMT"
Valid until: "Jul 2 23:59:59 2023 GMT"
Issuer: "Cloudflare Inc ECC CA-3"
Signature algorithm: "ecdsa-with-SHA256"
Chain #2
Subject: "Cloudflare Inc ECC CA-3"
Valid from: "Jan 27 12:48:08 2020 GMT"
Valid until: "Dec 31 23:59:59 2024 GMT"
Issuer: "Baltimore CyberTrust Root"
Signature algorithm: "sha256WithRSAEncryption"
--------------------------------------
Hostname: expired.badssl.com
Issued domain: *.badssl.com
Subject Name :
Country or Region: None
State or Province: None
Locality: None
Organizational Unit: Domain Control Validated
Organization: None
Common Name: *.badssl.com
Issuer Name:
Country or Region: GB
Organization: COMODO CA Limited
Common Name: COMODO RSA Domain Validation Secure Server CA
Valid from: Apr 9 00:00:00 2015 GMT
Valid to: Apr 12 23:59:59 2015 GMT
Days left: -2879
Expired: true
Certificate version: 2
Certificate algorithm: sha256WithRSAEncryption
Certificate S/N: 99565320202650452861752791156765321481
Subject Alternative Names:
DNS Name: *.badssl.com
DNS Name: badssl.com
Additional Certificates (if supplied):
Chain #1
Subject: "*.badssl.com"
Valid from: "Apr 9 00:00:00 2015 GMT"
Valid until: "Apr 12 23:59:59 2015 GMT"
Issuer: "COMODO RSA Domain Validation Secure Server CA"
Signature algorithm: "sha256WithRSAEncryption"
Chain #2
Subject: "COMODO RSA Domain Validation Secure Server CA"
Valid from: "Feb 12 00:00:00 2014 GMT"
Valid until: "Feb 11 23:59:59 2029 GMT"
Issuer: "COMODO RSA Certification Authority"
Signature algorithm: "sha384WithRSAEncryption"
Chain #3
Subject: "COMODO RSA Certification Authority"
Valid from: "May 30 10:48:38 2000 GMT"
Valid until: "May 30 10:48:38 2020 GMT"
Issuer: "AddTrust External CA Root"
Signature algorithm: "sha384WithRSAEncryption"~
➜ tlschecker jpbd.dev -o json
[
{
"hostname": "jpbd.dev",
"subject": {
"country_or_region": "US",
"state_or_province": "California",
"locality": "San Francisco",
"organization_unit": "None",
"organization": "Cloudflare, Inc.",
"common_name": "sni.cloudflaressl.com"
},
"issued": {
"country_or_region": "US",
"organization": "Cloudflare, Inc.",
"common_name": "Cloudflare Inc ECC CA-3"
},
"valid_from": "Jul 2 00:00:00 2022 GMT",
"valid_to": "Jul 2 23:59:59 2023 GMT",
"validity_days": 123,
"is_expired": false,
"cert_sn": "20332696690017175202539153893006852358",
"cert_ver": "2",
"cert_alg": "ecdsa-with-SHA256",
"sans": [
"sni.cloudflaressl.com",
"jpbd.dev",
"*.jpbd.dev"
],
"chain": [
{
"subject": "sni.cloudflaressl.com",
"issuer": "Cloudflare Inc ECC CA-3",
"valid_from": "Jul 2 00:00:00 2022 GMT",
"valid_to": "Jul 2 23:59:59 2023 GMT",
"signature_algorithm": "ecdsa-with-SHA256"
},
{
"subject": "Cloudflare Inc ECC CA-3",
"issuer": "Baltimore CyberTrust Root",
"valid_from": "Jan 27 12:48:08 2020 GMT",
"valid_to": "Dec 31 23:59:59 2024 GMT",
"signature_algorithm": "sha256WithRSAEncryption"
}
]
}
]

About

Experimental TLS/SSL certificate command line checker

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages