
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Dependency injection for Node.js and the browser. Inspired by the dependency injection approaches in AngularJS and node-di. No relation to Infector++.
Infector
In the browser, Lo-Dash is a dependency and Infector
is exposed as a global. So do something like:
<script src="lodash.js"></script>
<script src="infector.js"></script>
Using Bower:
$ bower install infector --save
In Node.js:
$ npm install infector --save
Use a constructor property:
function Foo(bar) {}
Foo.infect = ['bar'];
// or Foo.inject = ['bar'];
There are two return options.
type
: an instance of type
will be returned via new
:function Foo() {}
infector.register({ foo: { type: Foo } });
If you want the module to be returned as a singleton:
infector.register({ foo: { type: Foo, isSingleton: true } });
value
: the registered value
will be returned:infector.register({ foo: { value: 'Foo' } });
Just do:
infector.get('foo');
A working example is available in the examples/browser
dir. To view:
$ open examples/browser/index.html
A working example is available in the examples/node
dir. To run:
$ node examples/node
In the browser:
$ npm run test-browser
In Node.js:
$ npm run test-spec
To generate a coverage report:
$ npm run test-cov
FAQs
Dependency injection for Node.js and the browser.
We found that infector 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
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.