pwn 0.4.685 → 0.4.687

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: 7c8a9d19201ea5bc364c54f219793d78d18d123597948e9ef303c932f79c0131
4
- data.tar.gz: 6c00287d48a1c29b91ca168f19dcb42e0be0d9f0511e21f0ef9fd4a9a14b3670
3
+ metadata.gz: 912b6527626cc283537ab0f750b10c605e534bad484dea3cb86e54655bf21583
4
+ data.tar.gz: 4be3440e260caef978c9b496fed9b201d03722ab1803cab38ced76e41c7f95c6
5
5
  SHA512:
6
- metadata.gz: c816e09aa17304195221630d3305f387e0ef48854bbf0db8887169f43f31ae8067be097dd1bfdec8446d0f4714afc1ff58126879bf5dfb08e36fbb81eef911ae
7
- data.tar.gz: 73be9fe0f2ed5ea932b05852a2fbc2ce23b620ea9829211521a88a30ff3e69ec49d1f257804c3af92635891c84012b328d2e762b999ff84d338ee831e9efce48
6
+ metadata.gz: 967cd8770e0909e4fefa4bdcc665f00290ecd23d8bffe22df5f9778780c554949a38815a06134f006e42573dd4a07f5a84d2afaefd3da6e018943bdce6b3930a
7
+ data.tar.gz: 86ba07e0b154a26b123bcd1b91c0dd918770a523ab55e8b1f28a0edde82cdc083f671c957d16b419e5c1e0bc1da432175543fabde836c8d1284edb5d509edeb5
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.685]:001 >>> PWN.help
40
+ pwn[v0.4.687]: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.685]:001 >>> PWN.help
55
+ pwn[v0.4.687]:001 >>> PWN.help
56
56
  ```
57
57
 
58
58
 
@@ -60,19 +60,44 @@ def csv_diff(opts = {})
60
60
  no_headers = opts[:no_headers]
61
61
  column_names_to_exclude = opts[:column_names_to_exclude].to_s.split(',')
62
62
 
63
- csv1 = CSV.read(c1_path)
64
- csv2 = CSV.read(c2_path)
63
+ csv1 = CSV.open(
64
+ c1_path,
65
+ 'rb',
66
+ col_sep: ',',
67
+ quote_char: '"',
68
+ force_quotes: true
69
+ ).read
70
+
71
+ csv2 = CSV.open(
72
+ c2_path,
73
+ 'rb',
74
+ col_sep: ',',
75
+ quote_char: '"',
76
+ force_quotes: true
77
+ ).read
65
78
 
66
79
  if csv1.length >= csv2.length
67
80
  larger_csv = csv1
68
- larger_csv_orig = CSV.read(c1_path)
81
+ larger_csv_orig = CSV.open(
82
+ c1_path,
83
+ 'rb',
84
+ col_sep: ',',
85
+ quote_char: '"',
86
+ force_quotes: true
87
+ ).read
69
88
 
70
89
  smaller_csv = csv2
71
90
  end
72
91
 
73
92
  if csv2.length >= csv1.length
74
93
  larger_csv = csv2
75
- larger_csv_orig = CSV.read(c2_path)
94
+ larger_csv_orig = CSV.open(
95
+ c2_path,
96
+ 'rb',
97
+ col_sep: ',',
98
+ quote_char: '"',
99
+ force_quotes: true
100
+ ).read
76
101
 
77
102
  smaller_csv = csv1
78
103
  end
@@ -105,22 +130,21 @@ def csv_diff(opts = {})
105
130
  csv.puts line_arr if smaller_csv.select { |sc| sc.join(',') == line }.empty?
106
131
  end
107
132
  end
108
- diff_csv = CSV.read(diff_path)
133
+ diff_csv = CSV.open(
134
+ diff_path,
135
+ 'rb',
136
+ col_sep: ',',
137
+ quote_char: '"',
138
+ force_quotes: true
139
+ ).read
109
140
 
110
141
  # Write diff again with all columns.
111
- csv_headers_orig = larger_csv_orig.first
112
142
  CSV.open(diff_path, 'w', col_sep: ',', quote_char: '"', force_quotes: true) do |csv|
113
- if no_headers
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?
117
- end
118
- else
119
- csv.puts csv_headers_orig
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?
123
- end
143
+ csv.puts larger_csv_orig.first unless no_headers
144
+ larger_csv_orig.each_with_index do |line_arr, index|
145
+ # Use larger_csv instead of orig to compare column redaction to diff_csv
146
+ line = larger_csv[index].join(',')
147
+ csv.puts line_arr if diff_csv.select { |dc| dc.join(',') == line }.any?
124
148
  end
125
149
  end
126
150
  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.685'
4
+ VERSION = '0.4.687'
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.685
4
+ version: 0.4.687
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.