Skip to content

Commit f7de92e

Browse files
committed
pwn REPL Driver - decouple monkey patches, adding commands, and adding hooks from driver by implementing PWN::Plugins::MonkeyPatch && PWN::Plugins::REPL modules
1 parent 4568689 commit f7de92e

File tree

10 files changed

+538
-402
lines changed

10 files changed

+538
-402
lines changed

.rubocop_todo.yml

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This configuration was generated by
22
# `rubocop --auto-gen-config`
3-
# on 2024-03-25 22:25:57 UTC using RuboCop version 1.62.1.
3+
# on 2024-03-26 16:48:38 UTC using RuboCop version 1.62.1.
44
# The point is for the user to remove these configuration records
55
# one by one as the offenses are removed from the code base.
66
# Note that changes in the inspected code, or installation of new
@@ -35,6 +35,12 @@ Layout/LineLength:
3535
- 'lib/pwn/reports/uri_buster.rb'
3636
- 'lib/pwn/sast/banned_function_calls_c.rb'
3737

38+
# Offense count: 7
39+
# Configuration parameters: AllowedMethods, AllowedPatterns.
40+
Lint/NestedMethodDefinition:
41+
Exclude:
42+
- 'lib/pwn/plugins/repl.rb'
43+
3844
# Offense count: 311
3945
# This cop supports unsafe autocorrection (--autocorrect-all).
4046
# Configuration parameters: AutoCorrect.
@@ -88,6 +94,14 @@ Metrics/ModuleLength:
8894
- 'lib/pwn/plugins/open_ai.rb'
8995
- 'lib/pwn/plugins/packet.rb'
9096

97+
# Offense count: 1
98+
# This cop supports safe autocorrection (--autocorrect).
99+
# Configuration parameters: EnforcedStyle.
100+
# SupportedStyles: prefer_alias, prefer_alias_method
101+
Style/Alias:
102+
Exclude:
103+
- 'lib/pwn/plugins/monkey_patch.rb'
104+
91105
# Offense count: 160
92106
Style/ClassVars:
93107
Enabled: false
@@ -105,11 +119,10 @@ Style/ExplicitBlockArgument:
105119
Exclude:
106120
- 'lib/pwn/plugins/nmap_it.rb'
107121

108-
# Offense count: 3
122+
# Offense count: 2
109123
# This cop supports safe autocorrection (--autocorrect).
110124
Style/IfUnlessModifier:
111125
Exclude:
112-
- 'bin/pwn'
113126
- 'lib/pwn/plugins/baresip.rb'
114127
- 'lib/pwn/plugins/mail_agent.rb'
115128

@@ -133,18 +146,3 @@ Style/RedundantStringEscape:
133146
# This cop supports unsafe autocorrection (--autocorrect-all).
134147
Style/SlicingWithRange:
135148
Enabled: false
136-
137-
# Offense count: 1
138-
# This cop supports safe autocorrection (--autocorrect).
139-
# Configuration parameters: AllowModifier.
140-
Style/SoleNestedConditional:
141-
Exclude:
142-
- 'bin/pwn'
143-
144-
# Offense count: 1
145-
# This cop supports safe autocorrection (--autocorrect).
146-
# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
147-
# SupportedStyles: single_quotes, double_quotes
148-
Style/StringLiterals:
149-
Exclude:
150-
- 'bin/pwn'

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ gem 'msfrpc-client', '1.1.2'
5050
gem 'netaddr', '2.0.6'
5151
gem 'net-ldap', '0.19.0'
5252
gem 'net-openvpn', '0.8.7'
53-
gem 'net-smtp', '0.4.0.1'
53+
gem 'net-smtp', '0.5.0'
5454
gem 'nexpose', '7.3.0'
5555
gem 'nokogiri', '1.16.3'
5656
gem 'nokogiri-diff', '0.3.0'

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.67]:001 >>> PWN.help
40+
pwn[v0.5.68]: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.3.0@pwn
5252
$ gem uninstall --all --executables pwn
5353
$ gem install --verbose pwn
5454
$ pwn
55-
pwn[v0.5.67]:001 >>> PWN.help
55+
pwn[v0.5.68]: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.3.0@pwn
6262
$ rvmsudo gem uninstall --all --executables pwn
6363
$ rvmsudo gem install --verbose pwn
6464
$ pwn
65-
pwn[v0.5.67]:001 >>> PWN.help
65+
pwn[v0.5.68]: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:

0 commit comments

Comments
 (0)