Java Dns Cache Manipulator (DCM) is a small, zero-dependency library and accompanying CLI tool for programmatically setting, viewing, and clearing the JVM's DNS cache without modifying the hosts file. It works by using reflection to access private fields of `java.net.InetAddress` and `sun.net.InetAddressCachePolicy`. The library handles both pre-JDK 9 (old `InetAddress.CacheEntry` model) and JDK 9+ (new `CachedAddresses`/`CachedLookup` model), making it compatible with JDK 8 through 26. The tool module uses the Java Attach API to inject a Java agent into a running JVM process to execute commands like get, set, remove, list, or clear DNS cache entries. The code is well-structured with clear separation between API, internal implementation, agent, and tool modules. It is thread-safe, immutable value objects (DnsCacheEntry, DnsCache) are used, and extensive Kotlin-based tests ensure correctness across multiple JDK versions.
openSquat is a CLI tool for detecting domain squatting threats including phishing, typosquatting, IDN homograph attacks, doppelgΓ€nger domains, and bitsquatting. It operates in three modes: Community (free NRD feed), Premium Feed (paid NRD feed with local Levenshtein detection), and Premium API (server-side lookalike API queries). The tool processes keywords against domain feeds using optimized Levenshtein distance with early exit, integrates with VirusTotal, Quad9 DNS, Certificate Transparency, and phishing databases, and outputs results in TXT, JSON, or CSV formats. Architecture features modular components for feed management, DNS validation, squatting detection, API client, and output handling, with parallel processing for performance.