Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
WikiJs is a node.js library which serves as an interface to Wikipedia (or any MediaWiki).
npm install wikijs
import wiki from 'wikijs';
// const wiki = require('wikijs').default;
wiki()
.page('Batman')
.then(page => page.info('alterEgo'))
.then(console.log); // Bruce Wayne
You can run these commands in order to build and test WikiJs:
git clone git@github.com:dijs/wiki.git
cd wiki
npm install
npm run build
npm test
In order for webpack to build wikijs properly, you must add an option to your webpack configuration file. Documentation
externals: {
"isomorphic-fetch": "fetch"
}
You can use the API options configuration:
wiki({
apiUrl: 'https://awoiaf.westeros.org/api.php',
origin: null
}).search('Winterfell');
You just need to change the API to the proper URL. This is normally just changing the subdomain of wikipedia.
wiki({ apiUrl: 'https://es.wikipedia.org/w/api.php' })
.page('Cristiano Ronaldo')
.then(page => page.info())
.then(console.log);
Read more about Cross Domain Requests here
If you need to pass authentication headers or anything else.
wiki({
headers: {
Cookie: 'name=value; name2=value2; name3=value3'
}
}).search('Winterfell');
Query a specific page:
wiki()
.page('albert einstein')
.then(page =>
page
.chain()
.summary()
.image()
.links()
.request()
);
Or query many pages at once:
wiki()
.chain()
.geosearch(52.52437, 13.41053)
.summary()
.image()
.coordinates()
.request();
The code Wikipedia uses for infobox data is strange and complex. So I have split the parsing code into another library. You can find it here.
We not only parse out the information, but also try to transform the data into a convenient structure for data processing.
I always welcome help. Please just stick to the lint rules and write tests with each feature/fix.
Thanks to Heather van der Dys for the awesome logo!
FAQs
Mediawiki interface for Node and Web
The npm package wikijs-dmm receives a total of 0 weekly downloads. As such, wikijs-dmm popularity was classified as not popular.
We found that wikijs-dmm demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.