Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- console.log("NTLM start");
- // npm install ntlm request agentkeepalive
- var url = "https://192.168.50.192/EWS/Exchange.asmx";
- var domain = "exch2013.local";
- var username = "administrator@";
- var password = "Pa$$w0rd";
- var hostname = "192.168.50.192"
- var ntlmrequest = Meteor.npmRequire('request').defaults({
- agentClass: Meteor.npmRequire('agentkeepalive').HttpsAgent
- });
- ntlmrequest(url, {
- headers: {
- 'Authorization': ntlm.challengeHeader(hostname, domain),
- }
- }, function(err, res) {
- ntlmrequest(url, {
- headers: {
- 'Authorization': ntlm.responseHeader(res, url, domain, username, password)
- }
- }, function (err, res, body) {
- console.log(body);
- });
- });
- console.log("NTLM end");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement