icoa-cli 2.19.458 → 2.19.460
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/ai4ctf.js +1 -1
- package/dist/commands/ctf4ai-demo.js +1 -1
- package/dist/commands/ctf4vla.js +1 -1
- package/dist/commands/exam.js +1 -1
- package/dist/commands/learn.js +1 -1
- package/dist/commands/ref.js +1 -1
- package/dist/lib/lazy-assets.js +1 -0
- package/dist/lib/py-syntax.js +1 -1
- package/package.json +1 -2
- package/dist/commands/ai4ctf.d.ts +0 -4
- package/dist/commands/ai4ioai.d.ts +0 -29
- package/dist/commands/aienv.d.ts +0 -23
- package/dist/commands/arena-eai.d.ts +0 -37
- package/dist/commands/arena.d.ts +0 -8
- package/dist/commands/board.d.ts +0 -2
- package/dist/commands/challenge.d.ts +0 -9
- package/dist/commands/comms.d.ts +0 -2
- package/dist/commands/connect.d.ts +0 -15
- package/dist/commands/ctf.d.ts +0 -3
- package/dist/commands/ctf4ai-demo.d.ts +0 -4
- package/dist/commands/ctf4vla.d.ts +0 -34
- package/dist/commands/demo2.d.ts +0 -31
- package/dist/commands/demo4.d.ts +0 -3
- package/dist/commands/demo5.d.ts +0 -3
- package/dist/commands/doctor.d.ts +0 -2
- package/dist/commands/env.d.ts +0 -5
- package/dist/commands/exam.d.ts +0 -13
- package/dist/commands/files.d.ts +0 -2
- package/dist/commands/ioailab.d.ts +0 -1
- package/dist/commands/ipynb.d.ts +0 -20
- package/dist/commands/kaggle.d.ts +0 -12
- package/dist/commands/lang.d.ts +0 -2
- package/dist/commands/learn.d.ts +0 -16
- package/dist/commands/log.d.ts +0 -2
- package/dist/commands/note.d.ts +0 -25
- package/dist/commands/ref.d.ts +0 -2
- package/dist/commands/setup.d.ts +0 -2
- package/dist/commands/shell.d.ts +0 -35
- package/dist/commands/sim.d.ts +0 -32
- package/dist/commands/sprint.d.ts +0 -7
- package/dist/commands/teleload.d.ts +0 -8
- package/dist/commands/theme.d.ts +0 -13
- package/dist/commands/view.d.ts +0 -2
- package/dist/index.d.ts +0 -2
- package/dist/lib/access.d.ts +0 -14
- package/dist/lib/aienv.d.ts +0 -118
- package/dist/lib/arena-edit-dynamics.d.ts +0 -55
- package/dist/lib/arena-submit.d.ts +0 -23
- package/dist/lib/banner.d.ts +0 -9
- package/dist/lib/bgtasks.d.ts +0 -21
- package/dist/lib/board-render.d.ts +0 -14
- package/dist/lib/budget.d.ts +0 -1
- package/dist/lib/card-engine.d.ts +0 -45
- package/dist/lib/challenge-dir.d.ts +0 -1
- package/dist/lib/colors.d.ts +0 -11
- package/dist/lib/commands.d.ts +0 -53
- package/dist/lib/comms.d.ts +0 -40
- package/dist/lib/config.d.ts +0 -8
- package/dist/lib/countdown.d.ts +0 -4
- package/dist/lib/country-lang.d.ts +0 -1
- package/dist/lib/ctfd-client.d.ts +0 -33
- package/dist/lib/deck-cooldown.d.ts +0 -7
- package/dist/lib/demo-exam.d.ts +0 -28
- package/dist/lib/demo-flags.d.ts +0 -8
- package/dist/lib/demo-stats.d.ts +0 -17
- package/dist/lib/docker-probe.d.ts +0 -45
- package/dist/lib/drafts.d.ts +0 -11
- package/dist/lib/editor-spawn.d.ts +0 -28
- package/dist/lib/exam-client.d.ts +0 -15
- package/dist/lib/exam-sandbox.d.ts +0 -15
- package/dist/lib/exam-setup.d.ts +0 -19
- package/dist/lib/exam-state.d.ts +0 -42
- package/dist/lib/gemini.d.ts +0 -16
- package/dist/lib/gpu.d.ts +0 -51
- package/dist/lib/http.d.ts +0 -35
- package/dist/lib/i18n.d.ts +0 -215
- package/dist/lib/input-dynamics.d.ts +0 -38
- package/dist/lib/integrity-snapshot.d.ts +0 -22
- package/dist/lib/interactive-spawn.d.ts +0 -25
- package/dist/lib/ipynb-input.d.ts +0 -25
- package/dist/lib/kaggle.d.ts +0 -115
- package/dist/lib/kernel-protocol.d.ts +0 -92
- package/dist/lib/kernel.d.ts +0 -81
- package/dist/lib/learn-ai.d.ts +0 -159
- package/dist/lib/learn-contest.d.ts +0 -141
- package/dist/lib/learn-curricula.d.ts +0 -274
- package/dist/lib/learn-i18n.d.ts +0 -8
- package/dist/lib/learn-input.d.ts +0 -40
- package/dist/lib/learn-outcome.d.ts +0 -1
- package/dist/lib/learn-render.d.ts +0 -107
- package/dist/lib/learn-replies.d.ts +0 -42
- package/dist/lib/learn-state.d.ts +0 -66
- package/dist/lib/log-sync.d.ts +0 -2
- package/dist/lib/logger.d.ts +0 -12
- package/dist/lib/main-rl.d.ts +0 -20
- package/dist/lib/md-term.d.ts +0 -17
- package/dist/lib/menu-nav.d.ts +0 -25
- package/dist/lib/notebook-doc.d.ts +0 -38
- package/dist/lib/open-file.d.ts +0 -35
- package/dist/lib/paper-upgrade.d.ts +0 -27
- package/dist/lib/platform.d.ts +0 -110
- package/dist/lib/py-syntax.d.ts +0 -36
- package/dist/lib/render-card.d.ts +0 -17
- package/dist/lib/repl-asker.d.ts +0 -7
- package/dist/lib/resume.d.ts +0 -7
- package/dist/lib/sample-runner.d.ts +0 -14
- package/dist/lib/sandbox.d.ts +0 -30
- package/dist/lib/secure-store.d.ts +0 -18
- package/dist/lib/shell-split.d.ts +0 -17
- package/dist/lib/sim-cooldown.d.ts +0 -14
- package/dist/lib/sprint-meta.d.ts +0 -72
- package/dist/lib/statusline.d.ts +0 -1
- package/dist/lib/terminal-cleanup.d.ts +0 -35
- package/dist/lib/theme.d.ts +0 -4
- package/dist/lib/token-format.d.ts +0 -41
- package/dist/lib/tool-man.d.ts +0 -11
- package/dist/lib/toolset-hash.d.ts +0 -15
- package/dist/lib/translation.d.ts +0 -1
- package/dist/lib/translations-fetcher.d.ts +0 -6
- package/dist/lib/ui.d.ts +0 -12
- package/dist/lib/update-check.d.ts +0 -1
- package/dist/lib/version.d.ts +0 -8
- package/dist/repl.d.ts +0 -4
- package/dist/types/index.d.ts +0 -221
- package/refs/ROPgadget.txt +0 -67
- package/refs/base64.txt +0 -63
- package/refs/bash.txt +0 -79
- package/refs/binwalk.txt +0 -43
- package/refs/bs4.txt +0 -61
- package/refs/checksec.txt +0 -57
- package/refs/curl.txt +0 -73
- package/refs/cyberchef.txt +0 -78
- package/refs/exiftool.txt +0 -50
- package/refs/ffuf.txt +0 -73
- package/refs/gcc.txt +0 -66
- package/refs/gdb.txt +0 -83
- package/refs/hashcat.txt +0 -64
- package/refs/hint.txt +0 -48
- package/refs/icoa.txt +0 -72
- package/refs/john.txt +0 -74
- package/refs/linux.txt +0 -58
- package/refs/nc.txt +0 -64
- package/refs/nmap.txt +0 -57
- package/refs/numpy.txt +0 -59
- package/refs/openssl.txt +0 -75
- package/refs/pillow.txt +0 -67
- package/refs/pwntools.txt +0 -79
- package/refs/pycrypto.txt +0 -77
- package/refs/python.txt +0 -103
- package/refs/r2.txt +0 -85
- package/refs/regex.txt +0 -73
- package/refs/requests.txt +0 -83
- package/refs/rules.txt +0 -28
- package/refs/scapy.txt +0 -80
- package/refs/sqlmap.txt +0 -69
- package/refs/steghide.txt +0 -71
- package/refs/struct.txt +0 -61
- package/refs/sympy.txt +0 -77
- package/refs/tshark.txt +0 -65
- package/refs/vim.txt +0 -74
- package/refs/volatility.txt +0 -41
- package/refs/z3.txt +0 -78
package/refs/hashcat.txt
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
Hashcat Quick Reference
|
|
2
|
-
=======================
|
|
3
|
-
|
|
4
|
-
BASIC USAGE
|
|
5
|
-
hashcat -m MODE hash.txt wordlist.txt
|
|
6
|
-
hashcat -m MODE hash.txt -a 3 ?a?a?a?a?a (brute force)
|
|
7
|
-
|
|
8
|
-
COMMON HASH MODES (-m)
|
|
9
|
-
0 MD5
|
|
10
|
-
100 SHA1
|
|
11
|
-
1400 SHA256
|
|
12
|
-
1700 SHA512
|
|
13
|
-
1800 sha512crypt ($6$)
|
|
14
|
-
3200 bcrypt
|
|
15
|
-
1000 NTLM
|
|
16
|
-
5600 NetNTLMv2
|
|
17
|
-
13100 Kerberos TGS-REP (Kerberoast)
|
|
18
|
-
22000 WPA-PBKDF2-PMKID+EAPOL
|
|
19
|
-
500 MD5crypt ($1$)
|
|
20
|
-
7400 SHA256crypt ($5$)
|
|
21
|
-
11600 7-Zip
|
|
22
|
-
13400 KeePass
|
|
23
|
-
16800 WPA-PMKID-PBKDF2
|
|
24
|
-
|
|
25
|
-
ATTACK MODES (-a)
|
|
26
|
-
0 Dictionary (wordlist)
|
|
27
|
-
1 Combination (word1+word2)
|
|
28
|
-
3 Brute-force / mask
|
|
29
|
-
6 Wordlist + mask
|
|
30
|
-
7 Mask + wordlist
|
|
31
|
-
|
|
32
|
-
MASK CHARSETS
|
|
33
|
-
?l Lowercase [a-z]
|
|
34
|
-
?u Uppercase [A-Z]
|
|
35
|
-
?d Digits [0-9]
|
|
36
|
-
?s Special chars
|
|
37
|
-
?a All printable
|
|
38
|
-
?b All bytes (0x00-0xff)
|
|
39
|
-
|
|
40
|
-
RULES
|
|
41
|
-
hashcat -m 0 hash.txt wordlist.txt -r rules/best64.rule
|
|
42
|
-
hashcat -m 0 hash.txt wordlist.txt -r rules/rockyou-30000.rule
|
|
43
|
-
|
|
44
|
-
OPTIONS
|
|
45
|
-
--show Show cracked passwords
|
|
46
|
-
--force Ignore warnings
|
|
47
|
-
-o output.txt Output file
|
|
48
|
-
-w 3 Workload profile (1-4)
|
|
49
|
-
--potfile-disable Don't use potfile
|
|
50
|
-
--username Hash file has usernames
|
|
51
|
-
-O Optimized kernels
|
|
52
|
-
|
|
53
|
-
COMMON CTF PATTERNS
|
|
54
|
-
# MD5 dictionary
|
|
55
|
-
hashcat -m 0 hash.txt /usr/share/wordlists/rockyou.txt
|
|
56
|
-
|
|
57
|
-
# SHA256 with rules
|
|
58
|
-
hashcat -m 1400 hash.txt wordlist.txt -r rules/best64.rule
|
|
59
|
-
|
|
60
|
-
# Brute force 6-char alphanumeric
|
|
61
|
-
hashcat -m 0 hash.txt -a 3 ?a?a?a?a?a?a
|
|
62
|
-
|
|
63
|
-
# Known format: flag{????}
|
|
64
|
-
hashcat -m 0 hash.txt -a 3 "flag{?a?a?a?a}"
|
package/refs/hint.txt
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
AI Hint System Reference
|
|
2
|
-
========================
|
|
3
|
-
|
|
4
|
-
LEVELS
|
|
5
|
-
Level A — General Guidance (50 uses)
|
|
6
|
-
- Conceptual direction only
|
|
7
|
-
- No specific vulnerability names
|
|
8
|
-
- No code or commands
|
|
9
|
-
- Guides you with questions
|
|
10
|
-
|
|
11
|
-
Level B — Deep Analysis (10 uses)
|
|
12
|
-
- May identify vulnerability types
|
|
13
|
-
- May suggest tool categories
|
|
14
|
-
- No complete commands
|
|
15
|
-
- No exploit code
|
|
16
|
-
|
|
17
|
-
Level C — Critical Assist (2 uses)
|
|
18
|
-
- Key conceptual breakthrough
|
|
19
|
-
- May name specific algorithms
|
|
20
|
-
- No complete exploit code
|
|
21
|
-
- No flags
|
|
22
|
-
- Requires confirmation before use
|
|
23
|
-
|
|
24
|
-
COMMANDS
|
|
25
|
-
hint <question> Level A hint
|
|
26
|
-
hint-b <question> Level B hint
|
|
27
|
-
hint-c <question> Level C hint (requires confirmation)
|
|
28
|
-
hint budget Check remaining budget
|
|
29
|
-
|
|
30
|
-
USAGE TIPS
|
|
31
|
-
1. Open a challenge first: open <id>
|
|
32
|
-
This sets context for better hints.
|
|
33
|
-
|
|
34
|
-
2. Be specific in your question:
|
|
35
|
-
BAD: "how do I solve this?"
|
|
36
|
-
GOOD: "what type of vulnerability might be in a login form
|
|
37
|
-
that doesn't sanitize input?"
|
|
38
|
-
|
|
39
|
-
3. Start with Level A — it's cheap (50 uses).
|
|
40
|
-
Only escalate to B/C when A isn't enough.
|
|
41
|
-
|
|
42
|
-
4. Check your budget: hint budget
|
|
43
|
-
|
|
44
|
-
TOKEN CAP
|
|
45
|
-
All AI usage shares a 50,000 token cap.
|
|
46
|
-
Level A uses ~500 tokens per query.
|
|
47
|
-
Level B uses ~1000 tokens per query.
|
|
48
|
-
Level C uses ~1500 tokens per query.
|
package/refs/icoa.txt
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
ICOA CLI v2.5 — Quick Reference
|
|
2
|
-
==============================
|
|
3
|
-
|
|
4
|
-
MODES (selected on first run)
|
|
5
|
-
National Selection Lightweight exam-only mode
|
|
6
|
-
International Olympiad Full CTF competition mode
|
|
7
|
-
Organizer Partner management mode
|
|
8
|
-
setup → Switch Mode Change mode anytime
|
|
9
|
-
|
|
10
|
-
GETTING STARTED
|
|
11
|
-
join <url> Connect to server
|
|
12
|
-
activate <token> Unlock (Olympiad mode only)
|
|
13
|
-
env Check tool environment (Olympiad only)
|
|
14
|
-
help Show all commands
|
|
15
|
-
|
|
16
|
-
COMPETITION
|
|
17
|
-
challenges (ch) List all challenges
|
|
18
|
-
open <id> View challenge details
|
|
19
|
-
submit <id> <flag> Submit a flag
|
|
20
|
-
scoreboard (sb) View rankings
|
|
21
|
-
status Hint budget, score, rank, time
|
|
22
|
-
time Competition countdown
|
|
23
|
-
|
|
24
|
-
EXAM (National Selection)
|
|
25
|
-
exam list Available exams for your country
|
|
26
|
-
exam start <id> Begin exam (starts timer)
|
|
27
|
-
exam q [n] View question n (or all)
|
|
28
|
-
exam answer <n> <A-D> Answer question n
|
|
29
|
-
exam review Review all answers
|
|
30
|
-
exam submit Submit for grading
|
|
31
|
-
exam result View your score
|
|
32
|
-
|
|
33
|
-
AI HINTS
|
|
34
|
-
hint <question> Level A — General guidance (50 uses)
|
|
35
|
-
hint-b <question> Level B — Deep analysis (10 uses)
|
|
36
|
-
hint-c <question> Level C — Critical assist (2 uses)
|
|
37
|
-
hint budget Show remaining budget
|
|
38
|
-
|
|
39
|
-
TOOLS
|
|
40
|
-
ref <topic> Quick reference (38 topics)
|
|
41
|
-
files <id> Download challenge files
|
|
42
|
-
connect <id> Connect to remote target
|
|
43
|
-
note <text> Personal notepad
|
|
44
|
-
log Session history
|
|
45
|
-
log stats Session statistics
|
|
46
|
-
log export Export audit trail (JSON)
|
|
47
|
-
|
|
48
|
-
SYSTEM COMMANDS
|
|
49
|
-
python solve.py Run Python (forced to 3.12.13)
|
|
50
|
-
nano solve.py Edit files
|
|
51
|
-
gcc -o pwn pwn.c Compile code
|
|
52
|
-
Any Linux command Runs in ~/icoa-workspace/
|
|
53
|
-
|
|
54
|
-
SETTINGS
|
|
55
|
-
setup Configure API keys
|
|
56
|
-
lang <code> Switch language (en/zh/ja/ko/es)
|
|
57
|
-
clear Clear screen
|
|
58
|
-
exit Save session & quit
|
|
59
|
-
|
|
60
|
-
SHORTCUTS
|
|
61
|
-
ch = challenges
|
|
62
|
-
sb = scoreboard
|
|
63
|
-
flag = submit
|
|
64
|
-
|
|
65
|
-
TIPS
|
|
66
|
-
- Use 'open <id>' before 'hint' to set challenge context
|
|
67
|
-
- Level A hints are cheap — use freely for direction
|
|
68
|
-
- Level C hints require confirmation — use wisely
|
|
69
|
-
- All commands are logged for audit
|
|
70
|
-
- python/python3 always uses Python 3.12.13
|
|
71
|
-
- System commands run in ~/icoa-workspace/ (sandboxed)
|
|
72
|
-
- Use 'ref <topic>' for zero-cost tool references
|
package/refs/john.txt
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
John the Ripper Quick Reference
|
|
2
|
-
================================
|
|
3
|
-
|
|
4
|
-
BASIC USAGE
|
|
5
|
-
john hash.txt Auto-detect and crack
|
|
6
|
-
john --wordlist=words.txt hash.txt Dictionary attack
|
|
7
|
-
john --show hash.txt Show cracked passwords
|
|
8
|
-
|
|
9
|
-
HASH FORMATS
|
|
10
|
-
john --format=raw-md5 hash.txt
|
|
11
|
-
john --format=raw-sha256 hash.txt
|
|
12
|
-
john --format=raw-sha512 hash.txt
|
|
13
|
-
john --format=bcrypt hash.txt
|
|
14
|
-
john --format=NT hash.txt NTLM
|
|
15
|
-
john --format=sha512crypt hash.txt Linux shadow
|
|
16
|
-
|
|
17
|
-
# List all formats
|
|
18
|
-
john --list=formats
|
|
19
|
-
|
|
20
|
-
HASH EXTRACTION
|
|
21
|
-
# Linux shadow file
|
|
22
|
-
unshadow /etc/passwd /etc/shadow > hashes.txt
|
|
23
|
-
|
|
24
|
-
# ZIP file
|
|
25
|
-
zip2john file.zip > hash.txt
|
|
26
|
-
|
|
27
|
-
# RAR file
|
|
28
|
-
rar2john file.rar > hash.txt
|
|
29
|
-
|
|
30
|
-
# PDF
|
|
31
|
-
pdf2john file.pdf > hash.txt
|
|
32
|
-
|
|
33
|
-
# SSH private key
|
|
34
|
-
ssh2john id_rsa > hash.txt
|
|
35
|
-
|
|
36
|
-
# KeePass
|
|
37
|
-
keepass2john database.kdbx > hash.txt
|
|
38
|
-
|
|
39
|
-
# Office documents
|
|
40
|
-
office2john file.docx > hash.txt
|
|
41
|
-
|
|
42
|
-
# 7z archive
|
|
43
|
-
7z2john file.7z > hash.txt
|
|
44
|
-
|
|
45
|
-
ATTACK MODES
|
|
46
|
-
# Wordlist
|
|
47
|
-
john --wordlist=/path/to/wordlist hash.txt
|
|
48
|
-
|
|
49
|
-
# Wordlist with rules
|
|
50
|
-
john --wordlist=words.txt --rules hash.txt
|
|
51
|
-
john --wordlist=words.txt --rules=jumbo hash.txt
|
|
52
|
-
|
|
53
|
-
# Incremental (brute force)
|
|
54
|
-
john --incremental hash.txt
|
|
55
|
-
john --incremental=digits hash.txt
|
|
56
|
-
|
|
57
|
-
# Mask
|
|
58
|
-
john --mask="?a?a?a?a?a" hash.txt
|
|
59
|
-
|
|
60
|
-
OPTIONS
|
|
61
|
-
--fork=4 Use 4 CPU cores
|
|
62
|
-
--session=name Save session
|
|
63
|
-
--restore=name Restore session
|
|
64
|
-
--pot=file Custom potfile
|
|
65
|
-
|
|
66
|
-
COMMON CTF PATTERNS
|
|
67
|
-
# Crack ZIP password
|
|
68
|
-
zip2john secret.zip > zip_hash.txt
|
|
69
|
-
john --wordlist=rockyou.txt zip_hash.txt
|
|
70
|
-
john --show zip_hash.txt
|
|
71
|
-
|
|
72
|
-
# Crack SSH key
|
|
73
|
-
ssh2john id_rsa > ssh_hash.txt
|
|
74
|
-
john --wordlist=rockyou.txt ssh_hash.txt
|
package/refs/linux.txt
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
Linux Commands Quick Reference
|
|
2
|
-
==============================
|
|
3
|
-
|
|
4
|
-
FILE OPERATIONS
|
|
5
|
-
ls -la List files with details
|
|
6
|
-
cat file Display file contents
|
|
7
|
-
head -n 20 file First 20 lines
|
|
8
|
-
tail -n 20 file Last 20 lines
|
|
9
|
-
less file Page through file
|
|
10
|
-
find . -name "*.txt" Find files by name
|
|
11
|
-
grep -r "pattern" . Search file contents recursively
|
|
12
|
-
cp src dest Copy file
|
|
13
|
-
mv src dest Move/rename file
|
|
14
|
-
rm file Delete file
|
|
15
|
-
chmod +x file Make file executable
|
|
16
|
-
file filename Determine file type
|
|
17
|
-
|
|
18
|
-
TEXT PROCESSING
|
|
19
|
-
grep "pattern" file Search for pattern
|
|
20
|
-
grep -i "pat" file Case-insensitive search
|
|
21
|
-
sed 's/old/new/g' f Replace text
|
|
22
|
-
awk '{print $1}' f Print first column
|
|
23
|
-
sort file Sort lines
|
|
24
|
-
uniq file Remove duplicate lines
|
|
25
|
-
wc -l file Count lines
|
|
26
|
-
cut -d: -f1 file Cut fields by delimiter
|
|
27
|
-
tr 'a-z' 'A-Z' Translate characters
|
|
28
|
-
xxd file Hex dump
|
|
29
|
-
xxd -r hex.txt bin Reverse hex dump
|
|
30
|
-
|
|
31
|
-
SYSTEM
|
|
32
|
-
ps aux List processes
|
|
33
|
-
kill PID Kill process
|
|
34
|
-
uname -a System info
|
|
35
|
-
df -h Disk usage
|
|
36
|
-
free -m Memory usage
|
|
37
|
-
which command Find command location
|
|
38
|
-
env Show environment variables
|
|
39
|
-
|
|
40
|
-
NETWORKING
|
|
41
|
-
curl URL HTTP request
|
|
42
|
-
wget URL Download file
|
|
43
|
-
ping host Test connectivity
|
|
44
|
-
ss -tlnp Show listening ports
|
|
45
|
-
ip addr Show IP addresses
|
|
46
|
-
dig domain DNS lookup
|
|
47
|
-
|
|
48
|
-
PERMISSIONS
|
|
49
|
-
chmod 755 file rwxr-xr-x
|
|
50
|
-
chmod 644 file rw-r--r--
|
|
51
|
-
chown user:group file Change ownership
|
|
52
|
-
|
|
53
|
-
REDIRECTION
|
|
54
|
-
cmd > file Redirect stdout to file
|
|
55
|
-
cmd >> file Append stdout to file
|
|
56
|
-
cmd 2> file Redirect stderr
|
|
57
|
-
cmd1 | cmd2 Pipe output
|
|
58
|
-
cmd < file Redirect stdin from file
|
package/refs/nc.txt
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
Netcat (nc) Quick Reference
|
|
2
|
-
===========================
|
|
3
|
-
|
|
4
|
-
BASIC CONNECTION
|
|
5
|
-
nc host port Connect to host:port
|
|
6
|
-
nc -v host port Verbose connection
|
|
7
|
-
nc -nv host port No DNS, verbose
|
|
8
|
-
|
|
9
|
-
LISTENING
|
|
10
|
-
nc -lp port Listen on port
|
|
11
|
-
nc -lvp port Listen verbose
|
|
12
|
-
nc -lp port -e /bin/bash Bind shell (dangerous)
|
|
13
|
-
|
|
14
|
-
DATA TRANSFER
|
|
15
|
-
# Send file
|
|
16
|
-
nc -lp 4444 > received.txt (receiver)
|
|
17
|
-
nc host 4444 < send.txt (sender)
|
|
18
|
-
|
|
19
|
-
# Pipe command output
|
|
20
|
-
echo "data" | nc host port
|
|
21
|
-
cat file | nc host port
|
|
22
|
-
|
|
23
|
-
SCANNING
|
|
24
|
-
nc -zv host 1-1000 Port scan
|
|
25
|
-
nc -zvw1 host 80 Single port check (-w1 = 1s timeout)
|
|
26
|
-
|
|
27
|
-
OPTIONS
|
|
28
|
-
-l Listen mode
|
|
29
|
-
-p port Specify port
|
|
30
|
-
-v Verbose
|
|
31
|
-
-n No DNS resolution
|
|
32
|
-
-w seconds Timeout
|
|
33
|
-
-z Zero I/O (scan mode)
|
|
34
|
-
-u UDP mode
|
|
35
|
-
-e prog Execute program on connect
|
|
36
|
-
-k Keep listening after disconnect
|
|
37
|
-
|
|
38
|
-
NCAT (enhanced netcat)
|
|
39
|
-
ncat --ssl host port SSL/TLS connection
|
|
40
|
-
ncat -lp port --ssl SSL listener
|
|
41
|
-
ncat --proxy proxyhost:port host port Via proxy
|
|
42
|
-
|
|
43
|
-
SOCAT (advanced)
|
|
44
|
-
socat TCP:host:port - Basic connect
|
|
45
|
-
socat TCP-LISTEN:port - Basic listen
|
|
46
|
-
socat TCP:host:port EXEC:/bin/bash Connect shell
|
|
47
|
-
socat OPENSSL:host:443 - SSL connect
|
|
48
|
-
|
|
49
|
-
COMMON CTF PATTERNS
|
|
50
|
-
# Connect to challenge
|
|
51
|
-
nc challenge.ctf.com 1337
|
|
52
|
-
|
|
53
|
-
# Send payload
|
|
54
|
-
python3 -c "print('A'*100)" | nc host port
|
|
55
|
-
|
|
56
|
-
# Interactive + send file
|
|
57
|
-
(cat payload; cat -) | nc host port
|
|
58
|
-
|
|
59
|
-
# Receive then interact
|
|
60
|
-
nc host port
|
|
61
|
-
# type commands interactively
|
|
62
|
-
|
|
63
|
-
# Redirect to file for analysis
|
|
64
|
-
nc host port | tee output.txt
|
package/refs/nmap.txt
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
Nmap Quick Reference
|
|
2
|
-
====================
|
|
3
|
-
|
|
4
|
-
BASIC SCANS
|
|
5
|
-
nmap target Default scan (top 1000 ports)
|
|
6
|
-
nmap -p 80,443 target Specific ports
|
|
7
|
-
nmap -p 1-65535 target All ports
|
|
8
|
-
nmap -p- target All ports (shorthand)
|
|
9
|
-
nmap -F target Fast scan (top 100)
|
|
10
|
-
|
|
11
|
-
SCAN TYPES
|
|
12
|
-
nmap -sT target TCP connect scan
|
|
13
|
-
nmap -sS target SYN scan (stealth, needs root)
|
|
14
|
-
nmap -sU target UDP scan
|
|
15
|
-
nmap -sV target Version detection
|
|
16
|
-
nmap -sC target Default scripts
|
|
17
|
-
nmap -A target Aggressive (OS + version + scripts)
|
|
18
|
-
nmap -O target OS detection
|
|
19
|
-
|
|
20
|
-
SERVICE / VERSION
|
|
21
|
-
nmap -sV target Detect service versions
|
|
22
|
-
nmap -sV --version-intensity 5 target More aggressive
|
|
23
|
-
|
|
24
|
-
SCRIPTS
|
|
25
|
-
nmap --script=default target Default scripts
|
|
26
|
-
nmap --script=vuln target Vulnerability scripts
|
|
27
|
-
nmap --script=http-enum target HTTP enumeration
|
|
28
|
-
nmap --script=smb-vuln* target SMB vulnerabilities
|
|
29
|
-
|
|
30
|
-
OUTPUT
|
|
31
|
-
nmap -oN output.txt target Normal output
|
|
32
|
-
nmap -oX output.xml target XML output
|
|
33
|
-
nmap -oG output.gnmap target Grepable output
|
|
34
|
-
nmap -oA basename target All formats
|
|
35
|
-
|
|
36
|
-
HOST DISCOVERY
|
|
37
|
-
nmap -sn 10.0.0.0/24 Ping sweep (no port scan)
|
|
38
|
-
nmap -Pn target Skip host discovery
|
|
39
|
-
|
|
40
|
-
TIMING
|
|
41
|
-
nmap -T0 target Paranoid (slowest)
|
|
42
|
-
nmap -T3 target Normal (default)
|
|
43
|
-
nmap -T4 target Aggressive
|
|
44
|
-
nmap -T5 target Insane (fastest)
|
|
45
|
-
|
|
46
|
-
COMMON CTF COMBOS
|
|
47
|
-
# Full enumeration
|
|
48
|
-
nmap -sC -sV -p- target
|
|
49
|
-
|
|
50
|
-
# Quick overview
|
|
51
|
-
nmap -sV -F target
|
|
52
|
-
|
|
53
|
-
# UDP + TCP
|
|
54
|
-
nmap -sS -sU -p 1-1000 target
|
|
55
|
-
|
|
56
|
-
# Script scan for HTTP
|
|
57
|
-
nmap --script=http-* -p 80,443,8080 target
|
package/refs/numpy.txt
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
NumPy Quick Reference
|
|
2
|
-
=====================
|
|
3
|
-
|
|
4
|
-
IMPORT
|
|
5
|
-
import numpy as np
|
|
6
|
-
|
|
7
|
-
ARRAY CREATION
|
|
8
|
-
np.array([1, 2, 3]) From list
|
|
9
|
-
np.zeros((3, 4)) 3x4 zeros
|
|
10
|
-
np.ones((3, 4)) 3x4 ones
|
|
11
|
-
np.arange(0, 10, 2) [0, 2, 4, 6, 8]
|
|
12
|
-
np.linspace(0, 1, 5) 5 evenly spaced [0,1]
|
|
13
|
-
np.eye(3) 3x3 identity matrix
|
|
14
|
-
np.random.randint(0, 256, 100) Random integers
|
|
15
|
-
np.frombuffer(data, dtype=np.uint8) From bytes
|
|
16
|
-
|
|
17
|
-
ARRAY INFO
|
|
18
|
-
a.shape Dimensions
|
|
19
|
-
a.dtype Data type
|
|
20
|
-
a.size Total elements
|
|
21
|
-
a.ndim Number of dimensions
|
|
22
|
-
|
|
23
|
-
OPERATIONS
|
|
24
|
-
a + b Element-wise add
|
|
25
|
-
a * b Element-wise multiply
|
|
26
|
-
a @ b / np.dot(a, b) Matrix multiply
|
|
27
|
-
a.T Transpose
|
|
28
|
-
np.linalg.inv(a) Inverse
|
|
29
|
-
np.linalg.det(a) Determinant
|
|
30
|
-
np.linalg.solve(A, b) Solve Ax = b
|
|
31
|
-
|
|
32
|
-
TYPE CONVERSION
|
|
33
|
-
a.astype(np.uint8) Convert type
|
|
34
|
-
a.tobytes() Array → bytes
|
|
35
|
-
np.frombuffer(b, np.uint8) Bytes → array
|
|
36
|
-
|
|
37
|
-
INDEXING
|
|
38
|
-
a[0] First element
|
|
39
|
-
a[-1] Last element
|
|
40
|
-
a[1:5] Slice
|
|
41
|
-
a[a > 5] Boolean indexing
|
|
42
|
-
a.reshape(3, 4) Reshape
|
|
43
|
-
|
|
44
|
-
USEFUL FOR CTF
|
|
45
|
-
# XOR arrays
|
|
46
|
-
result = np.bitwise_xor(a, b)
|
|
47
|
-
|
|
48
|
-
# Byte frequency analysis
|
|
49
|
-
data = np.frombuffer(file_bytes, dtype=np.uint8)
|
|
50
|
-
unique, counts = np.unique(data, return_counts=True)
|
|
51
|
-
|
|
52
|
-
# Image as array
|
|
53
|
-
from PIL import Image
|
|
54
|
-
img_array = np.array(Image.open("img.png"))
|
|
55
|
-
# img_array.shape → (height, width, channels)
|
|
56
|
-
|
|
57
|
-
# Matrix operations for crypto
|
|
58
|
-
M = np.array([[1,2],[3,4]], dtype=np.int64)
|
|
59
|
-
result = np.linalg.matrix_power(M, n)
|
package/refs/openssl.txt
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
OpenSSL Quick Reference
|
|
2
|
-
=======================
|
|
3
|
-
|
|
4
|
-
HASHING
|
|
5
|
-
echo -n "text" | openssl md5
|
|
6
|
-
echo -n "text" | openssl sha1
|
|
7
|
-
echo -n "text" | openssl sha256
|
|
8
|
-
openssl dgst -sha256 file Hash a file
|
|
9
|
-
|
|
10
|
-
ENCODING / DECODING
|
|
11
|
-
echo -n "text" | openssl base64 Encode base64
|
|
12
|
-
echo "dGV4dA==" | openssl base64 -d Decode base64
|
|
13
|
-
echo -n "text" | openssl enc -base64 Same as above
|
|
14
|
-
xxd -p file Hex encode
|
|
15
|
-
|
|
16
|
-
SYMMETRIC ENCRYPTION
|
|
17
|
-
# AES-256-CBC encrypt
|
|
18
|
-
openssl enc -aes-256-cbc -salt -in plain.txt -out enc.bin -k password
|
|
19
|
-
|
|
20
|
-
# AES-256-CBC decrypt
|
|
21
|
-
openssl enc -aes-256-cbc -d -in enc.bin -out plain.txt -k password
|
|
22
|
-
|
|
23
|
-
# Specify IV and key directly
|
|
24
|
-
openssl enc -aes-128-cbc -d -in enc.bin \
|
|
25
|
-
-K 000102030405060708090a0b0c0d0e0f \
|
|
26
|
-
-iv 00112233445566778899aabbccddeeff
|
|
27
|
-
|
|
28
|
-
RSA KEY OPERATIONS
|
|
29
|
-
# Generate RSA key
|
|
30
|
-
openssl genrsa -out private.pem 2048
|
|
31
|
-
|
|
32
|
-
# Extract public key
|
|
33
|
-
openssl rsa -in private.pem -pubout -out public.pem
|
|
34
|
-
|
|
35
|
-
# View key details
|
|
36
|
-
openssl rsa -in private.pem -text -noout
|
|
37
|
-
|
|
38
|
-
# View public key details
|
|
39
|
-
openssl rsa -pubin -in public.pem -text -noout
|
|
40
|
-
|
|
41
|
-
# Encrypt with public key
|
|
42
|
-
openssl rsautl -encrypt -pubin -inkey pub.pem -in plain.txt -out enc.bin
|
|
43
|
-
|
|
44
|
-
# Decrypt with private key
|
|
45
|
-
openssl rsautl -decrypt -inkey priv.pem -in enc.bin -out plain.txt
|
|
46
|
-
|
|
47
|
-
CERTIFICATES
|
|
48
|
-
# View certificate
|
|
49
|
-
openssl x509 -in cert.pem -text -noout
|
|
50
|
-
|
|
51
|
-
# Extract public key from cert
|
|
52
|
-
openssl x509 -in cert.pem -pubkey -noout
|
|
53
|
-
|
|
54
|
-
# Generate self-signed cert
|
|
55
|
-
openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 365
|
|
56
|
-
|
|
57
|
-
# Check cert expiry
|
|
58
|
-
openssl x509 -in cert.pem -noout -dates
|
|
59
|
-
|
|
60
|
-
SSL / TLS
|
|
61
|
-
# Connect and show cert
|
|
62
|
-
openssl s_client -connect host:443
|
|
63
|
-
|
|
64
|
-
# Show cert chain
|
|
65
|
-
openssl s_client -showcerts -connect host:443
|
|
66
|
-
|
|
67
|
-
COMMON CTF PATTERNS
|
|
68
|
-
# Decode base64 encoded flag
|
|
69
|
-
echo "aWNvYXtmbGFnfQ==" | openssl base64 -d
|
|
70
|
-
|
|
71
|
-
# Extract RSA parameters for crypto challenge
|
|
72
|
-
openssl rsa -pubin -in pub.pem -text -noout | grep -E "Modulus|Exponent"
|
|
73
|
-
|
|
74
|
-
# Decrypt with known key
|
|
75
|
-
openssl enc -aes-128-ecb -d -in encrypted -K "$(echo -n key | xxd -p)" -nopad
|
package/refs/pillow.txt
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
Pillow (PIL) Quick Reference
|
|
2
|
-
============================
|
|
3
|
-
|
|
4
|
-
INSTALLATION
|
|
5
|
-
pip install pillow
|
|
6
|
-
|
|
7
|
-
BASIC USAGE
|
|
8
|
-
from PIL import Image
|
|
9
|
-
|
|
10
|
-
img = Image.open("image.png")
|
|
11
|
-
img.save("output.png")
|
|
12
|
-
img.show()
|
|
13
|
-
|
|
14
|
-
IMAGE INFO
|
|
15
|
-
img.size (width, height)
|
|
16
|
-
img.mode "RGB", "RGBA", "L", "1"
|
|
17
|
-
img.format "PNG", "JPEG", etc.
|
|
18
|
-
img.info Metadata dict
|
|
19
|
-
|
|
20
|
-
PIXEL ACCESS
|
|
21
|
-
px = img.load() Get pixel access
|
|
22
|
-
px[x, y] Get pixel value
|
|
23
|
-
px[x, y] = (R, G, B) Set pixel value
|
|
24
|
-
|
|
25
|
-
# Get all pixels
|
|
26
|
-
pixels = list(img.getdata())
|
|
27
|
-
|
|
28
|
-
CONVERSIONS
|
|
29
|
-
img.convert("L") Grayscale
|
|
30
|
-
img.convert("RGB") RGB
|
|
31
|
-
img.convert("RGBA") RGBA
|
|
32
|
-
img.convert("1") Black and white
|
|
33
|
-
|
|
34
|
-
OPERATIONS
|
|
35
|
-
img.resize((w, h)) Resize
|
|
36
|
-
img.crop((l, t, r, b)) Crop (left, top, right, bottom)
|
|
37
|
-
img.rotate(90) Rotate
|
|
38
|
-
img.transpose(Image.FLIP_LEFT_RIGHT) Flip horizontal
|
|
39
|
-
|
|
40
|
-
CREATE NEW IMAGE
|
|
41
|
-
img = Image.new("RGB", (width, height), (255, 255, 255))
|
|
42
|
-
|
|
43
|
-
COMMON CTF PATTERNS
|
|
44
|
-
# LSB steganography extraction
|
|
45
|
-
img = Image.open("steg.png")
|
|
46
|
-
px = img.load()
|
|
47
|
-
bits = ""
|
|
48
|
-
for y in range(img.height):
|
|
49
|
-
for x in range(img.width):
|
|
50
|
-
r, g, b = px[x, y][:3]
|
|
51
|
-
bits += str(r & 1) # Extract LSB
|
|
52
|
-
# Convert bits to bytes
|
|
53
|
-
message = bytes(int(bits[i:i+8], 2) for i in range(0, len(bits), 8))
|
|
54
|
-
|
|
55
|
-
# Hide data in pixels
|
|
56
|
-
for i, byte in enumerate(data):
|
|
57
|
-
x, y = i % img.width, i // img.width
|
|
58
|
-
r, g, b = px[x, y][:3]
|
|
59
|
-
px[x, y] = ((r & 0xFE) | (byte >> 7 & 1), g, b)
|
|
60
|
-
|
|
61
|
-
# Visual comparison
|
|
62
|
-
from PIL import ImageChops
|
|
63
|
-
diff = ImageChops.difference(img1, img2)
|
|
64
|
-
diff.save("diff.png")
|
|
65
|
-
|
|
66
|
-
# Extract text from image regions
|
|
67
|
-
region = img.crop((10, 10, 200, 50))
|