Skip to content

Commit a048fc2

Browse files
committed
PWN::WWW::REPL module - #bugfixs in scope details for pwn-irc command (i.e. AI chat env)
1 parent b8ec447 commit a048fc2

File tree

4 files changed

+12
-17
lines changed

4 files changed

+12
-17
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ $ cd /opt/pwn
3737
$ ./install.sh
3838
$ ./install.sh ruby-gem
3939
$ pwn
40-
pwn[v0.5.243]:001 >>> PWN.help
40+
pwn[v0.5.244]:001 >>> PWN.help
4141
```
4242

4343
[![Installing the pwn Security Automation Framework](https://raw.githubusercontent.com/0dayInc/pwn/master/documentation/pwn_install.png)](https://youtu.be/G7iLUY4FzsI)
@@ -52,7 +52,7 @@ $ rvm use ruby-3.4.1@pwn
5252
$ gem uninstall --all --executables pwn
5353
$ gem install --verbose pwn
5454
$ pwn
55-
pwn[v0.5.243]:001 >>> PWN.help
55+
pwn[v0.5.244]:001 >>> PWN.help
5656
```
5757

5858
If you're using a multi-user install of RVM do:
@@ -62,7 +62,7 @@ $ rvm use ruby-3.4.1@pwn
6262
$ rvmsudo gem uninstall --all --executables pwn
6363
$ rvmsudo gem install --verbose pwn
6464
$ pwn
65-
pwn[v0.5.243]:001 >>> PWN.help
65+
pwn[v0.5.244]:001 >>> PWN.help
6666
```
6767

6868
PWN periodically upgrades to the latest version of Ruby which is reflected in `/opt/pwn/.ruby-version`. The easiest way to upgrade to the latest version of Ruby from a previous PWN installation is to run the following script:

etc/pwn.yaml.EXAMPLE

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ irc:
2727
browser:
2828
pwn_rb: '/opt/pwn/lib/pwn/plugins/transparent_browser.rb'
2929
system_role_content: 'You are a browser. You are a web browser that can be controlled by a human or AI agent'
30-
ninja:
30+
nimjeh:
3131
pwn_rb: ''
3232
system_role_content: 'You are a sarcastic hacker. You find software zero day vulnerabilities. This involves analyzing source code, race conditions, application binaries, and network protocols from an offensive security perspective.'
3333
nmap:
@@ -39,7 +39,6 @@ irc:
3939

4040
meshtastic:
4141
psks:
42-
admin: 'required - PSK for admin channel'
4342
LongFast: 'required - PSK for LongFast channel'
4443
PWN: 'required - PSK for pwn channel'
4544

lib/pwn/plugins/repl.rb

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -128,18 +128,15 @@ def h1_scope
128128
suppress_progress: true
129129
)
130130
# Top 10 Programs
131-
top_programs = h1_programs.sort_by { |s| s[:min_payout].delete('$').to_f }.reverse[0..9]
131+
top_program = h1_programs.sort_by { |s| s[:min_payout].delete('$').to_f }.reverse.first
132132

133-
h1_scope_details = []
134-
top_programs.each do |program|
135-
program_name = program[:name]
136-
this_h1_scope = PWN::WWW::HackerOne.get_scope_details(
137-
program_name: program_name
138-
)
139-
h1_scope_details.push(this_h1_scope)
140-
end
133+
program_name = top_program[:name]
134+
h1_scope_details = PWN::WWW::HackerOne.get_scope_details(
135+
program_name: program_name
136+
)
137+
top_program_scope = h1_scope_details[:scope_details][:data][:team][:structured_scopes_search][:nodes]
141138

142-
h1_scope_details
139+
top_program_scope
143140
rescue StandardError => e
144141
raise e
145142
ensure
@@ -227,7 +224,6 @@ def process
227224
! If PWN_Framework is defined, understand the purpose of the module and how it is used
228225
! Generate ruby examples using the capabilities of the PWN_Framework if applicable
229226
! `require 'pwn'` is the gem needed to using the PWN_Framework capabilities
230-
! Any agents with target_scope defined owns a portion of authorized targets in scope for exploitation
231227
Your area of expertise is the following:
232228
#{ai_system_role_content}
233229
"

lib/pwn/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

33
module PWN
4-
VERSION = '0.5.243'
4+
VERSION = '0.5.244'
55
end

0 commit comments

Comments
 (0)