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

@j3r3mcdev/oast-server

v1.0.0

Published

Modular OAST callback server for security auditing

Downloads

126

Readme

OAST Server — Multi‑Protocol Out‑of‑Band Interaction Framework

Un serveur OAST modulaire, extensible et agnostique, conçu pour capturer, normaliser et diffuser des interactions out‑of‑band provenant de multiples canaux : HTTP, DNS, SMTP, SSRF, Webhook, WebSocket, TCP, API REST et SSE.

Ce framework fournit une architecture listener‑based robuste, unifiée et testée, idéale pour les outils de diagnostic, scanners de vulnérabilités, plateformes d’audit ou systèmes de détection avancés.


✨ Caractéristiques principales

  • Architecture modulaire par listeners
    Chaque protocole est isolé dans son propre module (http, dns, smtp, ssrf, webhook, websocket, tcp, api).

  • Extractors dédiés
    Chaque listener dispose d’un extractor responsable de la normalisation des données brutes.

  • API REST intégrée
    Permet de récupérer les events, les tasks, les métadonnées et l’état du serveur.

  • SSE (Server‑Sent Events)
    Diffusion en temps réel des interactions capturées.

  • Storage agnostique
    Implémentation par défaut en mémoire, extensible vers Redis, SQLite, PostgreSQL, etc.

  • Suite de tests complète
    118 tests unitaires couvrant extractors, listeners, API, SSE et services.

  • Aucune dépendance lourde
    Pas d’Express, pas de framework web : un cœur minimaliste, rapide et portable.


📦 Installation

npm install @j3r3mcdev/oast-server

🚀 Démarrage rapide

import { ApiListener, HttpListener, DnsListener } from "@j3r3mcdev/oast-server";

const api = new ApiListener({ port: 8080 });
const http = new HttpListener({ port: 8000 });
const dns = new DnsListener({ port: 5353 });

api.start();
http.start();
dns.start();

console.log("OAST server running");

📡 Protocoles supportés

| Protocole | Listener | Description | | ------------- | ------------------- | --------------------------------------- | | HTTP | HttpListener | Capture des requêtes HTTP entrantes | | DNS | DnsListener | Résolution DNS OAST (A, AAAA, TXT…) | | SMTP | SmtpListener | Réception d’emails OAST | | SSRF | SsrfListener | Détection d’interactions SSRF | | Webhook | WebhookListener | Réception d’appels webhook | | WebSocket | WebSocketListener | Connexions WebSocket entrantes | | TCP | TcpListener | Connexions TCP brutes | | API + SSE | ApiListener | API REST + diffusion temps réel via SSE |

🧩 Architecture

alt text

Chaque listener contient :

  • *.listener.ts → serveur du protocole
  • *.extractor.ts → normalisation des données
  • __tests__/ → tests unitaires

🧨 Exemple : Listener HTTP

import { HttpListener } from "@j3r3mcdev/oast-server";

const http = new HttpListener({
  port: 8000,
  onEvent: (event) => {
    console.log("HTTP event:", event);
  },
});

http.start();

🧨 Exemple : Listener DNS

🧨 Exemple : Listener DNS

import { DnsListener } from "@j3r3mcdev/oast-server";

const dns = new DnsListener({
  port: 5353,
  onEvent: (event) => {
    console.log("DNS event:", event);
  },
});

dns.start();

🧨 Exemple : SSE (temps réel)

## 🧨 Exemple : SSE (temps réel)
const stream = new EventSource(
  "http://localhost:8080/stream?channels=http,dns",
);

stream.onmessage = (msg) => {
  const event = JSON.parse(msg.data);
  console.log("Event reçu :", event);
};

🧨 Exemple : API REST

🧨 Exemple : API REST

Récupérer les events

curl http://localhost:8080/events

Créer une tâche

curl -X POST http://localhost:8080/tasks \
  -H "Content-Type: application/json" \
  -d '{"type":"scan","payload":{"url":"http://example.com"}}'

🧱 Storage (Markdown PRO)

🧱 Storage

Par défaut : in‑memory

Vous pouvez implémenter votre propre storage :

export interface StorageAdapter {
  save(event: OastEvent): Promise<void>;
  list(filters: any): Promise<OastEvent[]>;
}

class MyStorage implements StorageAdapter {
  private events = [];
  async save(e) {
    this.events.push(e);
  }
  async list() {
    return this.events;
  }
}

🧪 Tests (Markdown PRO)

🧪 Tests

  • 37 suites
  • 118 tests
  • 100% verts
  • Tests d’intégration réservés à l’outil d’audit (non inclus dans la lib)

📘 Licence

MIT