pwn 0.5.790 → 0.5.792
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.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/lib/pwn/version.rb +1 -1
- data/spec/lib/pwn/plugins/repl/ai_console_spec.rb +33 -13
- data/third_party/pwn_rdoc.jsonl +2 -0
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0d9faf1e37903f9f0bf4c98030427b5f62fae266b50e02a85bf70f7732515abf
|
|
4
|
+
data.tar.gz: cffff5cf764a901a9ebabe6c840daeaa64f52e286185d48856c0166ea268457f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a08a110a62e07958a85431b858c4590c41af6d49c42bd3f70dbbacd37231bb4eee363a1279139dfb7b7679f676bde6062ce99ccca19f02f715075510aa8896f3
|
|
7
|
+
data.tar.gz: 9293669aaef1c48e4d48cf67fccf5f237b4517ca2da3e93956053510be5887b5b91ddfed01fa271ceb221db45668a1c59d5c4ea52e6f0a73969ba8cc34da3f3d
|
data/Gemfile
CHANGED
|
@@ -11,7 +11,7 @@ gemspec
|
|
|
11
11
|
# In some circumstances custom flags are passed to gems in order
|
|
12
12
|
# to build appropriately. Defer to ./reinstall_pwn_gemset.sh
|
|
13
13
|
# to review these custom flags (e.g. pg, serialport, etc).
|
|
14
|
-
gem 'activesupport', '<8.1.4'
|
|
14
|
+
gem 'activesupport', '<8.1.4.1'
|
|
15
15
|
gem 'anemone', '0.7.2'
|
|
16
16
|
gem 'authy', '3.0.1'
|
|
17
17
|
gem 'aws-sdk', '3.3.0'
|
data/lib/pwn/version.rb
CHANGED
|
@@ -515,13 +515,22 @@ describe 'pwn-ai curses launch' do # rubocop:disable Metrics/BlockLength -- publ
|
|
|
515
515
|
@screen = screen
|
|
516
516
|
output = double('terminal', tty?: true)
|
|
517
517
|
previous = [$stdin, $stdout, $stderr]
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
518
|
+
@console = nil
|
|
519
|
+
allow(PWN::Plugins::REPL::AIConsole::Console).to receive(:new).and_wrap_original do |original, *args, **kwargs|
|
|
520
|
+
@console = original.call(*args, **kwargs)
|
|
521
|
+
end
|
|
522
|
+
expired = Class.new(Exception) # rubocop:disable Lint/InheritException -- must escape Console rescue StandardError
|
|
523
|
+
begin
|
|
524
|
+
Timeout.timeout(60, expired) do
|
|
525
|
+
reader = lambda do
|
|
526
|
+
key = keys.empty? ? tick.call : keys.shift
|
|
527
|
+
Thread.pass if key.nil?
|
|
528
|
+
key
|
|
529
|
+
end
|
|
530
|
+
PWN::Plugins::REPL::AIConsole.run(pry: @pry, input: input, output: output, curses: screen, getch: reader)
|
|
523
531
|
end
|
|
524
|
-
|
|
532
|
+
rescue expired
|
|
533
|
+
raise expired, "execution expired phase=#{@launch_phase.inspect} session=#{@pry.config.pwn_ai_session_id} paint=#{@paint.join[-240]}"
|
|
525
534
|
end
|
|
526
535
|
expect([$stdin, $stdout]).to eq(previous.take(2))
|
|
527
536
|
expect(PWN::Plugins::Log.raw_stderr).to equal(previous[2])
|
|
@@ -2674,15 +2683,26 @@ describe 'pwn-ai curses launch' do # rubocop:disable Metrics/BlockLength -- publ
|
|
|
2674
2683
|
expect(opts[:messages]).to include(hash_including(role: 'user', content: 'Previous fixture question'), hash_including(role: 'assistant', content: 'Previous fixture answer'))
|
|
2675
2684
|
{ choices: [{ message: { role: 'assistant', content: 'Selected route.', tool_calls: [] } }] }
|
|
2676
2685
|
end
|
|
2677
|
-
keys = "/model openai console-fixture\n
|
|
2678
|
-
|
|
2686
|
+
keys = "/model openai console-fixture\n".chars
|
|
2687
|
+
phase = :model
|
|
2679
2688
|
launch(keys) do
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2689
|
+
@launch_phase = phase
|
|
2690
|
+
idle = @console && !@console.send(:busy?)
|
|
2691
|
+
case phase
|
|
2692
|
+
when :model
|
|
2693
|
+
if idle && @paint.join.include?('model=console-fixture')
|
|
2694
|
+
phase = :resume
|
|
2695
|
+
keys.concat("/sessions resume resumed console\n".chars)
|
|
2696
|
+
end
|
|
2683
2697
|
nil
|
|
2684
|
-
|
|
2685
|
-
|
|
2698
|
+
when :resume
|
|
2699
|
+
if idle && @pry.config.pwn_ai_session_id == sid
|
|
2700
|
+
phase = :ask
|
|
2701
|
+
keys.concat("what color is a lemon?\n".chars)
|
|
2702
|
+
end
|
|
2703
|
+
nil
|
|
2704
|
+
else
|
|
2705
|
+
"\u0004" if @paint.join.include?('Selected route.')
|
|
2686
2706
|
end
|
|
2687
2707
|
end
|
|
2688
2708
|
expect(@pry.config.pwn_ai_session_id).to eq(sid)
|
data/third_party/pwn_rdoc.jsonl
CHANGED
|
@@ -1900,9 +1900,11 @@
|
|
|
1900
1900
|
{"messages":[{"role":"user","content":"PWN::Backups.capture Usage"},{"role":"assistant","content":"`PWN::Backups.capture`: Supported Method Parameters\n\nPWN::Backups.capture(path: ‘/path/to/source’, label: ‘learning’)\n"}]}
|
|
1901
1901
|
{"messages":[{"role":"user","content":"PWN::Backups.configure Usage"},{"role":"assistant","content":"`PWN::Backups.configure`: Supported Method Parameters\n\nPWN::Backups.configure(root: nil)\n"}]}
|
|
1902
1902
|
{"messages":[{"role":"user","content":"PWN::Backups.directory Usage"},{"role":"assistant","content":"`PWN::Backups.directory`: Supported Method Parameters\n\nPWN::Backups.directory(label: ‘maintenance’) Caller must hold transaction through the final source mutation and ledger.\n"}]}
|
|
1903
|
+
{"messages":[{"role":"user","content":"PWN::Backups.expirable_name? Usage"},{"role":"assistant","content":"`PWN::Backups.expirable_name?`: "}]}
|
|
1903
1904
|
{"messages":[{"role":"user","content":"PWN::Backups.help Usage"},{"role":"assistant","content":"`PWN::Backups.help`: "}]}
|
|
1904
1905
|
{"messages":[{"role":"user","content":"PWN::Backups.legacy_inventory Usage"},{"role":"assistant","content":"`PWN::Backups.legacy_inventory`: "}]}
|
|
1905
1906
|
{"messages":[{"role":"user","content":"PWN::Backups.legacy_unreferenced Usage"},{"role":"assistant","content":"`PWN::Backups.legacy_unreferenced`: "}]}
|
|
1907
|
+
{"messages":[{"role":"user","content":"PWN::Backups.owned_directory? Usage"},{"role":"assistant","content":"`PWN::Backups.owned_directory?`: "}]}
|
|
1906
1908
|
{"messages":[{"role":"user","content":"PWN::Backups.reconcile Usage"},{"role":"assistant","content":"`PWN::Backups.reconcile`: Supported Method Parameters\n\nPWN::Backups.reconcile(generation: ‘name’, expected_sha256: ‘digest’, confirmed: true)\n"}]}
|
|
1907
1909
|
{"messages":[{"role":"user","content":"PWN::Backups.reference_pins Usage"},{"role":"assistant","content":"`PWN::Backups.reference_pins`: "}]}
|
|
1908
1910
|
{"messages":[{"role":"user","content":"PWN::Backups.relocate_legacy Usage"},{"role":"assistant","content":"`PWN::Backups.relocate_legacy`: Supported Method Parameters\n\nPWN::Backups.relocate_legacy(paths: [], dry_run: true, writers_stopped: false)\n"}]}
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: pwn
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.5.
|
|
4
|
+
version: 0.5.792
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- 0day Inc.
|
|
@@ -15,14 +15,14 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - "<"
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version: 8.1.4
|
|
18
|
+
version: 8.1.4.1
|
|
19
19
|
type: :runtime
|
|
20
20
|
prerelease: false
|
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
22
22
|
requirements:
|
|
23
23
|
- - "<"
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
|
-
version: 8.1.4
|
|
25
|
+
version: 8.1.4.1
|
|
26
26
|
- !ruby/object:Gem::Dependency
|
|
27
27
|
name: anemone
|
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|