pwn 0.4.681 → 0.4.682

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: 717524d6d611b962be2b71ffb95c427abd3c173347b651904b2a1b1294fd807b
4
- data.tar.gz: 894b9128466217e15befedcc67296d47de56e61640eb88c119512994a9db98f1
3
+ metadata.gz: ff2630dcb10e95139743093026f1f2210bb4735a241abacf2d87682bb5ed0f4b
4
+ data.tar.gz: 11df6a65e5956837bac3a84a6ad6f35af63626c1e8f0cd10f076cb0eeb9166e2
5
5
  SHA512:
6
- metadata.gz: e129b34830468a21f9fa339af587f3c8428cd0328dfa27c8dc5b1e78dc76264dba7398a2341c47f558f072cc36a6024c93ada70564b97fe8b9cbfbd440aa34bc
7
- data.tar.gz: 6e9383ba997f1146c6196720e4d2ff0c33b8b982814d37d373eb7888b1a4a21d721e0d35aeb629da10e4c93c497ce7716120220769e131f41eb13415125dc720
6
+ metadata.gz: 2b71de5e43b85215cfc389d46f3aaff7ebbbf7d5c10a4e3a5cf064d5f3c6bfba1d541e99ac0739961ea83ac104852e150ac3de116d12f26e16e93d8f5edab030
7
+ data.tar.gz: 7fad3ff770bbd8337a548890a713d6c7176783950f43f6abb8d57b25be111a0ed86b5db062cb7bee45c121f04d1d067f37a2a630bfcf5cd688c737de3ddb8f78
data/Gemfile CHANGED
@@ -66,7 +66,7 @@ gem 'rspec', '3.12.0'
66
66
  gem 'rtesseract', '3.1.2'
67
67
  gem 'rubocop', '1.50.2'
68
68
  gem 'rubocop-rake', '0.6.0'
69
- gem 'rubocop-rspec', '2.21.0'
69
+ gem 'rubocop-rspec', '2.22.0'
70
70
  gem 'ruby-audio', '1.6.1'
71
71
  gem 'ruby-nmap', '1.0.1'
72
72
  gem 'ruby-saml', '1.15.0'
data/README.md CHANGED
@@ -37,7 +37,7 @@ $ rvm use ruby-3.2.2@pwn
37
37
  $ rvm list gemsets
38
38
  $ gem install --verbose pwn
39
39
  $ pwn
40
- pwn[v0.4.681]:001 >>> PWN.help
40
+ pwn[v0.4.682]: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.2.2@pwn
52
52
  $ gem uninstall --all --executables pwn
53
53
  $ gem install --verbose pwn
54
54
  $ pwn
55
- pwn[v0.4.681]:001 >>> PWN.help
55
+ pwn[v0.4.682]:001 >>> PWN.help
56
56
  ```
57
57
 
58
58
 
@@ -42,6 +42,17 @@ if opts.empty?
42
42
  exit 1
43
43
  end
44
44
 
45
+ def ommit_columns_by_indices(opts = {})
46
+ csv = opts[:csv]
47
+ columns_index_arr = opts[:columns_index_arr]
48
+
49
+ csv.each do |line_arr|
50
+ line_arr.delete_if.with_index do |_, index|
51
+ columns_index_arr.include?(index)
52
+ end
53
+ end
54
+ end
55
+
45
56
  def csv_diff(opts = {})
46
57
  c1_path = opts[:c1_path]
47
58
  c2_path = opts[:c2_path]
@@ -77,24 +88,22 @@ def csv_diff(opts = {})
77
88
  end
78
89
 
79
90
  if columns_index_arr.any?
80
- larger_csv.each do |line_arr|
81
- line_arr.delete_if.with_index do |_, index|
82
- columns_index_arr.include?(index)
83
- end
84
- end
85
-
86
- smaller_csv.each do |line_arr|
87
- line_arr.delete_if.with_index do |_, index|
88
- columns_index_arr.include?(index)
89
- end
90
- end
91
+ larger_csv = ommit_columns_by_indices(
92
+ csv: larger_csv,
93
+ columns_index_arr: columns_index_arr
94
+ )
95
+
96
+ smaller_csv = ommit_columns_by_indices(
97
+ csv: smaller_csv,
98
+ columns_index_arr: columns_index_arr
99
+ )
91
100
  end
92
101
 
93
102
  # Write diff with redacted columns (to find differences we care about)
94
103
  File.open(diff_path, 'w') do |f|
95
104
  larger_csv.each do |line_arr|
96
105
  line = line_arr.join(',')
97
- f.puts line unless smaller_csv.include?(line_arr)
106
+ f.puts line unless smaller_csv.select { |sc| sc.join(',') == line }
98
107
  end
99
108
  end
100
109
  diff_csv = CSV.read(diff_path)
@@ -105,13 +114,13 @@ def csv_diff(opts = {})
105
114
  if no_headers
106
115
  larger_csv_orig.each do |line_arr|
107
116
  line = line_arr.join(',')
108
- f.puts line if diff_csv.include?(line_arr)
117
+ f.puts line if diff_csv.select { |dc| dc.join(',') == line }
109
118
  end
110
119
  else
111
120
  f.puts csv_headers_orig
112
121
  larger_csv_orig[1..-1].each do |line_arr|
113
122
  line = line_arr.join(',')
114
- f.puts line if diff_csv.include?(line_arr)
123
+ f.puts line if diff_csv.select { |dc| dc.join(',') == line }
115
124
  end
116
125
  end
117
126
  end
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.4.681'
4
+ VERSION = '0.4.682'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pwn
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.681
4
+ version: 0.4.682
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-05-05 00:00:00.000000000 Z
11
+ date: 2023-05-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -786,14 +786,14 @@ dependencies:
786
786
  requirements:
787
787
  - - '='
788
788
  - !ruby/object:Gem::Version
789
- version: 2.21.0
789
+ version: 2.22.0
790
790
  type: :runtime
791
791
  prerelease: false
792
792
  version_requirements: !ruby/object:Gem::Requirement
793
793
  requirements:
794
794
  - - '='
795
795
  - !ruby/object:Gem::Version
796
- version: 2.21.0
796
+ version: 2.22.0
797
797
  - !ruby/object:Gem::Dependency
798
798
  name: ruby-audio
799
799
  requirement: !ruby/object:Gem::Requirement