pwn 0.5.158 → 0.5.159

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: 17128fbd32d71a091544f76fca85f229d73169803bc91f2c46f35b31edc1d4fe
4
- data.tar.gz: 546a25557d99d85673b9e7e2c2843a87166683120754c2728ba87bdd6799fe25
3
+ metadata.gz: 7f15b5602a73c8726bfd66d6ed8ec663f5b0d4f9fb6d1b13a5a5ce02563b6e5a
4
+ data.tar.gz: 19614b0dce31aa5eb46bc81c35ec76940a992f8664510aca1fb2b25788090b79
5
5
  SHA512:
6
- metadata.gz: 6bf82dd3a36906f3218e489d35747821caf709bbb52e549731e0c2b2fe10e369f93ba990f6bd3c0f7305b4704cf7e3e1ce821b2d1da19e8ea6ab8dc9d85bdd80
7
- data.tar.gz: 203ebcfae33475985d2f7b6275a2c8bd1c4c2f302025fccd2c3c86f81faa50a7360fb7c5e201b51b4a578166759638020b8ca30ed436bc4c0a9b298749c02211
6
+ metadata.gz: 43a7da7a7938a383d7b9af1f00ebc2e796aed590bf21e5771e1a8b7bb504168a0b62ba50926f0e33f52fd012f34b2e61e959a1b30d0e243cd0c1057099bffcbe
7
+ data.tar.gz: 272d5f97b39eeee26ac2fe05d58c0dcaa8455eb80c12b457775a727fc5e536995831f23a127289c04afeef250f880ff2b2c4ae281ba76e38ae180c5649b17724
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.158]:001 >>> PWN.help
40
+ pwn[v0.5.159]: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.3.1@pwn
52
52
  $ gem uninstall --all --executables pwn
53
53
  $ gem install --verbose pwn
54
54
  $ pwn
55
- pwn[v0.5.158]:001 >>> PWN.help
55
+ pwn[v0.5.159]: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.3.1@pwn
62
62
  $ rvmsudo gem uninstall --all --executables pwn
63
63
  $ rvmsudo gem install --verbose pwn
64
64
  $ pwn
65
- pwn[v0.5.158]:001 >>> PWN.help
65
+ pwn[v0.5.159]: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:
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'concurrent-ruby'
3
+ # require 'concurrent-ruby'
4
4
 
5
5
  module PWN
6
6
  module Plugins
@@ -22,30 +22,6 @@ module PWN
22
22
  # end
23
23
  # end
24
24
 
25
- public_class_method def self.fill(opts = {})
26
- enumerable_array = opts[:enumerable_array]
27
- max_threads = opts[:max_threads].to_i
28
- max_threads = 9 if max_threads.zero?
29
- detach = opts[:detach] ||= false
30
-
31
- puts "Initiating Thread Pool of #{max_threads} Worker Threads...."
32
- pool = Concurrent::FixedThreadPool.new(max_threads)
33
-
34
- enumerable_array.each do |this_thread|
35
- pool.post do
36
- yield this_thread
37
- end
38
- end
39
-
40
- pool.shutdown
41
- pool.wait_for_termination unless detach
42
- rescue Interrupt
43
- puts "\nGoodbye."
44
- rescue StandardError => e
45
- puts e.backtrace
46
- raise e
47
- end
48
-
49
25
  # public_class_method def self.fill(opts = {})
50
26
  # enumerable_array = opts[:enumerable_array]
51
27
  # max_threads = opts[:max_threads].to_i
@@ -53,29 +29,54 @@ module PWN
53
29
  # detach = opts[:detach] ||= false
54
30
 
55
31
  # puts "Initiating Thread Pool of #{max_threads} Worker Threads...."
56
- # queue = SizedQueue.new(max_threads)
57
- # threads = Array.new(max_threads) do
58
- # Thread.new do
59
- # until (this_thread = queue.pop) == :POOL_EXHAUSTED
60
- # yield this_thread
61
- # end
62
- # end
63
- # end
64
-
65
- # enumerable_array.uniq.each do |this_thread|
66
- # queue << this_thread
67
- # end
32
+ # pool = Concurrent::FixedThreadPool.new(max_threads)
68
33
 
69
- # max_threads.times do
70
- # queue << :POOL_EXHAUSTED
34
+ # enumerable_array.each do |this_thread|
35
+ # pool.post do
36
+ # yield this_thread
37
+ # end
71
38
  # end
72
39
 
73
- # threads.each(&:join) unless detach
40
+ # pool.shutdown
41
+ # pool.wait_for_termination unless detach
74
42
  # rescue Interrupt
75
43
  # puts "\nGoodbye."
76
44
  # rescue StandardError => e
45
+ # puts e.backtrace
77
46
  # raise e
78
47
  # end
48
+ # METHOD ABOVE IS SLOWER THAN THE ONE BELOW
49
+
50
+ public_class_method def self.fill(opts = {})
51
+ enumerable_array = opts[:enumerable_array]
52
+ max_threads = opts[:max_threads].to_i
53
+ max_threads = 9 if max_threads.zero?
54
+ detach = opts[:detach] ||= false
55
+
56
+ puts "Initiating Thread Pool of #{max_threads} Worker Threads...."
57
+ queue = SizedQueue.new(max_threads)
58
+ threads = Array.new(max_threads) do
59
+ Thread.new do
60
+ until (this_thread = queue.pop) == :POOL_EXHAUSTED
61
+ yield this_thread
62
+ end
63
+ end
64
+ end
65
+
66
+ enumerable_array.uniq.each do |this_thread|
67
+ queue << this_thread
68
+ end
69
+
70
+ max_threads.times do
71
+ queue << :POOL_EXHAUSTED
72
+ end
73
+
74
+ threads.each(&:join) unless detach
75
+ rescue Interrupt
76
+ puts "\nGoodbye."
77
+ rescue StandardError => e
78
+ raise e
79
+ end
79
80
 
80
81
  # Author(s):: 0day Inc. <support@0dayinc.com>
81
82
 
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.158'
4
+ VERSION = '0.5.159'
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.158
4
+ version: 0.5.159
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.