A driver is a small executable in bin/ that wires OptionParser to one
or more PWN:: calls. All 52 shipped pwn_* binaries follow the same
15-line template.
- Prototype in the REPL until the calls work.
history→ copy the winning lines.- Drop them into the template below as
bin/pwn_<name>. chmod +x bin/pwn_<name>· add topwn.gemspecexecutables ·rake install.- (Optional)
learning_distill_skill(name: '<name>')so the agent knows the procedure too.
#!/usr/bin/env ruby
# frozen_string_literal: true
require 'optparse'
require 'pwn'
opts = {}
OptionParser.new do |o|
o.banner = "USAGE: #{File.basename($PROGRAM_NAME)} [opts]"
o.on('-tTARGET', '--target=TARGET', 'Required target') { |v| opts[:target] = v }
o.on('-oDIR', '--out=DIR', 'Output directory') { |v| opts[:out] = v }
end.parse!
raise OptionParser::MissingArgument, '-t' unless opts[:target]
result = PWN::Plugins::NmapIt.port_scan(target: opts[:target])
PWN::Reports::Fuzz.generate(result: result, dir_path: opts[:out]) if opts[:out]
puts result| Artifact | Made with | Consumed by |
|---|---|---|
bin/pwn_<name> |
template above | shell / CI |
~/.pwn/skills/<name>/SKILL.md |
learning_distill_skill |
every future pwn-ai prompt |
cron job |
cron_create(ruby: '...') |
system crontab → unattended |
See also: CLI Drivers · Cron · Skills, Memory & Learning