
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.
resource-loader-inspector
Advanced tools
is an inspector for resource-loader developed by englercj.
resource-loader-inspector proveides its inspecting processes as loader middleware and it enables to collect resource data size and resource amount.
Resource information is summarized as bellow;
interface Summary {
totalContentLength: number;
resourceCount: number;
contentLengthUnknown: number;
}
and loader instance may be augmented inspector.summary
property that contains the summary above.
Use attach method.
The second argument indicates use of HEAD request since resource-loader uses browser api such as Image and Video those don't have data size information on it's instance.
Retrieved data is stored to augmented property inspector.summary
of loader instance.
ResourceLoaderInspector.attach(loader);
...
console.log(loader.inspector.summary);
However, inspector does not care about reset()
call of loader.
Users may manually recalcurate resource info as described below.
Use snapshot method.
It returns object that has exactly same schema with inspector.summary
.
Resource summary is retrieved from existing resource properties.
It means no additional retrieval such as http HEAD request will occur in this method.
Note that calcurated summary is not stored to given loader instance.
const summary = ResourceLoaderInspector.snapshot(loader);
Use recollect method.
It recollects resource info from resources
property of given loader instance.
This API is used when resource data is reset or whenever it is suspected not keeping atomicity beteen summary and resource data.
Collected info is stored to inspector.summary
property of loader instance.
ResourceLoaderInspector.recollect(loader);
...
console.log(loader.inspector.summary);
resource-loader-inspector uses HEAD request to retrieve data size for files not downloaded via XHR such as Image, Audio and Video.
And of course this gives an impact to the application performance, so this module should be used only under the development environment.
Otherwise you can turn of the HEAD request feature by giving false
to the second argument of attach
and recollect
method.
FAQs
inspector for resource-loader
The npm package resource-loader-inspector receives a total of 29 weekly downloads. As such, resource-loader-inspector popularity was classified as not popular.
We found that resource-loader-inspector 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.