mirror of
https://github.com/gchq/CyberChef
synced 2024-12-26 12:33:11 +00:00
Merge branch 'master' into feature-key-derivation-hashers
This commit is contained in:
commit
4f844ea837
4 changed files with 5 additions and 16 deletions
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "cyberchef",
|
"name": "cyberchef",
|
||||||
"version": "5.3.0",
|
"version": "5.3.1",
|
||||||
"description": "The Cyber Swiss Army Knife for encryption, encoding, compression and data analysis.",
|
"description": "The Cyber Swiss Army Knife for encryption, encoding, compression and data analysis.",
|
||||||
"author": "n1474335 <n1474335@gmail.com>",
|
"author": "n1474335 <n1474335@gmail.com>",
|
||||||
"homepage": "https://gchq.github.io/CyberChef",
|
"homepage": "https://gchq.github.io/CyberChef",
|
||||||
|
|
|
@ -88,17 +88,12 @@ const Entropy = {
|
||||||
runFreqDistrib: function (input, args) {
|
runFreqDistrib: function (input, args) {
|
||||||
if (!input.length) return "No data";
|
if (!input.length) return "No data";
|
||||||
|
|
||||||
let distrib = new Array(256),
|
let distrib = new Array(256).fill(0),
|
||||||
percentages = new Array(256),
|
percentages = new Array(256),
|
||||||
len = input.length,
|
len = input.length,
|
||||||
showZeroes = args[0],
|
showZeroes = args[0],
|
||||||
i;
|
i;
|
||||||
|
|
||||||
// Initialise distrib to 0
|
|
||||||
for (i = 0; i < 256; i++) {
|
|
||||||
distrib[i] = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Count bytes
|
// Count bytes
|
||||||
for (i = 0; i < len; i++) {
|
for (i = 0; i < len; i++) {
|
||||||
distrib[input[i]]++;
|
distrib[input[i]]++;
|
||||||
|
|
|
@ -713,13 +713,9 @@ const IP = {
|
||||||
ip2 = IP._strToIpv6(range[14]);
|
ip2 = IP._strToIpv6(range[14]);
|
||||||
|
|
||||||
let t = "",
|
let t = "",
|
||||||
total = new Array(128),
|
total = new Array(128).fill(),
|
||||||
i;
|
i;
|
||||||
|
|
||||||
// Initialise total array to "0"
|
|
||||||
for (i = 0; i < 128; i++)
|
|
||||||
total[i] = "0";
|
|
||||||
|
|
||||||
for (i = 0; i < 8; i++) {
|
for (i = 0; i < 8; i++) {
|
||||||
t = (ip2[i] - ip1[i]).toString(2);
|
t = (ip2[i] - ip1[i]).toString(2);
|
||||||
if (t !== "0") {
|
if (t !== "0") {
|
||||||
|
|
|
@ -385,7 +385,7 @@ const StrUtils = {
|
||||||
runOffsetChecker: function(input, args) {
|
runOffsetChecker: function(input, args) {
|
||||||
let sampleDelim = args[0],
|
let sampleDelim = args[0],
|
||||||
samples = input.split(sampleDelim),
|
samples = input.split(sampleDelim),
|
||||||
outputs = [],
|
outputs = new Array(samples.length),
|
||||||
i = 0,
|
i = 0,
|
||||||
s = 0,
|
s = 0,
|
||||||
match = false,
|
match = false,
|
||||||
|
@ -397,9 +397,7 @@ const StrUtils = {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initialise output strings
|
// Initialise output strings
|
||||||
for (s = 0; s < samples.length; s++) {
|
outputs.fill("", 0, samples.length);
|
||||||
outputs[s] = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
// Loop through each character in the first sample
|
// Loop through each character in the first sample
|
||||||
for (i = 0; i < samples[0].length; i++) {
|
for (i = 0; i < samples[0].length; i++) {
|
||||||
|
|
Loading…
Reference in a new issue