Skip to content
ex6pPublic

Latest commit

 

History

21 Commits

Folders and files

Repository files navigation

e.bat

e.bat

An interactive CTF / Red-Team framework shell written in Go using only the standard library. It combines a fast REPL, isolated workspace sessions, PTY-backed background jobs, Metasploit-style modules, CTF utilities, reconnaissance, a findings database, a full reverse-shell generator and a web UI — all in a single static binary.

Build · Run · Config · Commands · Modules · RevShell · Web UI · Workflows · Limitations · License


Table of contents

  1. Why e.bat
  2. Features
  3. Install
  4. Build
  5. Run
  6. Config
  7. Data layout
  8. Quick start
  9. Commands
  10. Modules
  11. Reverse shell generator
  12. Web UI
  13. Recon, DB and reports
  14. crack
  15. decomp
  16. notify
  17. upty
  18. su / root
  19. workdir
  20. config file
  21. Tool categories
  22. Payload index
  23. Example workflows
  24. Tips and tricks
  25. Limitations
  26. License

Why e.bat

  • Single binary, zero dependencies — no Python, no runtime packages.
  • Stay in the shell — run interactive nc/ssh in the background and detach without losing them.
  • Isolated context — every session keeps its own variables, module and working directory.
  • Metasploit-like flow — search → use → set → run → back.
  • Full reverse-shell generator — 136 payloads (revshells.com) offline.
  • Web UI — a strict, keyboard-friendly dashboard for the same engine.
  • Everything in one hidden folder — ~/.e.bat/ for config, data, logs, recon, reports, decompiled code and temp files.

Features

  • Fast raw-mode REPL with fish-style autosuggestions and syntax highlighting.
  • Tab completion for builtins, aliases, tools, categories and file paths.
  • History with !!, !N, ↑/↓.
  • Isolated sessions (s1..s9 quick switch) with per-session vars/module/cwd.
  • PTY background jobs with real stdin, buffered output and fg attach.
  • Detach key Ctrl+G that is never forwarded (so nc/ssh stay alive).
  • Per-session background jobs (jobs, jobs all, jobs -k).
  • Metasploit-style modules (scanners + exploits via msfconsole -x).
  • CTF helpers: base64, hex, rot13, xor, URL, hashes, entropy, flag finder.
  • Recon orchestration (nmap + gobuster + nikto) into ~/.e.bat/recon/.
  • Findings database (db) with JSON persistence.
  • Markdown reports from logs.
  • Reverse-shell generator with 136 payloads and listeners.
  • Web UI with Console/Modules/Sessions/Jobs/Files/Vars/RevShell/Docs.
  • Desktop notifications on job/recon completion (notify-send).
  • Ghidra headless decompiler wrapper (decomp).
  • Crack wrapper with hash-type auto-detection (john/hashcat).
  • Root re-launch (su) that keeps the session and shows #.
  • Config file with language (en/ru), color and notify toggles.

Install

One-liner (Linux):

curl -fsSL https://raw.githubusercontent.com/ex6p/e.bat/main/install.sh | sh

or

https://github.com/ex6p/e.bat/releases/tag/ebat

The installer detects OS/arch and the package manager, creates every required directory (~/.local/bin, ~/.e.bat/...), installs the tools e.bat needs (nmap, gobuster, ffuf, nikto, sqlmap, wpscan, hydra, john, hashcat, binwalk, exiftool, nuclei, and Ghidra via AUR when available), falls back to building from source if no release asset exists, and places the binary in /usr/local/bin or ~/.local/bin (with a fallback if that isn't writable). Dependency/install failures are warnings, never fatal.

Options: --no-deps, --build, --dest <dir>, --uninstall.

Uninstall:

curl -fsSL https://raw.githubusercontent.com/ex6p/e.bat/main/install.sh | sh -s -- --uninstall

Build

go build -o e.bat .

Requires Go (tested with go1.27). PTY features require Linux (/dev/ptmx).

Verify:

go vet ./...

Run

./e.bat                 # interactive shell
./e.bat --version       # print version
./e.bat --tools         # list known tools (multi-column)
./e.bat --web --web-port 8080   # web UI on http://127.0.0.1:8080

Config

The config file lives at ~/.e.bat/e.bat.conf and is created automatically:

# e.bat configuration (key=value, # = comment)
lang=en      # en | ru
color=on     # on | off
notify=on    # desktop notifications on job/recon completion

Commands:

config                       # show current values + path
config set lang ru           # switch help language
config set color off         # disable ANSI colors
config set notify off        # disable desktop notifications
config reload                # re-read the file

Data layout

Everything is stored under the hidden ~/.e.bat/ directory:

~/.e.bat/
  e.bat.conf                 # configuration
  config/
    aliases                  # command aliases
    history                  # REPL history
    scope.txt                # scope (CIDR/domains)
    sessions/<name>/         # vars, module, cwd
  data/
    db.json                  # findings database
  logs/
    <session>-<ts>.log       # session logs
  recon/
    <target>/                # nmap.txt, gobuster.txt, nikto.txt
  reports/
    report.md, findings.md   # generated reports
  decomp/
    <bin>.c                  # decompiled C
  tmp/
    crack/hash/pot files

workdir / wd prints the path; workdir open changes into it.


Quick start

e.bat$ > log on ctf1
e.bat$ > session new s1
e.bat[s1]$ > scope add 10.10.10.0/24
e.bat[s1]$ > target=10.10.10.5
e.bat[s1]$ > use scanner/portscan/nmap
e.bat[s1](nmap)$ > set rhosts 10.10.10.5
e.bat[s1](nmap)$ > run
e.bat[s1]$ > s2
e.bat[s2]$ > jobs all
e.bat[s1]$ > report ctf1

Commands

Navigation

Command Description
help Show help
tools List tool categories (multi-column grid)
search <q> Search tools and modules
use <tool> Load a tool/module
use <category> List a category
use <category>/<tool> Load category/tool
options / show options Show current module options
set k v / k=v Set a variable/option
show Show variables
unset <k> Remove a variable
cd [path] Change directory
pwd Print working directory
workdir / wd Show ~/.e.bat
which <tool> Resolve a tool path (aliases + Ghidra)
ls [path] List files
clear Clear screen
exit / quit Exit
!cmd Force a system command

Sessions

Command Description
sessions List sessions (* = current)
session <name> Switch (create if missing)
session new <name> Create empty session
session kill <name> Delete session
s1..s9 Quick switch
save [name] Save session
load <name> Switch session

Logs and reports

Command Description
log on [name] Start logging commands + output
log off Stop logging
logs List logs
report [name] Markdown report from log

Background jobs

Command Description
<cmd> & Run in background
bg <cmd...> Background command
bg run Background the module
jobs [all|-k] List this session's jobs (all = every session, -k = clear finished)
out [id] Show captured output
fg [id] Attach (input forwarded); detach Ctrl+G
upty [id] Upgrade a dry shell to a TTY
kill <id> Kill job

CTF utilities

Command Description
b64 [-d] <text> base64 encode/decode
hex [-d] <text> hex encode/decode
rot13 <text> rot13
xor <key> <text> xor (hex + raw)
urlenc <text> URL encode
urldec <text> URL decode
md5|sha1|sha256 <f> hash file/string
entropy <file> Shannon entropy
findflag <re> [path] search for a flag by regex

Offensive helpers

Command Description
revshell <lhost> <lport> [type] reverse shell one-liner
listen <port> nc listener
recon <target> nmap + gobuster + nikto
nmap <flags> <target> [--save[=f]] nmap wrapper
msfvenom <payload> [lhost] [lport] [fmt] msfvenom wrapper
jwt <token> decode JWT
crack -w <wl> <hash> auto-detect + john/hashcat
decomp <bin> [-o out.c] Ghidra headless → C
proxychains on|off toggle proxychains
scope [add|del|clear] <x> scope guard
su / sudo -i re-launch e.bat as root

Productivity

Command Description
alias name=cmd / alias -d name aliases
history / !! / !N history
calc <expr> calculator
base <n> [from] base conversion
check check installed tools
man <tool> man page
serve [port] static file server
update update e.bat
install [tool...] install tools
notify on|off|test desktop notifications
config [set|reload] configuration
bash / sh / shell system shell (detach Ctrl+G)

Variables

  • Set: target=10.10.10.5, set target 10.10.10.5, set target=10.10.10.5.
  • Read: $target, ${target}.
  • Remove: unset target. List: show.
  • $wordlist is auto-detected at startup.

REPL keys

  • Tab completion, ↑/↓ history, Ctrl+A/E/U/K, !!/!N.
  • Ctrl+C cancels the line (does not exit); Ctrl+D on empty exits.
  • Fish-style ghost suggestions; accept with →.

Modules

Metasploit-style modules:

search eternalblue
use exploit/windows/smb/ms17_010_eternalblue
show options
set rhosts 10.10.10.5
run
back
  • Types: exploit, auxiliary, scanner, post.
  • Ranks: manual, low, average, good, excellent.
  • Scanners: scanner/portscan/nmap, scanner/http/gobuster, scanner/http/nikto, scanner/ssh/brute, scanner/smb/enum, scanner/web/log4shell, scanner/web/shellshock.
  • Exploits (via msfconsole -x): exploit/unix/ftp/vsftpd_234_backdoor, exploit/windows/smb/ms17_010_eternalblue, exploit/multi/http/struts, exploit/linux/local/baron_samedit, exploit/multi/handler.
  • Prompt shows the short module name: e.bat[s1](ms17_010_eternalblue)$ >.

Reverse shell generator

The web UI includes a full offline reverse-shell generator (modeled after revshells.com) with 136 payloads.

./e.bat --web --web-port 8080
# open the RevShell tab

Fields:

  • IP / LHOST — listener host.
  • Port — listener port.
  • OS — Linux / Mac / Windows / All (segmented buttons).
  • Type — Reverse / Bind / MSFVenom / HoaxShell / Assembled.
  • Encoding — None / URL / Double URL / Base64.
  • Payload — filtered by OS/Type.
  • Shell — placeholder (sh, bash, zsh, …) when the payload uses {shell}.
  • Listener — nc / ncat / openssl / pwncat / msfconsole / hoaxshell.

Outputs: Shell (command for the target) and Listener (command to run), with copy buttons.


Web UI

./e.bat --web --web-port 8080

Sidebar tabs:

  • Console — run commands, live output.
  • Modules — tool grid with filter and use buttons.
  • Sessions — list/switch/create.
  • Jobs — live status, out/kill.
  • Files — ~/.e.bat tree with file preview.
  • Vars — variables table.
  • RevShell — reverse-shell generator.
  • Docs — help text.

Stats panel: tools ready / sessions / running jobs / variables. Theme: Everforest (dark/light toggle), strict square design, no neon.


Recon, DB and reports

recon 10.10.10.5
db add host 10.10.10.5
db add port 22,80,443
db query web
db export findings.md
db clear
scope add 10.10.10.0/24
report ctf1
  • recon writes to ~/.e.bat/recon/<target>/.
  • db persists to ~/.e.bat/data/db.json.
  • report writes to ~/.e.bat/reports/.

crack

crack -w /path/rockyou.txt 5f4dcc3b5aa765d61d8327deb882cf99
crack --show -w /path/list.txt <hash>

Auto-detects hash type (hex length, $2*$/$5$/$6$/$1$), uses john then hashcat, decompresses .gz, and uses a one-shot pot so the password is always printed.


decomp

decomp /bin/true
decomp /bin/true -o out.c

Uses Ghidra headless (GHIDRA env, ~/ghidra/ghidra_*, /opt/ghidra*) and writes C to ~/.e.bat/decomp/ by default. Runs in the background.


notify

Desktop notifications via notify-send:

notify            # status
notify test       # send a test
notify off        # disable
notify on         # enable

Fires on background job completion and recon completion.


upty

Upgrade a dry (no-PTY) background shell to a full TTY:

nc 10.0.0.5 4444 &
upty 0
fg 0

Tries, in order: python3, python, python2, script, perl, exec bash, exec sh.


su / root

su

Re-launches e.bat as root (via sudo, or su root -c), preserving the current session through E_BAT_SESSION. The root prompt shows #. exit returns to the normal shell. sudo <cmd> still runs the system sudo.


workdir

workdir           # print ~/.e.bat
workdir open      # cd into ~/.e.bat
wd                # alias

config file

See Config. Keys: lang (en/ru), color (on/off), notify (on/off). Editable via config set or by editing ~/.e.bat/e.bat.conf.


Tool categories

  • Information Gathering
  • Web
  • Cracking
  • Forensics
  • Steganography
  • Reversing
  • Network
  • Active Directory
  • Wireless
  • Cloud
  • Tunneling
  • OSINT
  • Mobile

tools prints them as a multi-column grid that wraps by terminal width.


Payload index

The RevShell generator bundles the following payload families (136 total):

Reverse — Linux / Mac

  • Bash -i
  • Bash 196
  • Bash read line
  • Bash 5
  • Bash udp
  • nc mkfifo
  • nc -e
  • nc -c
  • ncat -e
  • ncat udp
  • curl
  • rustcat
  • C
  • C# TCP Client
  • C# Bash -i
  • Haskell #1
  • OpenSSL
  • Perl
  • Perl no sh
  • Perl PentestMonkey
  • PHP PentestMonkey
  • PHP Ivan Sincek
  • PHP cmd
  • PHP cmd 2
  • PHP cmd small
  • PHP exec
  • PHP shell_exec
  • PHP system
  • PHP passthru
  • PHP `
  • PHP popen
  • PHP proc_open
  • Python3
  • Python2
  • Ruby
  • Socat
  • Awk
  • Gawk
  • Node
  • Lua
  • Zsh

Reverse — Windows

  • nc.exe -e
  • ncat.exe -e
  • C Windows
  • Windows ConPty
  • PowerShell #1
  • PowerShell #2
  • PowerShell #3
  • PowerShell #4 (TLS)
  • PowerShell #3 (Base64)
  • PowerShell #5 (stderr support) (Base64)
  • P0wny Shell (Webshell)
  • cmd / powershell one-liner
  • python (cmd.exe)

Bind

  • nc bind
  • ncat bind
  • python3 bind
  • powershell bind
  • MacOS Bind TCP (x64)
  • Windows bind variants

MSFVenom

  • linux/x86/shell_reverse_tcp
  • linux/x64/shell_reverse_tcp
  • windows/x64/shell_reverse_tcp
  • windows/x86/meterpreter/reverse_tcp
  • cmd/unix/reverse_bash
  • python/shell_reverse_tcp
  • macOS/meterpreter variants

HoaxShell / Assembled

  • HoaxShell (linux/windows)
  • Assembled (multi-stage)

The full list is embedded in web/js/data.js and rendered client-side.


Example workflows

Recon → report

e.bat$ > log on ctf1
e.bat$ > recon 10.10.10.5
e.bat$ > db query
e.bat$ > report ctf1

Background interactive shell

e.bat$ > bg nc -lvnp 4444
e.bat$ > fg 0
# detach with Ctrl+G
e.bat$ > jobs
e.bat$ > out 0

Dry shell upgrade

e.bat$ > nc 10.0.0.5 4444 &
e.bat$ > upty 0
e.bat$ > fg 0

Module flow

e.bat$ > search eternalblue
e.bat$ > use exploit/windows/smb/ms17_010_eternalblue
e.bat[s1](ms17_010_eternalblue)$ > set rhosts 10.10.10.5
e.bat[s1](ms17_010_eternalblue)$ > run

Reverse shell from web

./e.bat --web
# RevShell tab → Linux / Reverse / bash -i → copy shell + listener
listen 4444
# run the shell on target

Tips and tricks

  • Use !cmd to bypass builtins when a system command shares a name.
  • jobs all shows background jobs from every session.
  • jobs -k clears finished jobs of the current session.
  • config set lang ru switches help to Russian.
  • config set color off disables ANSI (useful for piping).
  • workdir open jumps to the data folder.
  • which ghidra resolves Ghidra even without a PATH entry.
  • notify test verifies the desktop notification daemon.
  • su keeps your session when elevating to root.

Limitations

  • PTY / /dev/ptmx — Linux only.
  • recon / install need root and/or network.
  • Interactive fg requires a real tty.
  • meter upload/download removed; use upty + fg.
  • Desktop notifications require a running daemon (dunst, etc.).

Tool reference

Information Gathering

Tool Command Description
nmap nmap Network scanner
masscan masscan Fast port scanner
rustscan rustscan Fast port scanner
whatweb whatweb Web technology fingerprint
sublist3r sublist3r Subdomain enumeration
theharvester theharvester Email/domain harvester
dnsrecon dnsrecon DNS enumeration
whois whois WHOIS lookup
dig dig DNS lookup
amass amass In-scope asset discovery
subfinder subfinder Passive subdomain discovery
fierce fierce DNS reconnaissance
dnsmap dnsmap Subdomain brute force
enum4linux enum4linux SMB enumeration
snmpwalk snmpwalk SNMP enumeration

Web

Tool Command Description
sqlmap sqlmap SQL injection
nikto nikto Web scanner
wpscan wpscan WordPress scanner
gobuster gobuster Directory/file brute force
ffuf ffuf Web fuzzer
wfuzz wfuzz Web fuzzer
dirb dirb Directory brute force
nuclei nuclei Vulnerability scanner
dirsearch dirsearch Directory brute force
feroxbuster feroxbuster Directory brute force
katana katana Web crawler
httpx httpx HTTP probe
commix commix Command injection
joomscan joomscan Joomla scanner
droopescan droopescan Drupal scanner

Cracking

Tool Command Description
john john Password cracker
hashcat hashcat GPU cracker
hydra hydra Online brute force
medusa medusa Parallel login brute
crunch crunch Wordlist generator
hashid hashid Hash identifier
cewl cewl Custom wordlist generator
cupp cupp Common user password profiler
princeprocessor princeprocessor PRINCE attack

Forensics

Tool Command Description
binwalk binwalk Firmware analysis
exiftool exiftool Metadata viewer
foremost foremost File carving
scalpel scalpel File carving
volatility volatility Memory forensics
strings strings Extract strings
gdb gdb GNU debugger

Steganography

Tool Command Description
steghide steghide Steganography tool
zsteg zsteg PNG/BMP steg detector
stegcracker stegcracker Steghide brute force
outguess outguess Steganography tool

Reversing

Tool Command Description
gdb gdb GNU debugger
radare2 radare2 Reverse engineering framework
r2 r2 radare2 alias
objdump objdump Disassembler
readelf readelf ELF header info
nm nm List symbols
ltrace ltrace Library call tracer
strace strace Syscall tracer
ghidra ghidra Reverse engineering (GUI)
checksec checksec ELF hardening check
ropper ropper ROP gadget finder
one_gadget one_gadget Find execve gadgets

Network

Tool Command Description
tcpdump tcpdump Packet capture
tshark tshark Terminal packet analyzer
netcat nc TCP/UDP connections
socat socat Multipurpose relay
proxychains proxychains Proxy chains
chisel chisel TCP/UDP tunnel
ligolo ligolo Tunneling
iodine iodine DNS tunnel

Active Directory

Tool Command Description
impacket impacket AD toolkit
secretsdump secretsdump.py Dump SAM/LSASS secrets
bloodhound bloodhound-python BloodHound collector
ldapsearch ldapsearch LDAP search
nxc nxc Network execution
evil-winrm evil-winrm WinRM shell

Wireless

Tool Command Description
aircrack-ng aircrack-ng Wi-Fi cracking
reaver reaver WPS attack
wifite wifite Automated Wi-Fi attack

Cloud

Tool Command Description
awscli aws AWS CLI
gcloud gcloud Google Cloud CLI
az az Azure CLI
scoutsuite ScoutSuite Cloud security audit

Tunneling

Tool Command Description
chisel chisel TCP/UDP tunnel
ssh ssh SSH tunnel
proxychains proxychains Proxy chains
ngrok ngrok Expose local port

OSINT

Tool Command Description
theharvester theharvester Email/domain harvester
subfinder subfinder Subdomain discovery
amass amass Asset discovery
whatweb whatweb Web fingerprint

Mobile

Tool Command Description
adb adb Android debug bridge
frida frida Dynamic instrumentation
objection objection Runtime exploration

Payload details

Each payload in the generator has an OS meta list and a command type. The table below summarizes the most common ones.

Payload OS Type Notes
Bash -i linux, mac reverse /dev/tcp
Bash 196 linux, mac reverse fd 196
Bash read line linux, mac reverse read loop
Bash 5 linux, mac reverse fd 5
Bash udp linux, mac reverse /dev/udp
nc mkfifo linux, mac reverse mkfifo
nc -e linux, mac reverse netcat exec
nc -c linux, mac reverse netcat cmd
ncat -e linux, mac reverse ncat exec
ncat udp linux, mac reverse ncat udp
curl linux, mac reverse telnet over curl
rustcat linux, mac reverse rcat
C linux, mac reverse C source
C Windows windows reverse winsock
C# TCP Client linux, windows reverse C# source
C# Bash -i linux, windows reverse C# source
Haskell #1 linux, mac reverse haskell
OpenSSL linux, mac reverse s_client
Perl linux, mac reverse socket
Perl no sh linux, mac reverse IO::Socket
Perl PentestMonkey linux, mac reverse full script
PHP PentestMonkey linux, windows, mac reverse full script
PHP Ivan Sincek linux, windows, mac reverse class
PHP cmd linux, windows, mac reverse webshell
PHP cmd 2 linux, windows, mac reverse webshell
PHP cmd small linux, windows, mac reverse tiny
PHP exec linux, mac reverse exec
PHP shell_exec linux, mac reverse shell_exec
PHP system linux, windows, mac reverse system
PHP passthru linux, mac reverse passthru
PHP ` linux, windows, mac reverse backtick
PHP popen linux, windows, mac reverse popen
PHP proc_open linux, windows, mac reverse proc_open
Windows ConPty windows reverse ConPtyShell
PowerShell #1 windows reverse TCPClient
PowerShell #2 windows reverse one-liner
PowerShell #3 windows reverse hidden
PowerShell #4 (TLS) windows reverse TLS
PowerShell #3 (Base64) windows reverse base64
PowerShell #5 (stderr) windows reverse stderr
P0wny Shell linux, windows, mac reverse webshell
nc bind linux bind listener
ncat bind linux bind listener
python3 bind linux bind listener
powershell bind windows bind listener
linux/x86/shell_reverse_tcp linux msfvenom elf
linux/x64/shell_reverse_tcp linux msfvenom elf
windows/x64/shell_reverse_tcp windows msfvenom exe
windows/x86/meterpreter windows msfvenom exe
cmd/unix/reverse_bash all msfvenom raw
python/shell_reverse_tcp all msfvenom raw

FAQ

Q: How do I update e.bat? A: update, or rebuild with go build -o e.bat ..

Q: Where is data stored? A: All under ~/.e.bat/. Run workdir to see the path.

Q: How do I change the language? A: config set lang ru (or edit ~/.e.bat/e.bat.conf).

Q: How do I disable colors? A: config set color off.

Q: How do I get desktop notifications? A: Ensure notify-send and a daemon (dunst) are running; notify test.

Q: Why is Ghidra shown as not installed? A: It is detected via findGhidra() (GHIDRA env, ~/ghidra/ghidra_*, /opt/ghidra*). which ghidra shows the resolved path.

Q: How do I upgrade a dry shell? A: upty <id> then fg <id>.

Q: How do I become root without losing the session? A: su — e.bat re-launches as root with the same session.

Q: How do I see jobs from other sessions? A: jobs all.

Q: How do I clear finished jobs? A: jobs -k (current session).


Troubleshooting

  • fg says "no such job" — check jobs; ids are per-session.
  • upty says no PTY — the job was started in buffered fallback; restart it.
  • notify does nothing — no notification daemon; run notify test.
  • decomp fails — set GHIDRA or place Ghidra in ~/ghidra/.
  • recon/install fail — need root and/or network.
  • Colors look broken when piping — config set color off.
  • Web UI buttons dead — hard-refresh (the generator loads data.js).

Comparison

Feature e.bat Plain shell
Sessions yes no
Background PTY jobs yes no
Modules yes no
CTF helpers yes no
RevShell generator yes no
Web UI yes no
Single binary yes n/a

Web API

The web UI talks to these endpoints:

Endpoint Method Description
/ GET HTML UI
/js/data.js GET embedded payload data
/api/prompt GET current prompt string
/exec POST run a command, returns output
/api/modules GET tool categories + install status
/api/sessions GET sessions list
/api/jobs GET background jobs
/api/files GET ~/.e.bat tree
/api/file?path= GET file content (within workdir)
/api/out?id= GET job output
/api/vars GET variables
/api/docs GET help text

Database schema

~/.e.bat/data/db.json is a JSON array of findings:

[
  {"type":"host","value":"10.10.10.5","ts":"2026-11-29T04:00:00Z"},
  {"type":"port","value":"22,80,443","ts":"2026-11-29T04:01:00Z"},
  {"type":"cred","value":"admin:password","ts":"2026-11-29T04:02:00Z"},
  {"type":"flag","value":"flag{...}","ts":"2026-11-29T04:03:00Z"},
  {"type":"note","value":"...","ts":"2026-11-29T04:04:00Z"}
]

Types: host, port, cred, flag, note.

Session file format

~/.e.bat/config/sessions/<name>/:

  • vars — key=value lines.
  • module — current module path.
  • cwd — working directory.

Sessions are isolated: switching restores vars/module/cwd.

Full payload list

The generator bundles 136 payloads. The complete list (name — type):

  • Bash -i — reverse
  • Bash 196 — reverse
  • Bash read line — reverse
  • Bash 5 — reverse
  • Bash udp — reverse
  • nc mkfifo — reverse
  • nc -e — reverse
  • nc.exe -e — reverse
  • BusyBox nc -e — reverse
  • nc -c — reverse
  • ncat -e — reverse
  • ncat.exe -e — reverse
  • ncat udp — reverse
  • curl — reverse
  • rustcat — reverse
  • C — reverse
  • C Windows — reverse
  • C# TCP Client — reverse
  • C# Bash -i — reverse
  • Haskell #1 — reverse
  • OpenSSL — reverse
  • Perl — reverse
  • Perl no sh — reverse
  • Perl PentestMonkey — reverse
  • PHP PentestMonkey — reverse
  • PHP Ivan Sincek — reverse
  • PHP cmd — reverse
  • PHP cmd 2 — reverse
  • PHP cmd small — reverse
  • PHP exec — reverse
  • PHP shell_exec — reverse
  • PHP system — reverse
  • PHP passthru — reverse
  • PHP ` — reverse
  • PHP popen — reverse
  • PHP proc_open — reverse
  • Windows ConPty — reverse
  • PowerShell #1 — reverse
  • PowerShell #2 — reverse
  • PowerShell #3 — reverse
  • PowerShell #4 (TLS) — reverse
  • PowerShell #3 (Base64) — reverse
  • PowerShell #5 (stderr support) (Base64) — reverse
  • P0wny Shell (Webshell) — reverse
  • Python3 — reverse
  • Python2 — reverse
  • Ruby — reverse
  • Socat — reverse
  • Awk — reverse
  • Gawk — reverse
  • Node — reverse
  • Lua — reverse
  • Zsh — reverse
  • nc bind — bind
  • ncat bind — bind
  • python3 bind — bind
  • powershell bind — bind
  • MacOS Bind TCP (x64) — bind
  • linux/x86/shell_reverse_tcp — msfvenom
  • linux/x64/shell_reverse_tcp — msfvenom
  • windows/x64/shell_reverse_tcp — msfvenom
  • windows/x86/meterpreter/reverse_tcp — msfvenom
  • cmd/unix/reverse_bash — msfvenom
  • python/shell_reverse_tcp — msfvenom
  • HoaxShell (linux) — hoaxshell
  • HoaxShell (windows) — hoaxshell
  • Assembled (multi-stage) — assembled

The exact list is in web/js/data.js (136 entries incl. variants).

Keyboard shortcuts

Key Action
Tab completion
↑ / ↓ history
Ctrl+A start of line
Ctrl+E end of line
Ctrl+U clear line
Ctrl+K kill to end
Ctrl+C cancel line (not exit)
Ctrl+D exit on empty
Ctrl+G detach from fg/shell
→ accept ghost suggestion
!! repeat last
!N run history item N

Config reference

Key Values Default
lang en, ru en
color on, off on
notify on, off on

Environment variables

Var Effect
GHIDRA path to Ghidra install
E_BAT_SESSION session to load on start (used by su)

More examples

Decode a flag

e.bat$ > b64 -d ZmxhZ3tiYXNlNjR9

Hash a file

e.bat$ > sha256 /etc/passwd

Entropy

e.bat$ > entropy /path/blob.bin

Find flags

e.bat$ > findflag 'flag\{[^}]+\}' /path

Crack

e.bat$ > crack -w rockyou.txt 5f4dcc3b5aa765d61d8327deb882cf99

Decompile

e.bat$ > decomp /bin/ls -o ls.c

Listen + reverse shell

e.bat$ > listen 4444
e.bat$ > revshell 10.0.0.5 4444 python

Scope

e.bat$ > scope add 10.10.10.0/24
e.bat$ > scope add example.com

Report

e.bat$ > log on ctf1
e.bat$ > recon 10.10.10.5
e.bat$ > report ctf1

Modules list

Path Type Rank Description
scanner/portscan/nmap scanner good nmap port scan
scanner/http/gobuster scanner good directory brute
scanner/http/nikto scanner average web scan
scanner/ssh/brute scanner average ssh brute
scanner/smb/enum scanner good smb enum
scanner/web/log4shell scanner excellent log4shell check
scanner/web/shellshock scanner excellent shellshock check
exploit/unix/ftp/vsftpd_234_backdoor exploit excellent vsftpd backdoor
exploit/windows/smb/ms17_010_eternalblue exploit excellent eternalblue
exploit/multi/http/struts exploit excellent struts RCE
exploit/linux/local/baron_samedit exploit great baron samedit
exploit/multi/handler exploit manual msf handler

Recipes

Install a missing tool

e.bat$ > install gobuster
e.bat$ > install nmap sqlmap

Alias a workflow

e.bat$ > alias full=use scanner/portscan/nmap
e.bat$ > full

Background a module

e.bat[s1](nmap)$ > bg run
e.bat[s1]$ > jobs
e.bat[s1]$ > out 0

Switch sessions quickly

e.bat$ > s1
e.bat$ > s2
e.bat$ > session default

Save and load

e.bat$ > save
e.bat$ > load s1

Proxy

e.bat$ > proxychains on
e.bat$ > nmap -sT -Pn 10.10.10.5

JWT

e.bat$ > jwt eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIn0.dozjgNryP4J3jVmNHl0w5N_XgL0n3I9PlFUP0THsR8U

msfvenom

e.bat$ > msfvenom linux/x64/shell_reverse_tcp 10.0.0.5 4444 elf

nmap save

e.bat$ > nmap -sV -p- 10.10.10.5 --save

Payload matrix by OS

OS Reverse Bind MSFVenom
Linux bash, nc, ncat, socat, python, perl, php, ruby, awk, node, lua, zsh, C, C#, Haskell, OpenSSL, rustcat, curl nc, ncat, python3 x86/x64 elf
Mac bash, nc, python3, perl, php, ruby, awk, C, Haskell, OpenSSL — macOS meterpreter
Windows nc.exe, ncat.exe, C, C#, ConPty, PowerShell #1-5, P0wny, python powershell x64 exe, x86 meterpreter
All cmd/unix, python — raw

Glossary

  • REPL — read-eval-print loop.
  • PTY — pseudo-terminal (real stdin/stdout for a process).
  • Job — a background process managed by e.bat.
  • Session — isolated vars + module + cwd.
  • Module — a Metasploit-style scanner/exploit.
  • Scope — allowed targets (CIDR/domains).
  • Finding — a db entry (host/port/cred/flag/note).
  • Listener — a netcat/msfconsole waiting for a shell.
  • Payload — a reverse/bind shell command.
  • Ghost text — fish-style inline suggestion.

Security note

This tool is for authorized security testing and CTF use only. Do not use it against systems you do not own or have explicit permission to test. The authors accept no liability for misuse.

Anatomy of a command

A command line is parsed as:

name arg1 arg2 ... &
  • The first token selects a builtin, alias, or system command.
  • name=value sets a variable (shortest form).
  • set k v / set k=v set a variable explicitly.
  • $name / ${name} expand variables.
  • A trailing & runs the command in the background.
  • !cmd forces the system command (bypass builtins).

Examples:

target=10.10.10.5
nmap $target -p-
gobuster dir -u http://$target -w $wordlist &
!ls -la

Examples gallery

One-liners

b64 <text>
hex <text>
rot13 <text>
xor key <text>
urlenc <text>
urldec <text>
md5 file
sha1 file
sha256 file
entropy file
findflag 'flag\{.*\}' .

Sessions

session new s1
s2
session kill s2
sessions
save
load s1

Jobs

bg sleep 100
jobs
out 0
fg 0
kill 0
jobs -k
jobs all

Modules

search nmap
use scanner/portscan/nmap
show options
set rhosts 10.10.10.5
run
back

Web

./e.bat --web --web-port 8080

Config

config
config set lang ru
config set color off
config set notify on
config reload

Root

su
# now root, prompt #
exit

Workdir

workdir
workdir open
wd

Which

which ghidra
which nmap
which radare2

Notify

notify
notify test
notify off

upty

nc 10.0.0.5 4444 &
upty 0
fg 0

Performance tips

  • Prefer bg for long scans; keep the REPL responsive.
  • Use jobs -k to drop finished jobs.
  • Use sessions to isolate contexts (vars/module/cwd).
  • Disable colors when piping: config set color off.
  • Use findflag with a tight regex to avoid huge scans.

Roadmap

  • Auto-write recon findings into db.
  • creds / loot / note structured findings.
  • autorecon <target> orchestrator.
  • parse <file> extractor.
  • cd - and Ctrl+R (fzf history).
  • Per-session config overrides.
  • WebSocket live out in the web UI.
  • PDF report export.

Credits

  • Inspired by Metasploit, revshells.com, and the CTF community.
  • Built with the Go standard library only.

Payload variants

Common variants you can generate:

  • Bash (sh, bash, zsh, dash, ksh) over /dev/tcp and /dev/udp.
  • netcat (nc, ncat, busybox nc, ncat.exe) with -e/-c.
  • Python2/Python3 sockets.
  • PHP (exec, shell_exec, system, passthru, popen, proc_open, backtick).
  • Perl (Socket, IO::Socket, PentestMonkey).
  • Ruby, Node, Lua, Awk, Gawk, Zsh.
  • C / C# / Haskell / OpenSSL / rustcat / curl.
  • PowerShell #1-#5 (incl. TLS and Base64).
  • Bind shells (nc, ncat, python3, powershell).
  • MSFVenom payloads (linux/windows/mac, x86/x64).
  • HoaxShell and Assembled.

Notes

  • The generator runs fully client-side from embedded data.js.
  • Encodings: None, URL, Double URL, Base64.
  • The {shell} placeholder is replaced with the selected shell.
  • The listener is generated from the selected listener template.

Changelog

  • 0.2.0 — web UI, RevShell generator (136 payloads), config file, per-session jobs, upty, su, workdir, which, notify, multi-column tools.
  • 0.1.0 — initial REPL, sessions, jobs, modules, recon, db, crack, decomp.

Contributing

  1. Fork the repo.
  2. Create a branch.
  3. go build and go vet.
  4. Open a pull request.

PRs welcome.


Support

More

  • The web UI is strict Everforest, square, no neon.
  • All data lives in ~/.e.bat/.
  • The RevShell tab is offline (embedded data.js).
  • Desktop notifications use notify-send.
  • Sessions are isolated; jobs are per-session.
  • Detach key is Ctrl+G (never forwarded).

License

MIT License

Copyright (c) 2026 ex6p

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

For authorized security testing and CTF use only. The authors are not responsible for misuse.

Releases

Packages

Contributors

Languages