
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.
Mini Mock server Rack based REST corresponding server
gem install minimo
It is placed in the directory you specify a response file.
For example, in the case of the json response to the POST method.
To place the json file in response/POST/hello/world.json
.
$ mkdir -p response/POST/hello
$ cd response/POST/hello
$ vi world.json
{
"hello": "world"
}
To start the minimo server.
# initialize.rb
require 'minimo'
# set response file dir
set :fixture_path, File.dirname( __FILE__ ) + '/response'
# set log file dir
set :log_dir, File.dirname( __FILE__ ) + '/log'
# set http header
set :headers, { 'Vary' => 'Accept-Encoding' }
Rack::Handler::WEBrick.run minimo::Application, Port: 9292
And run the POST method.
$ curl -X POST http://localhost:9292/hello/world/ -d "{ hey: 'ok' }"
{
"hello": "world"
}
You can check the log file
$ cat log/minimo.log
- -> /hello/world/
::1 - - [14/Jul/2016:21:45:17 JST] "POST /hello/world/ HTTP/1.1" 201 16
The response can be created json, xml, in the text. In addition to the POST, HEAD, PUT, corresponds to DELETE.
# To place the response file in response/GET/hello/world.(txt|jso|xml)
# http status 200
$ curl -X GET http://localhost:9292/hello/world/
# To place the response file in response/HEAD/hello/world.(txt|jso|xml)
# http status 200
$ curl -I http://localhost:9292/hello/world/
# To place the response file in response/PUT/hello/world.(txt|jso|xml)
# http status 204
$ curl -X PUT http://localhost:9292/hello/world/
# To place the response file in response/DELETE/hello/world.(txt|jso|xml)
# http status 204
$ curl -X DELETE http://localhost:9292/hello/world/
Contributions to this gem are always welcome :smile: See CONTRIBUTING for more information on how to get started.
This project is licensed under the terms of the MIT license. See the LICENSE file.
FAQs
Unknown package
We found that minimo 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.