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

redstr

v0.2.14

Published

Native string transformations for security testing - WAF bypass, XSS, SQL injection, phishing, and evasion testing

Readme

redstr

Native Node.js bindings for redstr - high-performance string transformations for security testing.

Installation

npm install redstr

Features

  • 🚀 Native performance - Zero-overhead Rust bindings via napi-rs
  • 🔒 Security-focused - 60+ transformations for WAF bypass, XSS, SQL injection, etc.
  • 📦 Zero dependencies - No JavaScript dependencies
  • 🎯 TypeScript support - Full type definitions included
  • 🔗 Builder pattern - Chain multiple transformations fluently

Quick Start

const { leetspeak, base64Encode, TransformBuilder } = require('redstr');

// Direct function calls
console.log(leetspeak('password'));  // 'p@55w0rd'
console.log(base64Encode('hello'));  // 'aGVsbG8='

// Builder pattern for chaining
const payload = new TransformBuilder('<script>alert(1)</script>')
    .caseSwap()
    .urlEncode()
    .build();
console.log(payload);

TypeScript

import { leetspeak, TransformBuilder, randomUserAgent } from 'redstr';

const encoded: string = leetspeak('password');

const builder = new TransformBuilder('test')
    .base64()
    .urlEncode();
    
const result: string = builder.build();

Available Functions

Case Transformations

  • randomizeCapitalization(input) - Random case for each character
  • caseSwap(input) - Swap uppercase/lowercase
  • alternateCase(input) - Alternate case pattern
  • toCamelCase(input) - Convert to camelCase
  • toSnakeCase(input) - Convert to snake_case
  • toKebabCase(input) - Convert to kebab-case

Encoding

  • base64Encode(input) - Base64 encoding
  • urlEncode(input) - URL encoding
  • hexEncode(input) - Hex encoding
  • htmlEntityEncode(input) - HTML entity encoding
  • mixedEncoding(input) - Mixed encoding techniques

Obfuscation

  • leetspeak(input) - Leetspeak transformation
  • rot13(input) - ROT13 cipher
  • reverseString(input) - Reverse the string
  • doubleCharacters(input) - Double each character
  • jsStringConcat(input) - JS string concatenation

Unicode

  • homoglyphSubstitution(input) - Replace with similar-looking characters
  • zalgoText(input) - Zalgo text effect
  • unicodeVariations(input) - Unicode variations
  • spaceVariants(input) - Alternative space characters

Phishing

  • domainTyposquat(input) - Generate typosquatted domains
  • emailObfuscation(input) - Obfuscate email addresses
  • advancedDomainSpoof(input) - Domain spoofing techniques

Injection

  • xssTagVariations(input) - XSS payload variations
  • sqlCommentInjection(input) - SQL injection patterns
  • commandInjection(input) - Command injection
  • pathTraversal(input) - Path traversal patterns
  • sstiInjection(input) - Server-side template injection

Bot Detection

  • randomUserAgent() - Generate random user agent
  • tlsFingerprintVariation(input) - TLS fingerprint variations

Shell

  • powershellObfuscate(input) - PowerShell obfuscation
  • bashObfuscate(input) - Bash obfuscation

TransformBuilder

Chain multiple transformations:

const { TransformBuilder } = require('redstr');

const result = new TransformBuilder('payload')
    .leetspeak()
    .base64()
    .urlEncode()
    .build();

Available builder methods:

  • .leetspeak() - Apply leetspeak
  • .base64() - Apply Base64 encoding
  • .urlEncode() - Apply URL encoding
  • .caseSwap() - Apply case swap
  • .rot13() - Apply ROT13
  • .hexEncode() - Apply hex encoding
  • .homoglyphs() - Apply homoglyph substitution
  • .reverse() - Reverse the string
  • .build() - Get the final result

Performance

redstr uses native Rust code via napi-rs, providing near-native performance:

| Operation | Time | |-----------|------| | leetspeak() | ~0.01ms | | base64Encode() | ~0.005ms | | TransformBuilder (5 ops) | ~0.05ms |

License

MIT