pwn 0.5.615 → 0.5.617

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.
Files changed (102) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +24 -10
  3. data/bin/pwn +47 -2
  4. data/bin/pwn_gqrx_scanner +75 -18
  5. data/documentation/Diagrams.md +123 -40
  6. data/documentation/General-PWN-Usage.md +50 -30
  7. data/documentation/Home.md +78 -51
  8. data/documentation/How-PWN-Works.md +59 -57
  9. data/documentation/Installation.md +53 -28
  10. data/documentation/What-is-PWN.md +51 -32
  11. data/documentation/Why-PWN.md +41 -11
  12. data/documentation/diagrams/ai-integration-tool-calling.svg +141 -103
  13. data/documentation/diagrams/build.sh +20 -0
  14. data/documentation/diagrams/burp-vs-zap-preference.svg +47 -62
  15. data/documentation/diagrams/code-scanning-sast.svg +139 -79
  16. data/documentation/diagrams/dot/_THEME.md +27 -0
  17. data/documentation/diagrams/dot/agent-tool-registry.dot +59 -0
  18. data/documentation/diagrams/dot/ai-integration-tool-calling.dot +47 -20
  19. data/documentation/diagrams/dot/aws-cloud-security.dot +48 -0
  20. data/documentation/diagrams/dot/burp-vs-zap-preference.dot +23 -12
  21. data/documentation/diagrams/dot/code-scanning-sast.dot +46 -18
  22. data/documentation/diagrams/dot/cron-scheduling.dot +40 -0
  23. data/documentation/diagrams/dot/driver-framework.dot +36 -14
  24. data/documentation/diagrams/dot/extrospection-world-awareness.dot +55 -0
  25. data/documentation/diagrams/dot/fuzzing-workflow.dot +44 -24
  26. data/documentation/diagrams/dot/history-to-drivers.dot +31 -17
  27. data/documentation/diagrams/dot/memory-skills-detailed.dot +57 -25
  28. data/documentation/diagrams/dot/network-infra-testing.dot +51 -19
  29. data/documentation/diagrams/dot/overall-pwn-architecture.dot +110 -44
  30. data/documentation/diagrams/dot/penetration-testing-workflow.dot +56 -25
  31. data/documentation/diagrams/dot/plugin-ecosystem.dot +41 -27
  32. data/documentation/diagrams/dot/pwn-ai-feedback-learning-loop.dot +87 -46
  33. data/documentation/diagrams/dot/pwn-repl-prototyping.dot +49 -30
  34. data/documentation/diagrams/dot/reporting-pipeline.dot +43 -14
  35. data/documentation/diagrams/dot/reverse-engineering-flow.dot +40 -18
  36. data/documentation/diagrams/dot/sdr-radio-flow.dot +45 -0
  37. data/documentation/diagrams/dot/sessions-cron-automation.dot +41 -14
  38. data/documentation/diagrams/dot/swarm-multi-agent.dot +70 -0
  39. data/documentation/diagrams/dot/web-application-testing.dot +45 -23
  40. data/documentation/diagrams/dot/zero-day-research-flow.dot +46 -24
  41. data/documentation/diagrams/driver-framework.svg +87 -66
  42. data/documentation/diagrams/fuzzing-workflow.svg +128 -115
  43. data/documentation/diagrams/history-to-drivers.svg +84 -82
  44. data/documentation/diagrams/memory-skills-detailed.svg +167 -119
  45. data/documentation/diagrams/network-infra-testing.svg +146 -84
  46. data/documentation/diagrams/overall-pwn-architecture.svg +356 -185
  47. data/documentation/diagrams/penetration-testing-workflow.svg +161 -108
  48. data/documentation/diagrams/plugin-ecosystem.svg +225 -121
  49. data/documentation/diagrams/pwn-ai-feedback-learning-loop.svg +257 -185
  50. data/documentation/diagrams/pwn-repl-prototyping.svg +126 -137
  51. data/documentation/diagrams/reporting-pipeline.svg +128 -68
  52. data/documentation/diagrams/reverse-engineering-flow.svg +100 -80
  53. data/documentation/diagrams/sessions-cron-automation.svg +112 -68
  54. data/documentation/diagrams/web-application-testing.svg +136 -100
  55. data/documentation/diagrams/zero-day-research-flow.svg +116 -112
  56. data/git_commit.sh +1 -1
  57. data/lib/pwn/ai/agent/assembly.rb +1 -1
  58. data/lib/pwn/ai/agent/btc.rb +1 -1
  59. data/lib/pwn/ai/agent/burp_suite.rb +1 -1
  60. data/lib/pwn/ai/agent/extrospection.rb +618 -0
  61. data/lib/pwn/ai/agent/gqrx.rb +2 -2
  62. data/lib/pwn/ai/agent/hacker_one.rb +1 -1
  63. data/lib/pwn/ai/agent/introspection.rb +91 -0
  64. data/lib/pwn/ai/agent/learning.rb +6 -4
  65. data/lib/pwn/ai/agent/loop.rb +15 -0
  66. data/lib/pwn/ai/agent/prompt_builder.rb +10 -1
  67. data/lib/pwn/ai/agent/sast.rb +1 -1
  68. data/lib/pwn/ai/agent/swarm.rb +437 -0
  69. data/lib/pwn/ai/agent/tools/cron.rb +163 -0
  70. data/lib/pwn/ai/agent/tools/extrospection.rb +280 -0
  71. data/lib/pwn/ai/agent/tools/learning.rb +108 -0
  72. data/lib/pwn/ai/agent/tools/memory.rb +27 -0
  73. data/lib/pwn/ai/agent/tools/metrics.rb +61 -0
  74. data/lib/pwn/ai/agent/tools/sessions.rb +139 -0
  75. data/lib/pwn/ai/agent/tools/skills.rb +30 -0
  76. data/lib/pwn/ai/agent/tools/swarm.rb +229 -0
  77. data/lib/pwn/ai/agent/transparent_browser.rb +1 -1
  78. data/lib/pwn/ai/agent/vuln_gen.rb +2 -2
  79. data/lib/pwn/ai/agent.rb +3 -0
  80. data/lib/pwn/ai/anthropic.rb +19 -4
  81. data/lib/pwn/ai.rb +0 -1
  82. data/lib/pwn/config.rb +10 -23
  83. data/lib/pwn/cron.rb +16 -7
  84. data/lib/pwn/plugins/repl.rb +90 -281
  85. data/lib/pwn/sdr/decoder/base.rb +251 -0
  86. data/lib/pwn/sdr/decoder/gsm.rb +84 -185
  87. data/lib/pwn/sdr/decoder/pocsag.rb +62 -217
  88. data/lib/pwn/sdr/decoder.rb +1 -0
  89. data/lib/pwn/sdr/gqrx.rb +446 -65
  90. data/lib/pwn/version.rb +1 -1
  91. data/spec/lib/pwn/ai/agent/extrospection_spec.rb +15 -0
  92. data/spec/lib/pwn/ai/agent/introspection_spec.rb +15 -0
  93. data/spec/lib/pwn/ai/agent/swarm_spec.rb +34 -0
  94. data/spec/lib/pwn/ai/agent/tools/cron_spec.rb +40 -0
  95. data/spec/lib/pwn/ai/agent/tools/extrospection_spec.rb +40 -0
  96. data/spec/lib/pwn/ai/agent/tools/metrics_spec.rb +20 -0
  97. data/spec/lib/pwn/ai/agent/tools/sessions_spec.rb +35 -0
  98. data/spec/lib/pwn/ai/agent/tools/swarm_spec.rb +17 -0
  99. data/spec/lib/pwn/{ai/introspection_spec.rb → sdr/decoder/base_spec.rb} +3 -3
  100. data/third_party/pwn_rdoc.jsonl +178 -33
  101. metadata +27 -3
  102. data/lib/pwn/ai/introspection.rb +0 -76
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fbf42ff07a821ff15cc7ed8596ac349ae600d93af5f1a55a1472d406583dc1b9
4
- data.tar.gz: 762e04766f4eac41a212a08674a3d1821d84d9b6ba875c09f7a36ad81fa9e708
3
+ metadata.gz: bb16e051629252943b2df67c661ca49455cd5dfd4acfbde1620e75135f858c42
4
+ data.tar.gz: 036cb463b3cd848926f88c60be3f885e5e9b4f738534ac036918d118d18ec893
5
5
  SHA512:
6
- metadata.gz: 7784a0441263b4095b05de321dcbaed24f1e20994de361500a9d757aa537770479420ff6a99e6f94eed1f131ae0e0741050b55449cc0501f0921b2bbc75adb61
7
- data.tar.gz: c5008f8578a0b04e61e2d44429775d2bc9963e16da6091d63e84880539adecdccfa47adbe4e7d241f223e32b56dc072362b8dbb932037a87187f34854781c13b
6
+ metadata.gz: d76d992d344b3a2016819f772e7e304fc437d42df677b85b67f33418c988f6436385eefbb6509cbe1d1436c9df585a30f2f44189b00134792160f420af77e81c
7
+ data.tar.gz: 34cdfc754bd3801071a8967b672924764c5d8b894fb13a6bd74dc43f10d930aee94cb781e5c9812b6b00b14b83fbfa34cbcbbcf45d4c6c2332c800b8fe322fe5
data/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
  * [What is PWN](#what-is-pwn)
7
7
  * [Why PWN](#why-pwn)
8
8
  * [How PWN Works](#how-pwn-works)
9
- - [[Local PWN Wiki](/opt/pwn/documentation/Home.md)
9
+ - [[Local PWN Wiki](documentation/Home.md)
10
10
  - [Installation](#installation)
11
11
  - [General Usage](#general-usage)
12
12
  - [Call to Arms](#call-to-arms)
@@ -22,7 +22,7 @@ PWN (Pronounced /pōn/ or pone), is a powerful open-source offensive cybersecuri
22
22
 
23
23
  PWN stands on the shoulders of security giants, providing over **66** production-grade plugins, full LLM integration with tool-calling agents, persistent memory, reusable skills, session/cron management, and a highly interactive REPL for prototyping and driving complex security workflows. All core automation primitives are open to promote trust, peer review, and collaborative innovation in adversarial security.
24
24
 
25
- **See the full [PWN Wiki](/opt/pwn/documentation/Home.md) for detailed guides.**
25
+ **See the full [PWN Wiki](documentation/Home.md) for detailed guides.**
26
26
 
27
27
  #### **Why PWN** ####
28
28
 
@@ -73,7 +73,7 @@ A full local wiki has been generated in this checkout:
73
73
 
74
74
  **`/opt/pwn/documentation/Home.md`**
75
75
 
76
- - [Home](/opt/pwn/documentation/Home.md)
76
+ - [Home](documentation/Home.md)
77
77
  - [What is PWN](documentation/What-is-PWN.md)
78
78
  - [Installation](documentation/Installation.md)
79
79
  - [pwn-ai Agent](documentation/pwn-ai-Agent.md)
@@ -95,7 +95,7 @@ $ cd /opt/pwn
95
95
  $ ./install.sh
96
96
  $ ./install.sh ruby-gem
97
97
  $ pwn
98
- pwn[v0.5.615]:001 >>> PWN.help
98
+ pwn[v0.5.617]:001 >>> PWN.help
99
99
  ```
100
100
 
101
101
  [![Installing the pwn Security Automation Framework](https://raw.githubusercontent.com/0dayInc/pwn/master/documentation/pwn_install.png)](https://youtu.be/G7iLUY4FzsI)
@@ -116,7 +116,7 @@ $ rvm use ruby-4.0.5@pwn
116
116
  $ gem uninstall --all --executables pwn
117
117
  $ gem install --verbose pwn
118
118
  $ pwn
119
- pwn[v0.5.615]:001 >>> PWN.help
119
+ pwn[v0.5.617]:001 >>> PWN.help
120
120
  ```
121
121
 
122
122
  If using a multi-user install of RVM:
@@ -127,7 +127,7 @@ $ rvm use ruby-4.0.5@pwn
127
127
  $ rvmsudo gem uninstall --all --executables pwn
128
128
  $ rvmsudo gem install --verbose pwn
129
129
  $ pwn
130
- pwn[v0.5.615]:001 >>> PWN.help
130
+ pwn[v0.5.617]:001 >>> PWN.help
131
131
  ```
132
132
 
133
133
  **Inside the pwn REPL (the heart of PWN):**
@@ -136,13 +136,21 @@ pwn[v0.5.615]:001 >>> PWN.help
136
136
  - `pwn-ai` — launch the autonomous AI agent (highly recommended for complex tasks). Once active you can issue natural language instructions that leverage PWN's full power.
137
137
  - Example flow:
138
138
  ```
139
- pwn[v0.5.615]:001 >>> pwn-ai
139
+ pwn[v0.5.617]:001 >>> pwn-ai
140
140
  [*] pwn-ai agent TUI activated...
141
141
  > Perform active scan of https://target.example.com using preferred tooling, then analyze findings with PWN modules and produce a report.
142
142
  ```
143
143
  - Other REPL helpers: `pwn-asm`, memory/session/cron management commands, etc.
144
144
  - Exit AI mode with `back`; use full Ruby/PWN expressions at any time.
145
145
 
146
+ **Headless / CI-CD one-shot (`pwn --ai`):**
147
+ Skip the TUI entirely and submit a single pwn-ai request from the shell — ideal for quick lookups, scripting, or CI/CD pipelines. The final answer is written to STDOUT (pipeable); live tool-call activity streams to STDERR.
148
+ ```
149
+ $ pwn --ai 'What ports are listening on this host?'
150
+ $ echo "$LONG_PROMPT" | pwn --ai -
151
+ $ pwn -Y ./ci/pwn.yaml --ai 'Run pwn_sast against ./src and summarise HIGH findings' > findings.txt
152
+ ```
153
+
146
154
  PWN periodically upgrades to the latest version of Ruby (reflected in `/opt/pwn/.ruby-version`). The easiest way to upgrade Ruby + pwn from a previous installation:
147
155
 
148
156
  ```
@@ -159,7 +167,7 @@ See also the wiki page on [Contributing](documentation/Contributing.md).
159
167
 
160
168
  ### **Module Documentation** ###
161
169
 
162
- **Primary Documentation:** Browse the embedded local wiki — start at [/opt/pwn/documentation/Home.md](/opt/pwn/documentation/Home.md).
170
+ **Primary Documentation:** Browse the embedded local wiki — start at [/opt/pwn/documentation/Home.md](documentation/Home.md).
163
171
 
164
172
  Additional documentation on using PWN can be found on [RubyGems.org](https://www.rubydoc.info/gems/pwn). Explore the source under `lib/pwn/plugins/`, `lib/pwn/ai/`, and `PWN::` constants directly in the REPL.
165
173
 
@@ -172,15 +180,21 @@ Key wiki pages:
172
180
 
173
181
  I hope you enjoy PWN and remember... ensure you always have permission prior to carrying out any sort of security testing or hacktivities. Now — go pwn all the things (responsibly)!
174
182
 
175
- ### **Keep Us Caffeinated** ###
176
183
 
184
+ ### **Keep Us Caffeinated** ###
177
185
  If you've found this project useful and you're interested in supporting our efforts, we invite you to take a brief moment to keep us caffeinated:
178
186
 
179
187
  [![Coffee](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://buymeacoff.ee/0dayinc)
180
188
 
189
+
181
190
  ### [**0x004D65726368**](https://0day.myspreadshop.com/) ###
182
191
 
183
192
  [![PWN Sticker](https://image.spreadshirtmedia.com/image-server/v1/products/T1459A839PA3861PT28D1044068794FS8193/views/1,width=300,height=300,appearanceId=839,backgroundColor=000000/ultimate-hacker-t-shirt-to-convey-to-the-public-a-hackers-favorite-past-time.jpg)](https://0day.myspreadshop.com/stickers)
184
193
 
185
- ... (stickers, mugs, and apparel links preserved)
194
+ [![Coffee Mug](https://image.spreadshirtmedia.com/image-server/v1/products/T1313A1PA3933PT10X2Y25D1020472680FS6327/views/3,width=300,height=300,appearanceId=1,backgroundColor=000000/https0dayinccom.jpg)](https://0day.myspreadshop.com/accessories+mugs+%26+drinkware)
195
+
196
+ [![Mouse Pad](https://image.spreadshirtmedia.com/image-server/v1/products/T993A1PA2168PT10X162Y26D1044068794S100/views/1,width=300,height=300,appearanceId=1,backgroundColor=000000/ultimate-hacker-t-shirt-to-convey-to-the-public-a-hackers-favorite-past-time.jpg)](https://0day.myspreadshop.com/accessories)
197
+
198
+ [![0day Inc.](https://image.spreadshirtmedia.com/image-server/v1/products/T951A550PA3076PT17X0Y73D1020472680FS8515/views/1,width=300,height=300,appearanceId=70,backgroundColor=000000/https0dayinccom.jpg)](https://shop.spreadshirt.com/0day/0dayinc-A5c3e498cf937643162a01b5f?productType=951&appearance=70)
186
199
 
200
+ [![Black Fingerprint Hoodie](https://image.spreadshirtmedia.com/image-server/v1/products/T111A2PA3208PT17X169Y51D1020472728FS6268/views/1,width=300,height=300,appearanceId=2/https0dayinccom.jpg)](https://shop.spreadshirt.com/0day/blackfingerprint-A5c3e49db1cbf3a0b9596b4d0?productType=111&appearance=2)
data/bin/pwn CHANGED
@@ -3,13 +3,58 @@
3
3
 
4
4
  require 'pwn'
5
5
 
6
- pwn_driver = PWN::Driver::Parser.new
6
+ opts = PWN::Env[:driver_opts]
7
+ pwn_driver = PWN::Driver::Parser.new do |options|
8
+ options.on(
9
+ '-APROMPT',
10
+ '--ai=PROMPT',
11
+ "<Optional - Headless one-shot pwn-ai request (no TUI). '-' reads PROMPT " \
12
+ 'from STDIN. Final answer goes to STDOUT, tool activity to STDERR. ' \
13
+ 'Useful for quick tasks or CI/CD jobs>'
14
+ ) do |a|
15
+ opts[:ai] = a
16
+ end
17
+ end
7
18
  pwn_driver.auto_opts_help = false
8
19
  pwn_driver.parse!
9
20
 
10
21
  begin
11
22
  pwn_pid = Process.pid
12
- PWN::Plugins::REPL.start
23
+
24
+ if opts[:ai]
25
+ # ------------------------------------------------------------------
26
+ # Headless pwn-ai: behave as if the user typed PROMPT at the pwn-ai
27
+ # TUI, but non-interactively — a single agent-loop turn with native
28
+ # tool-calling. STDOUT receives ONLY the final answer so it can be
29
+ # captured/piped; live tool dispatches stream to STDERR for CI logs.
30
+ # $ pwn --ai 'What ports are listening on this host?'
31
+ # $ echo "$PROMPT" | pwn --ai -
32
+ # ------------------------------------------------------------------
33
+ prompt = opts[:ai].to_s
34
+ prompt = $stdin.read if prompt == '-' || (prompt.strip.empty? && !$stdin.tty?)
35
+ raise 'ERROR: --ai requires a non-empty PROMPT (or pipe one via STDIN with --ai -)' if prompt.to_s.strip.empty?
36
+
37
+ sess = PWN::Sessions.create(
38
+ title: "pwn --ai #{Time.now.strftime('%Y-%m-%d %H:%M')}",
39
+ source: 'pwn-ai-headless'
40
+ )
41
+
42
+ on_tool = lambda do |name, args, result|
43
+ preview = args.is_a?(String) ? args[0, 120] : args.inspect[0, 120]
44
+ warn "[ pwn-ai → #{name} ] #{preview}"
45
+ warn result.to_s[0, 700]
46
+ end
47
+
48
+ final = PWN::AI::Agent::Loop.run(
49
+ request: prompt,
50
+ session_id: sess[:id],
51
+ enabled_toolsets: PWN::Env.dig(:ai, :agent, :toolsets),
52
+ on_tool: on_tool
53
+ )
54
+ puts final
55
+ else
56
+ PWN::Plugins::REPL.start
57
+ end
13
58
  rescue StandardError => e
14
59
  raise e
15
60
  ensure
data/bin/pwn_gqrx_scanner CHANGED
@@ -72,6 +72,33 @@ PWN::Driver::Parser.new do |options|
72
72
  options.on('-wLOC', '--location=LOC', '<Optional - Location string to include in AI analysis (e.g. "New York, NY", 90210, GPS coords, etc.)>') do |l|
73
73
  opts[:location] = l
74
74
  end
75
+ options.on('--fft-scan', '<Optional - Use fast FFT-based panoramic scanning via #fast_scan_range (much faster) instead of #scan_range. Applies to profile or --scan-ranges>') do |f|
76
+ opts[:fft_scan] = f
77
+ end
78
+
79
+ options.on('-SRATE', '--sample-rate=RATE', '<Optional --fft-scan - Visible span/sample_rate in Hz (default 1_000_000)>') do |s|
80
+ opts[:sample_rate] = s
81
+ end
82
+
83
+ options.on('-NINT', '--nfft=INT', '<Optional --fft-scan - FFT bin size (default 2048)>') do |n|
84
+ opts[:nfft] = n
85
+ end
86
+
87
+ options.on('-AINT', '--avg=INT', '<Optional --fft-scan - FFT averages (default 2)>') do |a|
88
+ opts[:avg] = a
89
+ end
90
+
91
+ options.on('-CSEC', '--capture-secs=SEC', '<Optional --fft-scan - Capture seconds per chunk (default 0.03)>') do |c|
92
+ opts[:capture_secs] = c
93
+ end
94
+
95
+ options.on('--keep-spectrum', '<Optional --fft-scan - Keep full spectrum data in output (large)>') do |k|
96
+ opts[:keep_spectrum] = k
97
+ end
98
+
99
+ options.on('-ODB', '--strength-offset-db=FLOAT', '<Optional - Power offset in dB (default 0.0)>') do |o|
100
+ opts[:strength_offset_db] = o
101
+ end
75
102
  end.parse!
76
103
 
77
104
  begin
@@ -146,24 +173,54 @@ begin
146
173
  # Merge opts one last time to ensure parameters passed to the driver are included
147
174
  opts.merge!(band_plans[profile.to_sym]) unless profile.nil?
148
175
 
149
- PWN::SDR::GQRX.scan_range(
150
- gqrx_sock: gqrx_sock,
151
- ranges: ranges,
152
- demodulator_mode: demodulator_mode,
153
- bandwidth: bandwidth,
154
- audio_gain_db: audio_gain_db,
155
- squelch: squelch,
156
- precision: precision,
157
- strength_lock: strength_lock,
158
- rf_gain: rf_gain,
159
- intermediate_gain: intermediate_gain,
160
- baseband_gain: baseband_gain,
161
- keep_looping: keep_looping,
162
- scan_log: scan_log,
163
- decoder: decoder,
164
- location: location
165
- )
166
- puts 'Scan Complete.'
176
+ fft_scan = opts[:fft_scan]
177
+ sample_rate = opts[:sample_rate] || 1_000_000
178
+ sample_rate = sample_rate.to_i
179
+ nfft = opts[:nfft] || 2048
180
+ nfft = nfft.to_i
181
+ avgv = opts[:avg] || 2
182
+ avgv = avgv.to_i
183
+ capture_secs = opts[:capture_secs] || 0.03
184
+ capture_secs = capture_secs.to_f
185
+ keep_spectrum = opts[:keep_spectrum] ? true : false
186
+ strength_offset_db = opts[:strength_offset_db]
187
+ strength_offset_db = strength_offset_db.to_f unless strength_offset_db.nil?
188
+
189
+ if fft_scan
190
+ puts '[*] --fft-scan requested: using fast FFT panoramic mode (#fast_scan_range)'
191
+ fast_resp = PWN::SDR::GQRX.fast_scan_range(
192
+ gqrx_sock: gqrx_sock,
193
+ ranges: ranges,
194
+ sample_rate: sample_rate,
195
+ nfft: nfft,
196
+ avg: avgv,
197
+ capture_secs: capture_secs,
198
+ strength_lock: strength_lock,
199
+ keep_spectrum: keep_spectrum,
200
+ strength_offset_db: strength_offset_db,
201
+ scan_log: scan_log
202
+ )
203
+ puts "FFT Scan complete: #{fast_resp[:total]} signals found."
204
+ else
205
+ PWN::SDR::GQRX.scan_range(
206
+ gqrx_sock: gqrx_sock,
207
+ ranges: ranges,
208
+ demodulator_mode: demodulator_mode,
209
+ bandwidth: bandwidth,
210
+ audio_gain_db: audio_gain_db,
211
+ squelch: squelch,
212
+ precision: precision,
213
+ strength_lock: strength_lock,
214
+ rf_gain: rf_gain,
215
+ intermediate_gain: intermediate_gain,
216
+ baseband_gain: baseband_gain,
217
+ keep_looping: keep_looping,
218
+ scan_log: scan_log,
219
+ decoder: decoder,
220
+ location: location
221
+ )
222
+ puts 'Scan Complete.'
223
+ end
167
224
  rescue StandardError => e
168
225
  raise e
169
226
  rescue Interrupt
@@ -1,57 +1,140 @@
1
- # PWN Data Flow Diagrams (DFDs)
1
+ # PWN Data-Flow Diagrams
2
2
 
3
- This page provides visual SVG Data Flow Diagrams illustrating how the PWN offensive cybersecurity framework operates across its key components and workflows.
3
+ 26 SVG diagrams, all rendered from Graphviz sources in
4
+ [`diagrams/dot/`](diagrams/dot/) with a single shared visual theme
5
+ (see [`_THEME.md`](diagrams/dot/_THEME.md)). Rebuild everything with:
4
6
 
5
- ## Core Architecture & Learning
7
+ ```bash
8
+ cd documentation/diagrams && ./build.sh
9
+ ```
6
10
 
7
- - **PWN-AI Feedback Learning Loop**: The closed-loop self-improvement system using Memory, Skills, Metrics, and Learning to evolve capabilities.
8
- ![PWN AI Feedback Learning Loop](diagrams/pwn-ai-feedback-learning-loop.svg)
11
+ Every diagram uses strict layer→layer edges (`newrank=true` + `{rank=same}`
12
+ groups) so lines never criss-cross.
9
13
 
10
- - **PWN REPL Prototyping**: Interactive development and rapid prototyping inside the full PWN namespace.
11
- ![PWN REPL Prototyping](diagrams/pwn-repl-prototyping.svg)
14
+ ---
12
15
 
13
- - **History Command to Driver Generation**: How REPL exploration and `history` are turned into reusable Drivers and Skills.
14
- ![History to Drivers](diagrams/history-to-drivers.svg)
16
+ ## 1 · Architecture
15
17
 
16
- ## Primary Security Workflows
18
+ ### Overall PWN Architecture
19
+ [source](diagrams/dot/overall-pwn-architecture.dot) · doc: [How PWN Works](How-PWN-Works.md)
20
+ ![overall-pwn-architecture](diagrams/overall-pwn-architecture.svg)
17
21
 
18
- - **Penetration Testing Workflow**: End-to-end red teaming from recon to reporting, leveraging all PWN capabilities.
19
- ![Penetration Testing Workflow](diagrams/penetration-testing-workflow.svg)
22
+ ### `~/.pwn/` Persistence Map
23
+ [source](diagrams/dot/persistence-filesystem.dot) · doc: [Persistence](Persistence.md)
24
+ ![persistence-filesystem](diagrams/persistence-filesystem.svg)
20
25
 
21
- - **Network & Infrastructure Testing**: Discovery, enumeration, scanning, packet crafting, and infra-specific testing (AWS, Jenkins, etc.).
22
- ![Network & Infrastructure Testing](diagrams/network-infra-testing.svg)
26
+ ### Plugin Ecosystem (66 modules)
27
+ [source](diagrams/dot/plugin-ecosystem.dot) · doc: [Plugins](Plugins.md)
28
+ ![plugin-ecosystem](diagrams/plugin-ecosystem.svg)
23
29
 
24
- - **Web Application Testing**: Proxy-driven spidering, active scanning, manual assisted testing, and API security assessment. (BurpSuite preferred)
25
- ![Web Application Testing](diagrams/web-application-testing.svg)
30
+ ---
26
31
 
27
- - **Code Scanning & SAST**: Static analysis, test case generation, and vulnerability reporting using `PWN::SAST`.
28
- ![Code Scanning SAST](diagrams/code-scanning-sast.svg)
32
+ ## 2 · Entry Points
29
33
 
30
- - **Fuzzing Workflows**: Protocol, file, network, and web fuzzing with monitoring and corpus refinement.
31
- ![Fuzzing Workflows](diagrams/fuzzing-workflow.svg)
34
+ ### `pwn` REPL Prototyping
35
+ [source](diagrams/dot/pwn-repl-prototyping.dot) · doc: [pwn REPL](pwn-REPL.md)
36
+ ![pwn-repl-prototyping](diagrams/pwn-repl-prototyping.svg)
32
37
 
33
- - **Reverse Engineering Flow**: Binary/firmware analysis, patching, targeted fuzzing, and exploit crafting.
34
- ![Reverse Engineering Flow](diagrams/reverse-engineering-flow.svg)
38
+ ### REPL History Reusable Driver / Skill
39
+ [source](diagrams/dot/history-to-drivers.dot) · doc: [Drivers](Drivers.md)
40
+ ![history-to-drivers](diagrams/history-to-drivers.svg)
35
41
 
36
- ## Additional Notes
42
+ ### Driver Anatomy (`bin/pwn_*`)
43
+ [source](diagrams/dot/driver-framework.dot) · doc: [CLI Drivers](CLI-Drivers.md)
44
+ ![driver-framework](diagrams/driver-framework.svg)
37
45
 
38
- - Diagrams are generated using Graphviz (dot) from source `.dot` files in `diagrams/dot/`.
39
- - These visualize the integration of:
40
- - `PWN::Plugins` (67+ modules)
41
- - `PWN::AI::Agent` + tool calling + LLM providers
42
- - `PWN::Memory`, `PWN::Skills`, and Learning loop
43
- - `PWN::SAST`, `PWN::Reports`, `PWN::Driver`
44
- - For the source definitions, see `diagrams/dot/*.dot`.
45
- - Update these diagrams by editing the `.dot` files and re-rendering with `dot -Tsvg`.
46
+ ---
46
47
 
47
- ## Related Wiki Pages
48
+ ## 3 · AI Agent
48
49
 
49
- - [How PWN Works](How-PWN-Works.md)
50
- - [pwn-ai Agent](pwn-ai-Agent.md)
51
- - [pwn REPL](pwn-REPL.md)
52
- - [Skills, Memory & Learning](Skills-Memory-Learning.md)
53
- - [Plugins](Plugins.md)
54
- - [SAST](SAST.md)
55
- - [Drivers](Drivers.md)
50
+ ### pwn-ai Closed Self-Improvement Loop
51
+ [source](diagrams/dot/pwn-ai-feedback-learning-loop.dot) · doc: [Skills, Memory & Learning](Skills-Memory-Learning.md)
52
+ ![pwn-ai-feedback-learning-loop](diagrams/pwn-ai-feedback-learning-loop.svg)
56
53
 
57
- [[Diagrams]]
54
+ ### Multi-Provider LLM Integration
55
+ [source](diagrams/dot/ai-integration-tool-calling.dot) · doc: [AI Integration](AI-Integration.md)
56
+ ![ai-integration-tool-calling](diagrams/ai-integration-tool-calling.svg)
57
+
58
+ ### Agent Tool Registry (10 toolsets)
59
+ [source](diagrams/dot/agent-tool-registry.dot) · doc: [Agent Tool Registry](Agent-Tool-Registry.md)
60
+ ![agent-tool-registry](diagrams/agent-tool-registry.svg)
61
+
62
+ ### Memory · Skills · Sessions Detail
63
+ [source](diagrams/dot/memory-skills-detailed.dot) · doc: [Skills, Memory & Learning](Skills-Memory-Learning.md)
64
+ ![memory-skills-detailed](diagrams/memory-skills-detailed.svg)
65
+
66
+ ### Extrospection — World Awareness
67
+ [source](diagrams/dot/extrospection-world-awareness.dot) · doc: [Extrospection](Extrospection.md)
68
+ ![extrospection-world-awareness](diagrams/extrospection-world-awareness.svg)
69
+
70
+ ### Swarm — Native Multi-Agent
71
+ [source](diagrams/dot/swarm-multi-agent.dot) · doc: [Swarm](Swarm.md)
72
+ ![swarm-multi-agent](diagrams/swarm-multi-agent.svg)
73
+
74
+ ### Cron — Scheduled Jobs
75
+ [source](diagrams/dot/cron-scheduling.dot) · doc: [Cron](Cron.md)
76
+ ![cron-scheduling](diagrams/cron-scheduling.svg)
77
+
78
+ ### Sessions ↔ Cron ↔ Swarm Continuity
79
+ [source](diagrams/dot/sessions-cron-automation.dot) · doc: [Sessions](Sessions.md)
80
+ ![sessions-cron-automation](diagrams/sessions-cron-automation.svg)
81
+
82
+ ---
83
+
84
+ ## 4 · Security Workflows
85
+
86
+ ### End-to-End Penetration Test
87
+ [source](diagrams/dot/penetration-testing-workflow.dot)
88
+ ![penetration-testing-workflow](diagrams/penetration-testing-workflow.svg)
89
+
90
+ ### Web Application Testing
91
+ [source](diagrams/dot/web-application-testing.dot) · doc: [BurpSuite](BurpSuite.md)
92
+ ![web-application-testing](diagrams/web-application-testing.svg)
93
+
94
+ ### Burp ⭐ vs ZAP Selection
95
+ [source](diagrams/dot/burp-vs-zap-preference.dot)
96
+ ![burp-vs-zap-preference](diagrams/burp-vs-zap-preference.svg)
97
+
98
+ ### Network & Infrastructure Testing
99
+ [source](diagrams/dot/network-infra-testing.dot) · doc: [NmapIt](NmapIt.md)
100
+ ![network-infra-testing](diagrams/network-infra-testing.svg)
101
+
102
+ ### SAST / Code Scanning
103
+ [source](diagrams/dot/code-scanning-sast.dot) · doc: [SAST](SAST.md)
104
+ ![code-scanning-sast](diagrams/code-scanning-sast.svg)
105
+
106
+ ### Fuzzing
107
+ [source](diagrams/dot/fuzzing-workflow.dot) · doc: [Fuzzing](Fuzzing.md)
108
+ ![fuzzing-workflow](diagrams/fuzzing-workflow.svg)
109
+
110
+ ### Reverse Engineering & Binary Exploitation
111
+ [source](diagrams/dot/reverse-engineering-flow.dot) · doc: [Hardware](Hardware.md)
112
+ ![reverse-engineering-flow](diagrams/reverse-engineering-flow.svg)
113
+
114
+ ### Zero-Day Research Lifecycle
115
+ [source](diagrams/dot/zero-day-research-flow.dot)
116
+ ![zero-day-research-flow](diagrams/zero-day-research-flow.svg)
117
+
118
+ ### Reporting Pipeline
119
+ [source](diagrams/dot/reporting-pipeline.dot) · doc: [Reporting](Reporting.md)
120
+ ![reporting-pipeline](diagrams/reporting-pipeline.svg)
121
+
122
+ ---
123
+
124
+ ## 5 · Domain-Specific
125
+
126
+ ### AWS Cloud Security (90 services)
127
+ [source](diagrams/dot/aws-cloud-security.dot) · doc: [AWS](AWS.md)
128
+ ![aws-cloud-security](diagrams/aws-cloud-security.svg)
129
+
130
+ ### SDR / Radio Hacking
131
+ [source](diagrams/dot/sdr-radio-flow.dot) · doc: [SDR](SDR.md)
132
+ ![sdr-radio-flow](diagrams/sdr-radio-flow.svg)
133
+
134
+ ### Hardware & Physical-Layer
135
+ [source](diagrams/dot/hardware-hacking.dot) · doc: [Hardware](Hardware.md)
136
+ ![hardware-hacking](diagrams/hardware-hacking.svg)
137
+
138
+ ---
139
+
140
+ [← Back to Home](Home.md)
@@ -1,40 +1,60 @@
1
- # General PWN Usage
1
+ # General Usage — Day-One Cheat Sheet
2
2
 
3
- ## Launching PWN
3
+ ## Launch
4
4
 
5
5
  ```bash
6
- $ pwn
7
- pwn[v0.5.613]:001 >>>
6
+ $ pwn # interactive REPL
7
+ $ pwn --ai "scan 10.0.0.0/24 with NmapIt and summarise open services"
8
+ $ pwn_nmap_discover_tcp_udp -t 10.0.0.0/24 -o out/ # headless driver
8
9
  ```
9
10
 
10
- ## Essential Commands Inside REPL
11
+ ## Inside the REPL
11
12
 
12
- - `PWN.help` — overview of top-level modules
13
- - `PWN::Plugins.constants.sort` list all plugins
14
- - `pwn-ai` start the autonomous AI agent TUI (recommended)
15
- - `pwn-asm` — assembly/REPL for low-level work
16
- - `pwn-ai-memory`, `pwn-ai-sessions`, `pwn-ai-cron` — management helpers
17
- - `back` exit `pwn-ai` mode
18
- - Full Ruby expressions work at any time.
19
-
20
- ## Recommended Workflow
21
-
22
- 1. Launch `pwn`
23
- 2. Start `pwn-ai`
24
- 3. Give natural language tasks that leverage plugins, skills, memory.
25
- 4. Use `SHIFT+ENTER` for multi-line prompts.
26
-
27
- ## Updating PWN
13
+ ```ruby
14
+ PWN.help # top-level help
15
+ PWN::Plugins.constants.sort # list all 66 plugins
16
+ PWN::Plugins::NmapIt.help # per-plugin usage
17
+ ls PWN::Plugins::BurpSuite # Pry: list methods
18
+ show-source PWN::SAST::SQL.scan # Pry: read the code
19
+ history # what you've typed copy into a driver
20
+ ```
28
21
 
29
- See [Installation](Installation.md).
22
+ ## Custom REPL commands
23
+
24
+ | Command | Does |
25
+ |---|---|
26
+ | `pwn-ai` | Enter the agent TUI (SHIFT+ENTER = newline, ENTER = submit) |
27
+ | `pwn-asm` | Multi-line assembly ↔ opcode workbench |
28
+ | `pwn-ai-memory` | Inspect / edit `~/.pwn/memory.json` |
29
+ | `pwn-ai-sessions` | List / view / delete transcripts |
30
+ | `pwn-ai-cron` | List / run scheduled jobs |
31
+ | `pwn-ai-delegate` | Hand a task to a Swarm persona |
32
+ | `welcome-banner` | Redraw a random `PWN::Banner` |
33
+ | `toggle-pager` | Pry pager on/off |
34
+
35
+ ## A 60-second attack chain
36
+
37
+ ```ruby
38
+ # 1. discover
39
+ nmap = PWN::Plugins::NmapIt.port_scan(target: 'scanme.nmap.org')
40
+
41
+ # 2. drive traffic through Burp
42
+ burp = PWN::Plugins::BurpSuite.start(headless: true)
43
+ b = PWN::Plugins::TransparentBrowser.open(
44
+ browser_type: :headless, proxy: 'http://127.0.0.1:8080')
45
+ b[:browser].goto 'http://scanme.nmap.org'
46
+
47
+ # 3. active scan
48
+ scan = PWN::Plugins::BurpSuite.active_scan(burp_obj: burp,
49
+ target_url: 'http://scanme.nmap.org')
50
+
51
+ # 4. report
52
+ PWN::Reports::SAST.generate(dir_path: '/tmp/src', output_dir: '/tmp/out')
53
+ ```
30
54
 
31
- ## Persistent State
55
+ Then say the same thing in English inside `pwn-ai` and watch the agent do it.
32
56
 
33
- Everything lives under `~/.pwn/`:
34
- - `skills/`
35
- - `memory.json`
36
- - `learning.jsonl`
37
- - `metrics.json`
38
- - sessions, cron jobs, etc.
57
+ **Next:** [pwn REPL](pwn-REPL.md) · [pwn-ai Agent](pwn-ai-Agent.md) ·
58
+ [CLI Drivers](CLI-Drivers.md)
39
59
 
40
- [[Diagrams]]
60
+ [← Home](Home.md)