
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Hattery (mad, of course) is a library for making HTTP requests. It provides a simple fluent interface based around immutable objects. This javascript version is adapted from the initial Java version.
// Requests are immutable, start with the base object
import {HTTP} from "hattery";
// A GET request
const thing1 = await HTTP
.url("http://example.com/1")
.param("foo", "bar")
.fetch().json();
// A POST request as application/x-www-form-urlencoded
const thing2 = await HTTP
.url("http://example.com/2")
.POST()
.param("foo", "bar")
.fetch().json();
// A POST request with a JSON body
const thing3 = await HTTP
.url("http://example.com/3")
.POST()
.body({"foo":"bar"})
.fetch().json();
// Some extra stuff you can set
const things4 = await HTTP
.transport(new MyCustomTransport())
.url("http://example.com")
.path("/4")
.path("andMore") // adds '/' between path elements automatically
.header("X-Whatever", "WHATEVER")
.basicAuth("myname", "mypassword")
.param("foo", "bar")
.timeout(1000)
.retries(3)
.preflightAndThen(req => req.header("X-Auth-Signature", sign(req)))
.fetch().json();
Install from npm:
$ npm install hattery
Some extra features:
path()
calls append to the url; url()
calls replace the whole url.Content-Type
determines what is to be done with the body()
and param()
s (if either are present).Content-Type
is inferred:
body()
, application/json
is assumed. Any param()
s will become query parameters.POST()
and no body()
, parameters will be submitted as application/x-www-form-urlencoded
queryParam()
, which forces them onto the query string.FAQs
Functional/immutable http interface
We found that hattery demonstrated a not healthy version release cadence and project activity because the last version was released 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
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.