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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@glander/ph-ack

v1.0.0

Published

Ph! Ack! is a really small package to debug process memory via Node.js.

Downloads

2

Readme

PH ACK

Ph! Ack! (written as ph-ack, PhAck, PH ACK, or any other way which highlights the break between ph and ack) is a really small package to debug process memory via Node.js.

Installation

Unfortunately, due to NPM's "typosquatting" prevention rules, ph-ack currently cannot be published as an NPM package, so it at @glander/ph-ack.

Just install it like any package, like

npm i @glander/ph-ack

or

yarn install @glander/ph-ack

Typescript declarations are bundled.

Usage

There is one exported function which should be really used: createPhAck (takes 1 parameter - the PID (as a number)), which returns an instance of the PhAck class.

Example

import { createPhAck } from "ph-ack"
const pa = await createPhAck(12345)
pa.freeze()
// Replace 12 with 24 at address 0x12345
if ((await pa.peekUint8(0x12345)) === 12) await pa.pokeUint8(0x12345, 24)

// Check if the int32 at address 0x678ab is endian-symmetric
if ((await pa.peekInt32(0x678ab)) === (await pa.peekInt32(0x678ab, true)))
	console.log("The value is bit-symmetric!")

pa.unfreeze()

Documentation

createPhAck

Parameters:

  • pid (number) - The PID of the process to hack

Returns an instance of the PhAck class.

PhAck

Methods

| Method name | Parameters | Usage | | :-----------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------: | | peekUint8peekUint16peekUint32peekUint64and int alternatives | - address (number) - The address of the number to see- bigEndian (boolean) - If to read the number in the Big Endian order or notReturns Promise<number> (Promise<bigint> for 64-bit numbers) | Reads a number from the specified address. | | pokeUint8pokeUint16pokeUint32pokeUint64and int alternatives | - address (number) - The address of the number to write to- val (number (bigint for 64-bit numbers)) - The number to write to the process memory- bigEndian (boolean) - If to write the number in the Big Endian order or notReturns Promise<void> | Writes a number to the specified address. | | freezeunfreeze | No parameters.Returns Promise<void> | Pauses and resumes processes, used when it is needed to read multiple related values. |