Uspector – DNS, SSL, Web & PHP Security Diagnostics
Uspector is a Python library and command-line tool for DNS diagnostics, SSL/TLS inspection, certificate validation, passive web security diagnostics, and remote PHP security checks.
It helps developers and security professionals inspect TLS configurations, review certificate details, analyze important DNS records, and identify common web security, PHP information disclosure, and SEO configuration issues.
Check out our official website: uspector.net
Installation
Install from PyPI:
pip install uspector
Upgrade to the latest version:
pip install --upgrade uspector
Requirements: Python 3.10 or later.
Command-Line Interface
Uspector provides separate commands for DNS diagnostics, TLS inspection, web diagnostics, and remote PHP security checks.
DNS diagnostics
Scan a domain:
uspector dns example.com
Check a DKIM selector, set a custom query timeout, or skip DNSSEC / extended record lookups:
uspector dns example.com --dkim-selector default --no-dnssec
uspector dns example.com -t 4 --no-extended
The DNS scanner inspects common DNS records (A, AAAA, CNAME, MX, NS, TXT, CAA, and SOA), evaluates SPF/DMARC/DKIM/CAA/NS/SOA hygiene, detects Null MX (0 .), and inspects DNSSEC-related records (DS, DNSKEY, RRSIG).
DNSSEC inspection checks record presence, deprecated DNSKEY algorithms, and RRSIG expiration; it does not perform cryptographic DNSSEC chain validation.
TLS and certificate inspection
Scan a hostname:
uspector tls example.com
Specify a custom port, connection timeout, STARTTLS protocol (smtp, imap, ftp), or weak-cipher probing:
uspector tls example.com -p 8443 -t 10
uspector tls example.com -p 587 --starttls smtp --probe-weak-ciphers
Use this to inspect TLS connectivity, certificate properties, hostname/SAN validation, certificate expiration and hygiene, intermediate chain quality, OCSP status/validation, supported TLS versions (TLSv1.0–TLSv1.3), cipher suites, and connection diagnostics.
Web security and SEO diagnostics
Scan a website:
uspector web example.com
Specify a complete URL, custom timeout, private-IP blocking (--no-private), or metadata checks (--check-metadata):
uspector web https://example.com -t 10
uspector web https://example.com --no-private --check-metadata
The web scanner follows HTTP redirects and reports the final URL, HTTP status, resolved IP addresses, security headers and directive quality, cookie attributes across redirects, passive client-side/HTML/body security indicators, and on-page SEO diagnostics.
Remote PHP security diagnostics
Scan a website for PHP-related security indicators and information disclosure:
uspector php example.com
Specify a complete URL and custom timeout:
uspector php https://example.com -t 15
The PHP scanner performs passive, remote HTTP-based checks for PHP technology and framework detection, version and EOL lifecycle disclosure, PHP session cookie attributes, exposed phpinfo() pages, PHP error messages, publicly accessible configuration and backup files, and directory listing indicators.
The scanner does not execute PHP code or directly inspect the server's PHP configuration. Detection depends on information exposed through HTTP responses, and non-global/localhost targets are blocked.
JSON output & exit codes
All scanners support structured JSON output:
uspector dns example.com --json
uspector tls example.com --json
uspector web example.com --json
uspector php example.com --json
CLI exit codes:
0: Scan completed successfully1: Scan error, complete TLS handshake failure, or all DNS record queries failed2: Invalid CLI input or argument type
Python API
Uspector exposes DNSScanner, TLSScanner, WebScanner, and PHPScanner for use in Python applications.
DNS scanning
from uspector import DNSScanner
scanner = DNSScanner()
result = scanner.scan("example.com", dkim_selector="default", check_extended=True)
print(result)
check_extended=True enables optional lookups for MTA-STS, TLS-RPT, BIMI, TLSA (DANE), HTTPS, SVCB, NSEC/NSEC3, dangling CNAME targets, and FCrDNS.
TLS scanning
from uspector import TLSScanner
scanner = TLSScanner(timeout=5.0)
result = scanner.check_tls(
"example.com",
443,
probe_weak_ciphers=False,
starttls=None, # Optional: "smtp", "imap", or "ftp"
)
print(result)
Web scanning
from uspector import WebScanner
# Set allow_private=False to block localhost/private-IP targets and redirects.
# Set check_metadata=True to also inspect security.txt, robots.txt, and HTTPS redirects.
scanner = WebScanner(timeout=15.0, allow_private=True, check_metadata=False)
result = scanner.scan("https://example.com")
print(result)
PHP scanning
from uspector import PHPScanner
scanner = PHPScanner(timeout=10.0)
result = scanner.scan("https://example.com")
print(result)
All scanners return structured results that can be processed by other Python code, incorporated into diagnostic workflows, or serialized for reporting.
Features
DNS diagnostics
- IPv4 (
A) and IPv6 (AAAA) record lookups CNAMErecord inspection (withA/AAAAfallback deduplication and optional danglingNXDOMAINcheck)- Mail server (
MX) and name server (NS) discovery, redundancy checks, IP-literal detection, and Null MX (0 .) awareness TXTrecord inspection, including verification,SPF,DMARC, andDKIMrecordsSPFpolicy checks (+all/?all, deprecatedptr, missing terminator, and 10-DNS-lookup limit)DMARCpolicy and tag checks (p,sp,pct,rua/ruf)- Optional
DKIMselector checks (presence, revokedp=, test modet=y, and RSA key bit-length) CAArecord and tag inspection (issue,issuewild,iodef)SOArecord details and timer sanity checksDNSSEC-related inspection (DS,DNSKEYdeprecated algorithms,RRSIGexpiration)- Optional extended checks (
MTA-STS,TLS-RPT,BIMI,TLSA,HTTPS,SVCB,NSEC/NSEC3, andFCrDNS)
DNSSEC records are inspected for presence, algorithm hygiene, and signature expiration; full cryptographic chain validation is not performed.
SSL/TLS inspection
- TLS connection testing and fallback diagnostic handshakes (plus optional
STARTTLSforsmtp,imap,ftp) - Certificate trust, SAN hostname/IP validation, and single-label wildcard rejection
- Certificate expiration, validity span (
> 398days), signature hash (MD5/SHA1),BasicConstraints,ExtendedKeyUsage, embedded SCT presence, and CRL distribution points - Intermediate certificate chain completeness (Python 3.13+) and intermediate key/expiry/signature hygiene
- OCSP revocation queries with CertID, freshness, and cryptographic signature validation (with SSRF-guarded AIA
caIssuersfallback) - Supported TLS version probing (
TLSv1.0–TLSv1.3), weak/non-PFS cipher suite detection, and optional weak-cipher probing (probe_weak_ciphers=True) - DNS resolution, connected peer IP, ALPN, and structured findings/verdict
Web security diagnostics
- HTTP response status, redirect chain cookies, and final destination (with optional
allow_private=FalseSSRF protection) - Security-header presence and directive auditing (
Content-Security-Policy&Report-Only,Strict-Transport-Securitymax-age/includeSubDomains,X-Content-Type-Options,X-Frame-Options,Referrer-Policy,Permissions-Policy) - Cross-origin isolation header observation (
COOP,COEP,CORP,X-Permitted-Cross-Domain-Policies), passive CORS (*+ credentials),Cache-Controlon cookie-setting responses, and server version banner checks - Cookie security-attribute checks across redirects (
Secure,HttpOnly, and validSameSitevalues) - Passive HTML and body security checks: mixed content, missing Subresource Integrity (
SRI),target="_blank"withoutnoopener/noreferrer, insecure password forms, source map references, internal IP leaks in URLs/comments, and framework error/stack-trace indicators - Optional metadata checks (
check_metadata=True):/.well-known/security.txt,/robots.txtsensitiveDisallow:entries, and HTTP-to-HTTPS redirect enforcement
PHP security diagnostics
- Remote PHP technology and passive framework detection (
Laravel,CakePHP,Symfony,WordPress,Drupal,Joomla,Magento,TYPO3) - PHP version disclosure and end-of-life (EOL) branch detection
- PHP and framework session cookie attribute checks (
PHPSESSID,laravel_session,CAKEPHP,SYMFONY) - Detection of publicly accessible
phpinfo()pages (main page and common filenames) - Expanded PHP warning, notice, fatal/deprecated error,
PDOException/SQLSTATE, and Ignition/Whoops stack-trace indicators - Content-verified checks for publicly accessible backup,
.env,php.ini,.user.ini, andcomposer.json/composer.lockfiles (including riskyphp.ini/.user.inidirectives and exposedrequire-devmetadata) - PHP-related directory listing detection
- Security findings with severity levels, remediation recommendations, and overall risk verdict
PHP checks are performed remotely through HTTP responses against publicly routable hosts. The scanner cannot determine the actual PHP version or configuration when this information is not publicly disclosed. File exposure indicators should be interpreted in context and do not automatically indicate a vulnerability.
SEO diagnostics
- HTML title presence and length checks (ignoring inline SVG
<title>elements) - Meta description presence and length checks
- Canonical URL detection
- Meta robots and
X-Robots-Taginspection - H1 heading count
- HTML language attribute detection
- Image alternative-text checks (distinguishing missing
altattributes from decorativealt="") - Open Graph title and description presence
- Detection of
noindexdirectives
SEO checks are basic diagnostics, not a complete SEO audit. Findings such as title length or missing image alternative text should be interpreted in context.
Understanding the Results
Uspector returns structured diagnostic information rather than a simple pass/fail result.
Depending on the scanner, results can include:
| Result | Description |
|---|---|
| DNS records | Observed DNS records (A, AAAA, CNAME, MX, NS, TXT, CAA, SOA, etc.) |
| Email security | SPF, DMARC, DKIM, Null MX, and optional MTA-STS/TLS-RPT/BIMI checks |
| DNSSEC records | Presence, algorithm hygiene, and RRSIG expiry inspection; not full validation |
| Target | Hostname or URL being scanned |
| Status code | HTTP response status (top-level for web scans; per-file inside exposed_files for PHP scans) |
| Final URL | Destination after redirects (web scans) |
| Resolved IPs | IP addresses resolved during scanning (TLS and web scans) |
| Certificate details | Trust, hostname validity, expiration, signature/chain hygiene, and SAN properties |
| OCSP | Responder URL, unvalidated or cryptographically validated revocation status |
| Security headers | Observed HTTP security-header values (web scans) |
| PHP detection | PHP technology, framework, version disclosure, and EOL indicators |
| Exposed files | Potentially accessible configuration, backup, and diagnostic files (PHP scans) |
| Findings | Detected configuration concerns or indicators |
| Verdict | Overall scan summary (TLSScanner and PHPScanner) |
| SEO | HTML and indexing-related diagnostics (web scans) |
| Error | Error information when a scan cannot complete |
A reported missing DNS record, security header, or PHP indicator is an observation, not necessarily proof that a system is vulnerable. Findings should be assessed according to the domain's configuration, the site's architecture, intended behavior, and security requirements.
Requirements
- Python 3.10 or later
- Internet connectivity to the target host
- Dependencies installed automatically by pip
Responsible Use
Uspector is intended for legitimate diagnostic, educational, troubleshooting, and defensive security purposes.
DNS, TLS, web, and PHP diagnostic results are informational and should be validated before making security decisions.
The remote PHP scanner performs HTTP-based inspection only. It does not execute PHP code, modify remote files, or attempt to exploit vulnerabilities.
Project Structure
uspector-net/
├── img/ # Logo and media assets
├── src/
│ └── uspector/
│ ├── _http.py # Shared HTTP/cookie/SSRF helpers
│ ├── dnsscanner.py # DNS diagnostics
│ ├── tlsscanner.py # TLS inspection
│ ├── webscanner.py # Web security and SEO diagnostics
│ ├── phpscanner.py # Remote PHP security diagnostics
│ └── cli.py # Command-line interface
├── tests/ # Automated tests
├── LICENSE # MIT License
├── README.md # Project documentation
├── SECURITY.md # Security policy
└── pyproject.toml # Package configuration and dependencies
License
Uspector is licensed under the MIT License. See LICENSE for details.
© 2026 Menahem Levinski
🔝 Back to top
Metadata
Release files for uspector 1.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| uspector-1.1.3.tar.gz | 197.0 kB | Without provenance | Details for uspector-1.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| uspector-1.1.3-py3-none-any.whl | Python 3 | none | any | Details for uspector-1.1.3-py3-none-any.whl |
Total release size: 250.2 kB
Release files / uspector-1.1.3.tar.gz
| Download URL | uspector-1.1.3.tar.gz |
|---|---|
| Size | 197.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6878e071d9cc5a63ce86265ecf1ad54054eb9aa5fd51b704e1f7cfc685967f1b
|
|
BLAKE2b-256 checksum How to use checksums |
cbd875e3e6b5a2549abfea42ee63b10bb270a8a23fb2c1c338dd7615df6c5f9b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.5
|
Release files / uspector-1.1.3-py3-none-any.whl
| Download URL | uspector-1.1.3-py3-none-any.whl |
|---|---|
| Size | 53.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
66f05d2b1f2fce55a4e8e70cfcbbcc9ccaffd57f26c7b4d0e3cb782af1841319
|
|
BLAKE2b-256 checksum How to use checksums |
87aa4c59845f69893a5b232c83b884b2271f52872f3b18c6cc232e5a8dacdc4b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.5
|
Security for uspector 1.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.