Socket
Socket
Sign inDemoInstall

httpntlm

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

httpntlm - npm Package Compare versions

Comparing version 1.4.0 to 1.4.1

.jshintrc

13

httpntlm.js

@@ -0,1 +1,3 @@

'use strict';
var async = require('async');

@@ -35,2 +37,3 @@ var url = require('url');

},
timeout: options.timeout || 0,
agent: keepaliveAgent

@@ -49,4 +52,4 @@ }, $);

headers['Connection'] = 'Close';
headers['Authorization'] = type3msg;
headers.Connection = 'Close';
headers.Authorization = type3msg;

@@ -57,3 +60,5 @@ httpreq[method](options.url, {

agent: keepaliveAgent,
body: body
body: body,
timeout: options.timeout || 0,
binary: options.binary || false
}, $);

@@ -65,3 +70,3 @@ }

['get', 'put', 'post', 'delete', 'head'].forEach(function(method){
exports[method] = exports.method.bind(exports, method);
exports[method] = exports.method.bind(exports, method);
});

@@ -68,0 +73,0 @@

@@ -36,3 +36,3 @@ var crypto = require('crypto');

NTLM_Negotiate56 : 0x80000000
}
};
var typeflags = {

@@ -60,3 +60,3 @@ NTLM_TYPE1_FLAGS : flags.NTLM_NegotiateUnicode

+ flags.NTLM_Negotiate56
}
};

@@ -71,3 +71,3 @@ function createType1Message(options){

var type1flags = typeflags.NTLM_TYPE1_FLAGS;
if(!domain || domain == '')
if(!domain || domain === '')
type1flags = type1flags - flags.NTLM_NegotiateOemDomainSupplied;

@@ -237,3 +237,3 @@

// fix the password length to 14 bytes
var password = password.toUpperCase();
password = password.toUpperCase();
var passwordBytes = new Buffer(password, 'ascii');

@@ -269,3 +269,3 @@

if((i+1)%7 == 0){
if((i+1)%7 === 0){
newBinaryArray.push(0);

@@ -324,3 +324,3 @@ }

'1111': 'F'
}
};

@@ -363,6 +363,6 @@ var bufArray = [];

var des = crypto.createCipheriv('DES-ECB', insertZerosEvery7Bits(passHashPadded.slice(7,14)), '');
des = crypto.createCipheriv('DES-ECB', insertZerosEvery7Bits(passHashPadded.slice(7,14)), '');
resArray.push( des.update(server_challenge.slice(0,8)) );
var des = crypto.createCipheriv('DES-ECB', insertZerosEvery7Bits(passHashPadded.slice(14,21)), '');
des = crypto.createCipheriv('DES-ECB', insertZerosEvery7Bits(passHashPadded.slice(14,21)), '');
resArray.push( des.update(server_challenge.slice(0,8)) );

@@ -388,3 +388,3 @@

ntChallengeResponse: ntChallengeResponse
}
};
}

@@ -391,0 +391,0 @@

{
"name": "httpntlm",
"description": "httpntlm is a Node.js library to do HTTP NTLM authentication",
"version": "1.4.0",
"version": "1.4.1",
"dependencies": {

@@ -25,12 +25,2 @@ "httpreq": "~0.4.2",

"main": "./httpntlm",
"contributors": [
{
"name": "Marius Gundersen",
"url": "https://github.com/mariusGundersen"
},
{
"name": "MajiD Fatemian",
"url": "https://github.com/majidfn"
}
],
"licenses": [

@@ -41,3 +31,6 @@ {

}
]
],
"scripts": {
"jshint": "jshint *.js"
}
}

@@ -34,2 +34,14 @@ # httpntlm

## Options
- `url:` _{String}_ URL to connect. (Required)
- `username:` _{String}_ Username. (Required)
- `password:` _{String}_ Password. (Required)
- `workstation:` _{String}_ Name of workstation or `''`.
- `domain:` _{String}_ Name of domain or `''`.
- `body:` _{String}_ Custom body.
- `headers:` _{Object}_ Custom headers.
- `binary:` _{Boolean}_ If `true` returns a Buffer instead of a String (Default: `false`).
- `timeout:` _{Number}_ Connection timeout in milliseconds (Default: `0` == waits till doomsday).
## Advanced

@@ -90,2 +102,3 @@

```
## More information

@@ -92,0 +105,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc