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

ghost-mode-guard-hiding

v1.0.11

Published

Provides a tool to establish a score between users that will help to prior users to moderate.

Downloads

5

Readme


The problem

Many websites, mainly small ones, need to moderate their users. The pain points is that they can't decide how to prioritize the moderation of these users. Who to watch first? Who is the most suspicious to use the website with malicious attentions?

The fact is like 31% of adults are using VPN, 20% of them use incognito mode, and they are very few with bad IP reputation, or using TOR, or using VM, or using anti trackers. But how many of legit users using all of them? And how many malicious users will be on a VPN, in incognito mode, on a VM with anti trackers? Most of them, if they don't want to be caught.

A solution

Provide a tool to establish a score between users that will help to prior users to moderate. The goal is not to know who the user is (it's like, impossible) but know how much he wants to hide his real identity.

Installation

This module is distributed via npm which is bundled with node and should be installed as one of your project's devDependencies:

npm install --save-dev ghost-mode-guard-hiding

or

for installation with yarn package manager.

yarn add --dev ghost-mode-guard-hiding

Usage

Test the library with plain results

Import ghost-mode-guard-hiding once and you're good to go:

// In your own file.js (or any other name)
import { profileHidingEvent } from "ghost-mode-guard-hiding";

Then just use:

profileHidingEvent({
    profiling_url: 'https://api.ghostmodeguard.com',
})

Use the library with client encryption

First, request from a client key with the following command:

curl -X 'POST' \
  'https://api.ghostmodeguard.com/trust/v1/client?domain=[your client domain]' \
  -H 'accept: application/json'

Where [your client domain] is the domain of the frontend application that will make hiding profiling (swagger API definition explained).

Once you have you private key, copy it, then keep it secret (it will be used on backend application). You need this key only once: it will make you able to read any response from the profiling.

Now use the library with encrypted client:

// In your own file.js (or any other name)
import { profileHidingEvent } from "ghost-mode-guard-hiding";

Then just use:

profileEncryptedHidingEvent({
    profiling_url: 'https://api.ghostmodeguard.com',
    user_token: '[user-token]',
})

Backend libraries to read encrypted profiling response:

  • In Golang: https://pkg.go.dev/github.com/ghostmodeguard/hiding#section-readme
  • In Java: https://central.sonatype.com/artifact/com.ghostmodeguard/hidingj

Where:

  • user-token is anything that can identify the user once he's logged in. The result of the profiling will be sent to your backend after profiling, so you need to be able to verify this information to avoid injection from malicious users

You will receive a response with an attribute encrypted_response on the body. This attribute contain the body that can be decrypted with your previous requested private key.

To read the content of encrypted_response you need to:

  • decode from base64 the response
  • read the content with your stored private key
  • you will have a text with the following content: [user token provided]:[hiding score]
  • validate the token of the user
  • store the hiding score for helping to moderate malicious users later

Pay attention: you can use the frontend library only once per second. To request more just contact us to [email protected].

Demo

Try to open the following page with incognito mode, with a VPN, from a virtual machine or with anti trackers or TOR:

https://demo.ghostmodeguard.com/hiding

Examples

Result for a legit user:

Result for a user in incognito mode:

Alt text

Result for a user using TOR browser:

Alt text

Result for a bot from a datacenter:

Alt text

Result for a user using a virtual machine:

Alt text

Contact [email protected] for more information.

LICENSE

MIT