fix: use crypto.randomBytes for secure pseudo-random value generation

This commit is contained in:
Julian Speckmann 2025-12-24 04:05:20 +01:00
parent 2c447539d2
commit 11d460f0b8

View File

@ -106,7 +106,7 @@ function createNTLMv2Response(type2message, username, ntlmhash, nonce, targetNam
function createPseudoRandomValue(length) {
var str = '';
while (str.length < length) {
str += Math.floor(Math.random() * 16).toString(16);
str += Math.floor(crypto.randomBytes() * 16).toString(16);
}
return str;
}