Skip to content

DevCop95/cYHBeriteratus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

23 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

cYHBer Console πŸ’€

Cover

A local, ChatGPT-style web interface wired to Ollama that supports Autonomous Agents (Tool Calling), abliterated models (uncensored), smooth real-time streaming, and a secure "Zero-Dependency" architecture (no external npm modules).

πŸ”₯ Features

  • ChatGPT-style UI (red-team theme): A faithful ChatGPT clone β€” sidebar with New chat, centered conversation column with user bubbles and assistant replies, an empty-state welcome with suggestion cards, a rounded composer, model picker, agent toggle and live status β€” all in a dark black-and-red "red team" skin. Live Markdown rendering (headings, lists, links, code blocks with copy buttons). Keyboard: Enter sends, Shift+Enter newline, Esc stops a running request.
  • Chain of Thought: For reasoning models (Qwen3, etc.) the model's thinking stream is captured and shown in a collapsible Show reasoning block above the answer, instead of the UI appearing to hang.
  • Agent Engine (Tools): The model can run real actions on your machine when agent mode is enabled:
    • web_fetch: read articles from the internet (60s cache to avoid duplicate requests).
    • web_search: search the web via DuckDuckGo (60s cache, redirect handling, link-extraction fallback).
    • read_file / write_file / list_directory: operate on your filesystem (sandboxed).
    • run_command: run commands in PowerShell (non-blocking, via execFile).
  • Empty-response fallback: If the agent loop produces no visible output (e.g. a small or non-tool model that gets confused by the tool prompt), the server automatically answers once in plain chat mode so you always get a reply.
  • Session persistence: Conversation history is stored on the server (in memory, 24h TTL). Opening a new tab restores the context automatically from the server without losing any messages.
  • Agent rounds control: A numeric input (1–20) in the top bar controls how many tool rounds the agent may run per response, without editing files.
  • Security (Sandboxing):
    • Directory-traversal prevention (the model cannot escape the project directory).
    • SSRF blocking for IPv4 and IPv6 (the model cannot scan your local network via web_fetch).
    • Rate limiting with automatic memory cleanup and protection against oversized payloads.
    • Type validation on every message field (role and content).
    • CSP headers to prevent XSS.
  • Live selector: Switch models on the fly from the interface without restarting the server.
  • Efficient streaming: The agent loop and chat mode share the same streaming core (ollamaStreamRound) β€” no duplicated code.
  • Memory management: Sliding history window (last 20 messages) to avoid context overflow in long sessions.
  • Disconnect cleanup: If the client closes the tab mid-response, the agent loop and the Ollama request are cancelled immediately.
  • Built-in test suite: 59 tests with npm test using the native Node.js runner β€” no external dependencies.

πŸ›  Quick Install

1. Install prerequisites

Make sure you have installed:

2. Configure environment variables (optional)

Copy .env.example to .env and adjust the values for your setup:

copy .env.example .env
Variable Default Description
APP_PORT 4000 Web interface port
OLLAMA_HOST 127.0.0.1 Ollama host
OLLAMA_PORT 11434 Ollama port
OLLAMA_MODEL richardyoung/qwen2.5-3b-instruct-abliterated Default model
OLLAMA_NUM_GPU null (auto) GPU layers. 0 = force CPU
LOG_LEVEL INFO Log level: DEBUG, INFO, WARN, ERROR

3. Download the models

Open your terminal (PowerShell or CMD) and pull the recommended models. The system auto-detects the ones you have installed.

# Option 1: Qwen3 8B abliterated β€” reasoning + tool calling, most complete (~6 GB VRAM)
ollama pull huihui_ai/qwen3-abliterated:8b

# Option 2: Josiefied-Qwen3 8B β€” uncensored without losing tool calling (~6 GB VRAM)
ollama pull goekdenizguelmez/JOSIEFIED-Qwen3:8b

# Option 3: Granite 4.1 3B abliterated β€” modern, with tools, ideal for standard PCs
ollama pull huihui_ai/granite4.1-abliterated:3b

# Option 4: NeuralDaredevil 8B β€” best classic 8B on the Open LLM Leaderboard (chat only, no tools)
ollama pull closex/neuraldaredevil-8b-abliterated

# Option 5: Abliterated 3B β€” for very low-resource PCs (default model)
ollama pull richardyoung/qwen2.5-3b-instruct-abliterated

Important for Agent Mode: tools only work with models that support tool calling (Qwen2.5/Qwen3, Granite, Gemma families with a tools tag). Classic Llama 3–based models like NeuralDaredevil work in chat mode only.

(Note: make sure Ollama is running in the background, by default on port 11434.)

4. Start the cYHBer Console server

Run it directly:

node server.js

Or use the background control script (also wired to the npm scripts below):

python hack.py start     # or: npm start
python hack.py status    # ONLINE / OFFLINE + PID
python hack.py stop
python hack.py restart

5. Enter the system

Open your web browser and go to: πŸ‘‰ http://127.0.0.1:4000


πŸ§ͺ Tests

npm test

Covers: message validation, rate limiter, log levels, SSRF protection (20 isPrivateIP IPv4/IPv6 cases + 6 web_fetch guards), path sandboxing, file operations and command execution. No external dependencies β€” uses the native node:test runner.


πŸ— Project Architecture

This project does not require npm install because it uses only native Node modules (http, fs, path, etc.) for maximum speed and security.

cYHBeriteratus/
β”œβ”€ server.js              # HTTP routes, ollamaStreamRound, agent loop, sessions
β”œβ”€ tools.js               # Agent tools: sandboxing, cache, IPv4/IPv6 SSRF
β”œβ”€ src/
β”‚  β”œβ”€ config.js           # Global config and environment variables
β”‚  β”œβ”€ utils/
β”‚  β”‚  └─ logger.js        # Structured logging, level via LOG_LEVEL
β”‚  └─ middlewares/
β”‚     β”œβ”€ security.js      # Rate-limiting (with auto-cleanup) and CSP headers
β”‚     └─ validator.js     # role/content validation on messages
β”œβ”€ public/
β”‚  β”œβ”€ index.html          # ChatGPT-style UI (sidebar, chat column, composer)
β”‚  β”œβ”€ styles.css          # Dark red-team theme
β”‚  β”œβ”€ app.js              # Frontend orchestrator (ES modules)
β”‚  β”œβ”€ img/
β”‚  β”‚  └─ wrong.png        # README cover / UI screenshot
β”‚  └─ modules/
β”‚     β”œβ”€ session.js       # Session handling: localStorage + server sync
β”‚     β”œβ”€ ui.js            # DOM refs, chat message rows, tool cards, thinking, status
β”‚     β”œβ”€ stream.js        # NDJSON streaming parser with callbacks
β”‚     └─ markdown.js      # Dependency-free, CSP-safe Markdown renderer
β”œβ”€ hack.py                # Background server control: start/stop/status/restart
β”œβ”€ tests/
β”‚  β”œβ”€ validator.test.js
β”‚  β”œβ”€ security.test.js
β”‚  β”œβ”€ logger.test.js
β”‚  β”œβ”€ tools.isPrivateIP.test.js
β”‚  β”œβ”€ tools.ssrf.test.js
β”‚  β”œβ”€ tools.files.test.js
β”‚  └─ tools.command.test.js
β”œβ”€ detect-abliterated.py  # Detects abliterated models via Ollama's REST API
└─ .env.example           # Environment variable template

πŸ”’ Agent Mode (Tool Calling)

In the top bar you'll find a clickable Agent on/off chip and a rounds input (1–20).

  • off: The model acts as a standard chatbot (normal, fast text responses).
  • on: The model reasons before answering and may decide to use system tools (search the web, run scripts, etc.) to fulfill your request. Tool executions appear as inline tool cards, and reasoning models show their thinking in the collapsible Show reasoning block.

Tip: Agent mode needs a tool-calling model (e.g. huihui_ai/qwen3-abliterated:8b). With a chat-only model, turn Agent off for the most reliable replies.

Note: Tools only work with tool-calling models (see the note in Download the models). If a model can't use tools, the agent falls back to a plain answer automatically.

Warning: The model can modify files inside the project. Use it at your own risk!

πŸ” Detect Abliterated Models

python detect-abliterated.py

Queries Ollama's REST API (/api/tags) and lists all installed abliterated models with their real size in GB/MB.

About

An uncensored local LLM interface built for security engineers. It enables private, filter-free interaction with abliterated models for vulnerability analysis and advanced scripting without cloud-based restrictions.

Topics

Resources

License

Contributing

Stars

9 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors