Comparing version 1.8.2 to 1.8.3
22
ntlm.js
@@ -10,2 +10,4 @@ /** | ||
var crypto = require('crypto'); | ||
var jsmd4 = require("js-md4"); | ||
var desjs = require("des.js"); | ||
@@ -277,4 +279,6 @@ var flags = { | ||
var key = insertZerosEvery7Bits(buf); | ||
var des = crypto.createCipheriv('DES-ECB', key, ''); | ||
return des.update("KGS!@#$%"); // page 57 in [MS-NLMP]); | ||
var des = desjs.DES.create({type: 'encrypt', key: key}); | ||
var magicKey = new Buffer.from('KGS!@#$%', 'ascii'); // page 57 in [MS-NLMP] | ||
var encrypted = des.update(magicKey); | ||
return Buffer.from(encrypted); | ||
} | ||
@@ -370,3 +374,3 @@ | ||
var buf = new Buffer(password, 'utf16le'); | ||
var md4 = crypto.createHash('md4'); | ||
var md4 = jsmd4.create(); | ||
md4.update(buf); | ||
@@ -384,10 +388,10 @@ return new Buffer(md4.digest()); | ||
var des = crypto.createCipheriv('DES-ECB', insertZerosEvery7Bits(passHashPadded.slice(0,7)), ''); | ||
resArray.push( des.update(server_challenge.slice(0,8)) ); | ||
var des = desjs.DES.create({type: 'encrypt', key: insertZerosEvery7Bits(passHashPadded.slice(0,7))}); | ||
resArray.push( Buffer.from(des.update(server_challenge.slice(0,8))) ); | ||
des = crypto.createCipheriv('DES-ECB', insertZerosEvery7Bits(passHashPadded.slice(7,14)), ''); | ||
resArray.push( des.update(server_challenge.slice(0,8)) ); | ||
des = desjs.DES.create({type: 'encrypt', key: insertZerosEvery7Bits(passHashPadded.slice(7,14))}); | ||
resArray.push( Buffer.from(des.update(server_challenge.slice(0,8))) ); | ||
des = crypto.createCipheriv('DES-ECB', insertZerosEvery7Bits(passHashPadded.slice(14,21)), ''); | ||
resArray.push( des.update(server_challenge.slice(0,8)) ); | ||
des = desjs.DES.create({type: 'encrypt', key: insertZerosEvery7Bits(passHashPadded.slice(14,21))}); | ||
resArray.push( Buffer.from(des.update(server_challenge.slice(0,8))) ); | ||
@@ -394,0 +398,0 @@ return Buffer.concat(resArray); |
{ | ||
"name": "httpntlm", | ||
"description": "httpntlm is a Node.js library to do HTTP NTLM authentication", | ||
"version": "1.8.2", | ||
"version": "1.8.3", | ||
"dependencies": { | ||
"des.js": "^1.0.1", | ||
"httpreq": ">=0.4.22", | ||
"js-md4": "^0.3.2", | ||
"underscore": "~1.12.1" | ||
@@ -48,3 +50,6 @@ }, | ||
} | ||
] | ||
} | ||
], | ||
"devDependencies": { | ||
"rewire": "^6.0.0" | ||
} | ||
} |
@@ -9,8 +9,11 @@ # httpntlm | ||
[!["Buy Me A Coffee"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/samdecrock) | ||
Help keep my open source project alive! Your donation, no matter how small, makes a real difference. | ||
Thank you for your support! | ||
[![](https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=LPYD83FGC7XPW) | ||
[![](http://neat.be/paypal-donate-button.webp)](https://www.paypal.com/donate/?hosted_button_id=2CKNJLZJBW8ZC) [!["Buy Me A Coffee"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/samdecrock) | ||
## Install | ||
@@ -34,3 +37,3 @@ | ||
}, function (err, res){ | ||
if(err) return err; | ||
if(err) return console.log(err); | ||
@@ -195,3 +198,13 @@ console.log(res.headers); | ||
## Contributing | ||
Running tests in an open source package is crucial for ensuring the quality and reliability of the codebase. When you submit code changes, it's essential to ensure that these changes don't break existing functionality or introduce new bugs. | ||
To run the tests, simply run | ||
node test.js | ||
All tests should return `true` | ||
## License (MIT) | ||
@@ -198,0 +211,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
32029
7
500
228
4
1
+ Addeddes.js@^1.0.1
+ Addedjs-md4@^0.3.2
+ Addeddes.js@1.1.0(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedjs-md4@0.3.2(transitive)
+ Addedminimalistic-assert@1.0.1(transitive)