Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
This is a helper library for NTLM Authentication using the Axios HTTP library on Node. It attaches interceptors to an axios instance to authenticate using NTLM for any resources that offer it.
This example will create you a brand new axios instance you can utilise the same as any other axios instance
import { NtlmClient } from 'axios-ntlm';
(async () => {
let credentials: NtlmCredentials = {
username: 'username',
password: "password",
domain: 'domain'
}
let client = NtlmClient(credentials)
try {
let resp = await client({
url: 'https://protected.site.example.com',
method: 'get'
});
console.log(resp.data);
}
catch (err) {
console.log(err)
console.log("Failed")
}
})()
This shows how to pass in an axios config in the same way that you would when setting up any other axios instance.
Note: If doing this, be aware that http(s)Agents need to be attached to keep the connection alive. If there are none attached already, they will be added. If you are providing your own then you will need to set this up.
import { AxiosRequestConfig } from 'axios';
import { NtlmClient, NtlmCredentials } from 'axios-ntlm';
(async () => {
let credentials: NtlmCredentials = {
username: 'username',
password: "password",
domain: 'domain'
}
let config: AxiosRequestConfig = {
baseURL: 'https://protected.site.example.com',
method: 'get'
}
let client = NtlmClient(credentials, config)
try {
let resp = await client.get('/api/123')
console.log(resp);
}
catch (err) {
console.log(err)
console.log("Failed")
}
})()
FAQs
An NTLM auth extension to the Axios HTTP library
The npm package axios-nlm receives a total of 0 weekly downloads. As such, axios-nlm popularity was classified as not popular.
We found that axios-nlm demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.