
Research
PyPI Package Disguised as Instagram Growth Tool Harvests User Credentials
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
ldapjs-promise
Advanced tools
LDAP Client and Server API for node.js with Promise support.
This is a simple wrapper around ldapjs for basic operations.
npm install --save ldapjs-promise
For full docs, head on over to http://ldapjs.org.
The methods signatures are the same except instead of callbacks they return promises.
const ldap = require('ldapjs-promise');
const client = ldap.createClient({
url: 'ldap://127.0.0.1:1389'
});
await client.bind(dn, password);
The ldapjs authors made the search method a special method that returns an
EventEmitter
so the user can handle each
searchEntry
as it is returned. Since this library is just wrapping
ldapjs, it does not make any assumptions and returns the same EventEmitter
.
In order to await all of the results you could:
const results = client.search(base, options, controls).then(response => {
const entries = [];
let referrals = [];
return new Promise((resolve, reject) => {
response.on('searchEntry', entry => {
entries.push(entry);
});
response.on('searchReference', referral => {
referrals = referrals.concat(referral.uris);
});
response.on('error', error => {
return reject(error);
})
response.on('end', result => {
if (result.status !== 0) {
return reject(result.status);
}
return resolve({
entries: entries,
referrals: referrals
});
});
});
});
If this is exactly what you want, an extension method searchReturnAll
has been added
that does this.
const results = await client.searchReturnAll(base, options, controls);
for (let entry of results.entries) {
...
}
findUser(base, username, options)
userInGroup(base, username, groupName)
FAQs
A simple promise wrapper around ldapjs.
The npm package ldapjs-promise receives a total of 4,046 weekly downloads. As such, ldapjs-promise popularity was classified as popular.
We found that ldapjs-promise 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
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
Security News
Research
Socket uncovered two npm packages that register hidden HTTP endpoints to delete all files on command.