pwn 0.4.682 → 0.4.684

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: ff2630dcb10e95139743093026f1f2210bb4735a241abacf2d87682bb5ed0f4b
4
- data.tar.gz: 11df6a65e5956837bac3a84a6ad6f35af63626c1e8f0cd10f076cb0eeb9166e2
3
+ metadata.gz: fc65a639b9feb5d098338ec5aff1a879749d356c8d56ee28d3de50100ea95ab4
4
+ data.tar.gz: 7eaba402e2224b56b079d05a674bb486fc993b87b69d959a8c364dacbf1bf09b
5
5
  SHA512:
6
- metadata.gz: 2b71de5e43b85215cfc389d46f3aaff7ebbbf7d5c10a4e3a5cf064d5f3c6bfba1d541e99ac0739961ea83ac104852e150ac3de116d12f26e16e93d8f5edab030
7
- data.tar.gz: 7fad3ff770bbd8337a548890a713d6c7176783950f43f6abb8d57b25be111a0ed86b5db062cb7bee45c121f04d1d067f37a2a630bfcf5cd688c737de3ddb8f78
6
+ metadata.gz: 8f1f57ffdc82271079c1bc77dab775cdce2efc0ecf1d0c6d90cda58bae1a9d76370ade0464ec8b86c641b8ec7f8a2cd6c17156c45cd213df56b5e3a17570a9e1
7
+ data.tar.gz: 1b307c4aa90cb5106d59e69b71ac7782e1d81592939bbdce6cb397b1a2ae915b3f95f57ce0a59b120a87cf49278c762c689cd3cc0fa0a7f4d4a03a2b2fea7edb
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.682]:001 >>> PWN.help
40
+ pwn[v0.4.684]: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.682]:001 >>> PWN.help
55
+ pwn[v0.4.684]:001 >>> PWN.help
56
56
  ```
57
57
 
58
58
 
@@ -68,7 +68,6 @@ def csv_diff(opts = {})
68
68
  larger_csv_orig = CSV.read(c1_path)
69
69
 
70
70
  smaller_csv = csv2
71
- smaller_csv_orig = CSV.read(c2_path)
72
71
  end
73
72
 
74
73
  if csv2.length >= csv1.length
@@ -76,13 +75,13 @@ def csv_diff(opts = {})
76
75
  larger_csv_orig = CSV.read(c2_path)
77
76
 
78
77
  smaller_csv = csv1
79
- smaller_csv_orig = CSV.read(c1_path)
80
78
  end
81
79
 
82
80
  # Exclude the column values for diff to ensure the same rows
83
81
  # with for example different timestamps aren't included.
84
82
  columns_index_arr = []
85
- column_names_to_exclude&.each do |column_name|
83
+ column_names_to_exclude&.each do |cn|
84
+ column_name = cn.strip.chomp
86
85
  column_index = smaller_csv.first.find_index(column_name)
87
86
  columns_index_arr.push(column_index)
88
87
  end
@@ -100,27 +99,27 @@ def csv_diff(opts = {})
100
99
  end
101
100
 
102
101
  # Write diff with redacted columns (to find differences we care about)
103
- File.open(diff_path, 'w') do |f|
102
+ CSV.open(diff_path, 'w', col_sep: ',', quote_char: '"', force_quotes: true) do |csv|
104
103
  larger_csv.each do |line_arr|
105
104
  line = line_arr.join(',')
106
- f.puts line unless smaller_csv.select { |sc| sc.join(',') == line }
105
+ csv.puts line_arr if smaller_csv.select { |sc| sc.join(',') == line }.empty?
107
106
  end
108
107
  end
109
108
  diff_csv = CSV.read(diff_path)
110
109
 
111
110
  # Write diff again with all columns.
112
- csv_headers_orig = larger_csv_orig.first.join(',')
113
- File.open(diff_path, 'w') do |f|
111
+ csv_headers_orig = larger_csv_orig.first
112
+ CSV.open(diff_path, 'w', col_sep: ',', quote_char: '"', force_quotes: true) do |csv|
114
113
  if no_headers
115
- larger_csv_orig.each do |line_arr|
116
- line = line_arr.join(',')
117
- f.puts line if diff_csv.select { |dc| dc.join(',') == line }
114
+ larger_csv_orig.each_with_index do |line_arr, index|
115
+ line = larger_csv[index].join(',')
116
+ csv.puts line_arr if diff_csv.select { |dc| dc.join(',') == line }.any?
118
117
  end
119
118
  else
120
119
  f.puts csv_headers_orig
121
- larger_csv_orig[1..-1].each do |line_arr|
122
- line = line_arr.join(',')
123
- f.puts line if diff_csv.select { |dc| dc.join(',') == line }
120
+ larger_csv_orig[1..-1].each_with_index do |line_arr, index|
121
+ line = larger_csv[index].join(',')
122
+ csv.puts line_arr if diff_csv.select { |dc| dc.join(',') == line }.any?
124
123
  end
125
124
  end
126
125
  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.682'
4
+ VERSION = '0.4.684'
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.4.682
4
+ version: 0.4.684
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.