@anonympins/fingerprint 0.5.2 → 0.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/package.json +1 -1
- package/src/js/fingerprint.client.js +1271 -1191
- package/src/js/fingerprint.js +202 -108
- package/src/js/fingerprint.utils.js +213 -213
- package/src/js/library.js +24 -8
- package/src/js/mongodb-store.js +165 -79
- package/src/js/pow.solver.inline.js +500 -14
- package/src/js/pow.solver.js +323 -14
- package/src/js/problem-manager.js +1 -1
- package/src/js/redis-store.js +114 -42
- package/src/js/tests/dns-circuit-breaker.test.js +55 -0
- package/src/js/tests/fingerprint.client.init.test.js +143 -143
- package/src/js/tests/fingerprint.client.test.js +128 -128
- package/src/js/tests/fingerprint.test.js +32 -2
- package/src/js/tests/ip-reputation.test.js +1 -1
- package/src/js/tests/pow.solver.test.js +5 -2
- package/src/js/tests/usefulWorkSolver.test.js +162 -0
- package/src/php/Challenge/ChallengeUtils.php +21 -8
- package/src/php/FingerprintClient.php +22 -5
- package/src/php/FingerprintEngine.php +232 -56
- package/src/php/Optimization/Optimization.php +23 -16
- package/src/php/Optimization/OptimizationOperators.php +27 -0
- package/src/php/ProblemManager.php +1 -1
- package/src/php/Store/MongoDbStore.php +184 -104
- package/src/php/Store/RedisStore.php +91 -11
- package/src/php/Tests/ChallengeUtilsTest.php +285 -285
- package/src/php/Tests/DnsCircuitBreakerTest.php +106 -0
- package/src/php/Tests/IpReputationTest.php +1 -1
- package/src/php/Tests/PowTest.php +1 -1
- package/src/php/Tests/RequestUtilsTest.php +29 -0
- package/src/php/Tests/TLSClientHelloParserTest.php +177 -117
- package/src/php/Utils/BigInt.php +202 -202
- package/src/php/Utils/RequestUtils.php +74 -21
- package/src/php/Utils/TLSClientHelloParser.php +212 -116
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
## Version 0.5.4
|
|
2
|
+
|
|
3
|
+
- **🔒 JA3/JA4 Handshake Parsing Hardening (PHP/Python)**: Fixed ALPN length constraints and untangled nested loops in the binary TLS Client Hello decoder, ensuring native and highly reliable raw JA4 fingerprint calculations directly at the socket layer.
|
|
4
|
+
- **⚡ Dynamic WebAssembly (WASM) & Memory Safety**: Secured heap memory allocation and the dynamic loading of the polymorphic WASM module. Added comprehensive client-side unit tests to validate safe execution and clean memory deallocation.
|
|
5
|
+
- **🛠️ Useful Proof-of-Work (uPoW) & Integration Tests**: Finalized the end-to-end integration and orchestration of uPoW tasks, backed by robust validation tests for multi-objective optimization models (specifically CPC and fraud detection).
|
|
6
|
+
- **🛡️ Store Resilience & CHIPS Cookie Support**: Enhanced fault tolerance for Redis and MongoDB database adapters with seamless, automatic fallback to local in-memory storage during network drops. Standardized CHIPS (`Partitioned`) cookie attributes across secure HTTPS environments.
|
|
7
|
+
- **📁 Deterministic Path Resolution Fixes**: Implemented robust absolute and relative path resolution for loading configuration files (such as `problems.config.json`) uniformly across Node.js, PHP, and Python environments.
|
|
8
|
+
|
|
9
|
+
## Version 0.5.3
|
|
10
|
+
|
|
11
|
+
- **DNS Circuit Breaker with Strict Timeouts**: Protected reverse/forward DNS verification of legitimate crawlers against DNS server degradation or DDoS exhaustion. Integrated a stateful Circuit Breaker (`CLOSED`, `OPEN`, `HALF-OPEN`) with a strict **500 ms timeout** and **5-minute temporary negative caching** on resolution failures.
|
|
12
|
+
- **Anti-Poisoning via Hardware Clustering**: Hardened `sanitizeTrafficData` to cluster traffic logs by stable hardware signatures (Canvas + GPU + CPU). Contributions from any single hardware footprint are strictly capped to **2% of the dataset**, neutralizing massive proxy-rotation Sybil attacks designed to manipulate tuning thresholds.
|
|
13
|
+
- **Memory-Safe Traffic Pruning**: Standardized `pruneTrafficData` across Node.js and PHP engines. Includes strict time-based decay and size-capping policy, keeping the in-memory footprint minimal and preventing leaks during long-running background tuning sessions.
|
|
14
|
+
- **Enhanced Subnet Detection**: Upgraded IPv4 and IPv6 subnet masking routines (`getIpSubnet`). Implemented proper binary bitwise masking and IPv6 compression normalization (`::` expansion), ensuring high-reliability network block reputation scoring (`subnetScore`).
|
|
15
|
+
- **Centralized Problem Configuration**: Relocated `problems.config.json` to the central `/config` directory for unified configuration management and cleaner multi-environment deployments.
|
|
16
|
+
- **Stealthy Honeypot Enhancements**: Hardened client-side honeypots by dynamically rendering hidden input elements inside a closed Shadow DOM using nested randomized CSS variables, effectively evading detection by headless crawlers.
|
|
17
|
+
- **Mathematical Benford Test Optimization**: Re-engineered `benfordTest` across JavaScript, PHP, and Python to extract the first significant digit using math operations (logarithms and modulo) instead of string casts, significantly boosting performance on large time-series.
|
|
18
|
+
|
|
1
19
|
## Version 0.5.2
|
|
2
20
|
|
|
3
21
|
- Security updates (CodeQL issues fixed)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anonympins/fingerprint",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.4",
|
|
4
4
|
"description": "Advanced anti-bot library for Node.js using multi-layer fingerprinting (JA3, client-side, headers), behavioral analysis, and adaptive Proof-of-Work (PoW) challenges to mitigate scraping, scalping, and automated threats.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|