npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@alexzeng666/dsh-probe

v0.1.1

Published

Traces which APIs any process calls, and with what arguments.

Readme

dsh-probe

Shows which APIs a process calls, and with what arguments.

Install

dsh plugin --profile "$env:DSH_PROFILE" add @alexzeng666/dsh-probe

Usage

verify_trace(pid=12345)                                       # all APIs, 60s by default
verify_trace(pid=12345, api_pattern="File", duration_ms=5000)
verify_trace(pid=12345, api_pattern="/^(Read|Write)File$/", duration_ms=10000)
verify_trace(pid=12345, apis="Sleep,CreateFileW", duration_ms=3000)

verify_hook(pid=12345, api="RegQueryValueExW", action={ when: "always", ret: 5 })
verify_hook(pid=12345, api="CreateFileW", action={ when: { nth: 3 }, ret: -1 })

api_pattern is a case-insensitive substring match; write /regex/ to match by regex; empty or * means all.

verify_hook

It only changes return values, never arguments: action = { when: "always" | { nth: N }, ret: <value> }.

Returning a forged value skips the original call without having to know the parameter list; changing arguments would mean decoding each API's signature one by one, and the cost far outweighs the benefit. Hence a 12-entry allowlist with typed detours, and anything outside it is reported as unsupported rather than half-hooked:

RegQueryValueExW · RegOpenKeyExW · RegCreateKeyExW · RegSetValueExW · CreateFileW · OpenProcess · LoadLibraryW · GetProcAddress · VirtualAlloc · GetTickCount64 · WaitForSingleObject · CreateProcessW

ret takes a number or "0x..."; negatives like -1 are truncated to the target's return width (HANDLE-typed ones end up as INVALID_HANDLE_VALUE). Hooks are removed at duration_ms, and the report states how many calls were seen and how many were changed.

Traced APIs

Sleep GetTickCount64 QueryPerformanceCounter CreateFileW ReadFile WriteFile LoadLibraryW GetProcAddress RegOpenKeyExW CreateProcessW VirtualAlloc HeapAlloc

apis hooks only what is listed; everything else is left untouched, so it costs nothing.

Return

VerifyFragment. detail holds records, matched, counts (per-API), samples, hook_failures and trace_path (the full JSONL).

Behavior

  • Hooks install one at a time: if something else already hooked an API, only that one is lost and hook_failures reports it; the rest install normally.
  • Records flush once a second, so a target that crashes midway still yields what was captured.
  • Early exit, injection failure, or no matching records all still produce a conclusion.
  • 32-bit targets are not supported — the helper is x64.