A tool to generate Hexadecimal strings with high entropy using Node.js.
- Secure Generation: Uses Node.js
cryptomodule for cryptographically secure random hex strings (CSPRNG). - Entropy Calculation: Calculates real-time Shannon Entropy (0.0 - 4.0) for every string.
- Filtering & Sorting: Set minimum target scores and get results automatically sorted by entropy.
- Peak Detection: Built-in
--scanmode to find the top highest entropy samples (N samples based on-n). - Flexible Output: Supports standard text output, hidden scores, or formatted JSON data.
- Zero Dependencies: Runs on standard Node.js without needing any external packages.
npx -y https://gist.github.com/802a0e0f3308e8a5fff587e5dca7be65 [options]node index.js [options]| Argument | Description | Default | Valid Values |
|---|---|---|---|
-l, --length |
Length of the hex string | 64 | Positive Integer |
-s, --score |
Minimum entropy score | 3.5 | 0.0 - 4.0 |
-n, --count |
Number of strings to generate | 1 | Positive Integer |
-m, --max-attempts |
Max attempts per string to reach score | 1000 | Positive Integer |
--scan |
Scan for peak entropy (Finds top N samples based on -n) | false | Flag |
--hide-score |
Output only the hex string | false | Flag |
--json |
Output results as JSON array | false | Flag |
1. Generate 5 strings of length 32:
node index.js -l 32 -n 5Output:
3.7570 4ac3b64e59174189c44d5fae47025272
3.6914 a8737a0974580a6e2f6818ec562d5a8c
3.6556 b2a0431e7f1b8090acbfb6803a4f819e
3.6320 c1c247c93c03f4ce50c875fa32a76ae6
3.5389 690b9a0b83729ceaba6552e0908fb3ee
2. Scan for peak entropy (Find top highest entropy hex samples):
node index.js -l 32 --scan -n 5Output:
3.9292 aae127583fb213c759768cd39edb06d4
3.9292 3d80c2659eb45e90bd036c17ff16a834
3.9292 042b61178bfd09ef226ca557da18936c
3.9292 e5f10a2a3d0d8576c442369bcb0784e2
3.9139 964fcd0c4ea674f4238517e813ab9dab
3. Generate only the hex string (useful for piping):
node index.js -l 16 --hide-scoreOutput:
ce0a8689fc79355d
4. Generate results in JSON format:
node index.js -l 16 -n 2 --jsonOutput:
[
{
"value": "a98d5128f16301ce",
"entropy": 3.5778
},
{
"value": "4830df5cdb270e73",
"entropy": 3.5000
}
]