
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
elasticsearch-exporter
Advanced tools
A utility for exporting data from one Elasticsearch cluster to another
#Elasticsearch-Exporter
A small script to export data from one Elasticsearch cluster into another.
Features:
From one database to another database
// copy all indices from machine a to b
node exporter.js -a localhost -b foreignhost
// copy entire index1 to index2 on same machine
node exporter.js -i index1 -j index2
// copy type1 to type2 in same index
node exporter.js -i index -t type1 -u type2
// copy type1 from index1 to type2 in index2
node exporter.js -i index1 -t type1 -j index2 -u type2
// copy entire index1 from machine a to b
node exporter.js -a localhost -i index1 -b foreignhost
// copy index1 from machine1 to index2 on machine2
node exporter.js -a localhost -i index1 -b foreignhost -j index2
// only copy stuff from machine1 to machine2, that is in the query
node exporter.js -a localhost -b foreignhost -s '{"bool":{"must":{"term":{"field1":"value1"}}}}'
// Do not execute any operation on machine2, just see the amount of data that would be queried
node exporter.js -a localhost -b foreignhost -r true
From database to file or vice versa you can use the following commands. Note that data file are now compressed by default. To disable this feature use additional flags:
// Export to file from database
node exporter.js -a localhost -i index1 -t type1 -g filename
// Import from file to database
node exporter.js -f filename -b foreignhost -i index2 -t type2
// To override the compression for a given source file
node exporter.js -f filename -c false -b foreignhost -j index2 -u type2
// To override the compression for a target file
node exporter.js -a localhost -i index1 -t type1 -g filename -d false
The tool responds with a number of exit codes that might help determine what went wrong:
0
Operation successful / No documents found to export 1
invalid options 2
source or target databse cluster health = red99
Uncaught ExceptionIf memory is an issue pass these parameters and the process will try to run garbage collection before reaching memory limitations
node --nouse-idle-notification --expose-gc exporter.js ...
Or make use of the script in the tools folder:
tools/ex.sh ...
To run this script you will need at least node v0.10, as well as the nomnom, colors and through package installed (which will be installed automatically via npm).
Run the following command in the directory where you want the tools installed
npm install elasticsearch-exporter --production
The required packages will be installed automatically as a dependency, you won't have to do anything else to use the tool. If you install the package with the global flag (npm -g
) there will also be a new executable available in the system called "eexport".
To run the tests you must install the development dependencies along with the production dependencies
npm install elasticsearch-exporter
After that you can just run npm test
to see an output of all existing tests.
I try to find all the bugs and and have tests to cover all cases, but since I'm working on this project alone, it's easy to miss something. So please report any bugs you can find to mallox@pyxzl.net or file a bug directly on Github. Thanks!
FAQs
A utility for exporting data from one Elasticsearch cluster to another
The npm package elasticsearch-exporter receives a total of 7 weekly downloads. As such, elasticsearch-exporter popularity was classified as not popular.
We found that elasticsearch-exporter 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.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.