pwn 0.5.254 → 0.5.256

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 64d8af414630ccaa72fbcd4e9f8cb2a3578fe75ed4eb85431ac6a6b82fc3050f
4
- data.tar.gz: cf8b2554f1bca1cb6ab010f05c234d8809f106a5f49cb1bd0b6b2a72a470ea96
3
+ metadata.gz: ec288d693aeb1ac636b660f94c0eb76b38af996b1da19ee254658ca5abfe2f0b
4
+ data.tar.gz: 8273e39021d56970afdd9b10269411c6b1273f2d03efb712d5a36b50c91befc7
5
5
  SHA512:
6
- metadata.gz: 640f2ee1f7586deba37913a29ed9987d48d01783117a1b334b6f44f8143473a1598fe550af08302a9d79e9c90a4dbd7ed4f13a42700864252eefdfe8095931a7
7
- data.tar.gz: 15ce743cc3f513318413139b32c04e8204e98075ff75e060fde5792cbc43303ab7bc3eee8e9729afd0fc3e510d96c24543ea80792a95a786e6720dde679826c0
6
+ metadata.gz: f3b92960031463e117224044902eed1d8b83d2a76e9013fc7dc35e5f5fc1e05fd5e538a758df78c23a6d8ab7af2d511a344919fc03c42c1bdcaf61333f1f7dd5
7
+ data.tar.gz: 55fd07ad96fe4680093d33c42365f3b888d88e74ec4d74afed22ccb494cf7f0954a62d4aa9889ac8d3811f3033020f57e5301cb13f4c65eb4004e7b18f8afe25
data/.rubocop_todo.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2025-02-15 22:50:15 UTC using RuboCop version 1.72.1.
3
+ # on 2025-04-21 18:26:41 UTC using RuboCop version 1.75.2.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
@@ -41,7 +41,7 @@ Lint/RedundantTypeConversion:
41
41
  - 'lib/pwn/plugins/jenkins.rb'
42
42
  - 'lib/pwn/plugins/repl.rb'
43
43
 
44
- # Offense count: 320
44
+ # Offense count: 319
45
45
  # This cop supports safe autocorrection (--autocorrect).
46
46
  # Configuration parameters: AutoCorrect.
47
47
  Lint/UselessAssignment:
@@ -173,10 +173,30 @@ Style/RedundantBegin:
173
173
 
174
174
  # Offense count: 94
175
175
  # This cop supports safe autocorrection (--autocorrect).
176
+ # Configuration parameters: AllowedMethods.
177
+ # AllowedMethods: nonzero?
176
178
  Style/RedundantCondition:
177
179
  Exclude:
178
180
  - 'lib/pwn/plugins/packet.rb'
179
181
 
182
+ # Offense count: 13
183
+ # This cop supports safe autocorrection (--autocorrect).
184
+ Style/RedundantParentheses:
185
+ Exclude:
186
+ - 'lib/pwn/sast/banned_function_calls_c.rb'
187
+ - 'lib/pwn/sast/cmd_execution_java.rb'
188
+ - 'lib/pwn/sast/cmd_execution_python.rb'
189
+ - 'lib/pwn/sast/cmd_execution_ruby.rb'
190
+ - 'lib/pwn/sast/cmd_execution_scala.rb'
191
+ - 'lib/pwn/sast/deserial_java.rb'
192
+ - 'lib/pwn/sast/factory.rb'
193
+ - 'lib/pwn/sast/log4j.rb'
194
+ - 'lib/pwn/sast/logger.rb'
195
+ - 'lib/pwn/sast/php_input_mechanisms.rb'
196
+ - 'lib/pwn/sast/php_type_juggling.rb'
197
+ - 'lib/pwn/sast/throw_errors.rb'
198
+ - 'lib/pwn/sast/type_script_type_juggling.rb'
199
+
180
200
  # Offense count: 12
181
201
  # This cop supports safe autocorrection (--autocorrect).
182
202
  Style/RedundantStringEscape:
data/Gemfile CHANGED
@@ -56,7 +56,7 @@ gem 'net-ldap', '0.19.0'
56
56
  gem 'net-openvpn', '0.8.7'
57
57
  gem 'net-smtp', '0.5.1'
58
58
  gem 'nexpose', '7.3.0'
59
- gem 'nokogiri', '1.18.7'
59
+ gem 'nokogiri', '1.18.8'
60
60
  gem 'nokogiri-diff', '0.3.0'
61
61
  # gem 'oauth2', '2.0.9'
62
62
  gem 'oily_png', '1.2.1'
data/README.md CHANGED
@@ -37,7 +37,7 @@ $ cd /opt/pwn
37
37
  $ ./install.sh
38
38
  $ ./install.sh ruby-gem
39
39
  $ pwn
40
- pwn[v0.5.254]:001 >>> PWN.help
40
+ pwn[v0.5.256]:001 >>> PWN.help
41
41
  ```
42
42
 
43
43
  [![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
52
52
  $ gem uninstall --all --executables pwn
53
53
  $ gem install --verbose pwn
54
54
  $ pwn
55
- pwn[v0.5.254]:001 >>> PWN.help
55
+ pwn[v0.5.256]:001 >>> PWN.help
56
56
  ```
57
57
 
58
58
  If you're using a multi-user install of RVM do:
@@ -62,7 +62,7 @@ $ rvm use ruby-3.4.1@pwn
62
62
  $ rvmsudo gem uninstall --all --executables pwn
63
63
  $ rvmsudo gem install --verbose pwn
64
64
  $ pwn
65
- pwn[v0.5.254]:001 >>> PWN.help
65
+ pwn[v0.5.256]:001 >>> PWN.help
66
66
  ```
67
67
 
68
68
  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:
@@ -36,18 +36,20 @@ OptionParser.new do |options|
36
36
  end
37
37
  end.parse!
38
38
 
39
- if opts.empty?
40
- puts `#{File.basename($PROGRAM_NAME)} --help`
41
- exit 1
42
- end
39
+ # if opts.empty?
40
+ # puts `#{File.basename($PROGRAM_NAME)} --help`
41
+ # exit 1
42
+ # end
43
43
 
44
44
  begin
45
- block_dev = opts[:block_dev] if File.exist?(opts[:block_dev])
46
- baud = opts[:baud]
47
- data_bits = opts[:data_bits]
48
- stop_bits = opts[:stop_bits]
49
- parity = opts[:parity]
50
- flow_control = opts[:flow_control]
45
+ block_dev = opts[:block_dev] ||= '/dev/ttyUSB0'
46
+ raise "ERROR: Block device not found: #{block_dev}" unless File.exist?(block_dev)
47
+
48
+ baud = opts[:baud] ||= 9_600
49
+ data_bits = opts[:data_bits] ||= 8
50
+ stop_bits = opts[:stop_bits] ||= 1
51
+ parity = opts[:parity] ||= 'none'
52
+ flow_control = opts[:flow_control] ||= 'soft'
51
53
 
52
54
  msr206_obj = PWN::Plugins::MSR206.connect(
53
55
  block_dev: block_dev,
@@ -59,9 +61,9 @@ begin
59
61
  )
60
62
 
61
63
  puts "- Welcome to #{File.basename($PROGRAM_NAME)} -"
62
- puts "Connected via: #{block_dev} @ #{msr206_obj[:serial_conn].modem_params}"
63
- puts "Flow Control: #{msr206_obj[:serial_conn].flow_control}"
64
- puts "Signals: #{msr206_obj[:serial_conn].signals}"
64
+ # puts "Connected via: #{block_dev} @ #{msr206_obj[:serial_conn].modem_params}"
65
+ # puts "Flow Control: #{msr206_obj[:serial_conn].flow_control}"
66
+ # puts "Signals: #{msr206_obj[:serial_conn].signals}"
65
67
 
66
68
  exec_resp = PWN::Plugins::MSR206.exec(
67
69
  msr206_obj: msr206_obj,
@@ -77,7 +77,7 @@ module PWN
77
77
 
78
78
  hexdump.each do |key, value|
79
79
  key_int = key.to_i(16)
80
- value[:hex] = Array.new(16, byte) if key_int >= start_int && key_int <= end_int
80
+ value[:hex] = Array.new(16, byte) if key_int.between?(start_int, end_int)
81
81
  end
82
82
 
83
83
  hexdump
data/lib/pwn/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PWN
4
- VERSION = '0.5.254'
4
+ VERSION = '0.5.256'
5
5
  end
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.254
4
+ version: 0.5.256
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.
@@ -617,14 +617,14 @@ dependencies:
617
617
  requirements:
618
618
  - - '='
619
619
  - !ruby/object:Gem::Version
620
- version: 1.18.7
620
+ version: 1.18.8
621
621
  type: :runtime
622
622
  prerelease: false
623
623
  version_requirements: !ruby/object:Gem::Requirement
624
624
  requirements:
625
625
  - - '='
626
626
  - !ruby/object:Gem::Version
627
- version: 1.18.7
627
+ version: 1.18.8
628
628
  - !ruby/object:Gem::Dependency
629
629
  name: nokogiri-diff
630
630
  requirement: !ruby/object:Gem::Requirement