
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.
synapse by Steven Swerling http://tab-a.slot-z.net
== DESCRIPTION:
Synapse is an application framework that does almost nothing. Basically this is just a tiny wrapper for the Rack::Router (see http://github.com/carllerche/rack-router)
very alpha-ish stuff here. Seems to work though.
== SYNOPSIS:
Here is an example Synapse application (foo_app.rb):
require 'synapse'
class FooApp < Synapse::App
def router
@router ||= Rack::Router.new(nil, {}) do |r|
r.map "/yip/", :get, :to => self, :with => { :action => "yip" }
r.map "/yap/:yap_variable", :get, :to => self, :with => { :action => "yapfoo" }
r.map "/yap/", :get, :to => self, :with => { :action => "yap" }
r.map "/:anything", :get, :to => self, :with => { :action => "no_route" }
r.map "/", :get, :to => self, :with => { :action => "home" }
end
end
def yip; "yip"; end
def yap; "yap"; end
def home; "home"; end
def no_route
# Note: 'self.env' is the rack env
self.response[:body] = "route not found for: '#{self.env['REQUEST_URI']}'"
self.response[:status_code] = 404
end
def yapfoo
"yapfoo, #{self.params[:yap_variable]}"
end
end
And here is an example rack config, foo_app.ru:
require 'foo_app' run FooApp.new.as_rack_app
Run FooApp w/ rackup or shotgun:
rackup --server=thin foo.ru -p 3000
or
shotgun --server=thin foo.ru -p 3000
== FEATURES
When a Synapse application handles a rack request, it
The @response is a hash used to return rack status code, headers hash, and body. Actions may do what they please with the response. Default response:
@response = {
:status_code => 200,
:headers => {'Content-Type' => 'text/html'},
:body => nil
}
Actions are expected to side-effect the :status_code, :headers, and :body. As a convenience, if an action returns a string, it is assumed that that string is the :body. An exception is thrown if the :body is not set to something.
That's it. Really not much to see here. Just gives you a thread-safe rack-based web framework that consists of nothing but a router.
== PROBLEMS
None known.
== REQUIREMENTS:
== INSTALL:
== Acknowledgements:
rack and rack-router were used, obviously. 'bones' used for gem generation.
== LICENSE:
(The MIT License)
Copyright (c) 2009 Steven Swerling
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FAQs
Unknown package
We found that swerling-synapse 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.