pwn 0.4.684 → 0.4.686

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fc65a639b9feb5d098338ec5aff1a879749d356c8d56ee28d3de50100ea95ab4
4
- data.tar.gz: 7eaba402e2224b56b079d05a674bb486fc993b87b69d959a8c364dacbf1bf09b
3
+ metadata.gz: e10edeff4a08f2aaf687492bafdcbd5ec5ef6a7099f1d944e54e087089c1b7d9
4
+ data.tar.gz: 652a23e3f665cb5725323e9e98b1dbb3f8e361d8f64dbf18e00c354e967164d9
5
5
  SHA512:
6
- metadata.gz: 8f1f57ffdc82271079c1bc77dab775cdce2efc0ecf1d0c6d90cda58bae1a9d76370ade0464ec8b86c641b8ec7f8a2cd6c17156c45cd213df56b5e3a17570a9e1
7
- data.tar.gz: 1b307c4aa90cb5106d59e69b71ac7782e1d81592939bbdce6cb397b1a2ae915b3f95f57ce0a59b120a87cf49278c762c689cd3cc0fa0a7f4d4a03a2b2fea7edb
6
+ metadata.gz: d5ba4c8ea73e48cee72f05f602c7802a957e5623d38bf9a8b65a3cb48be85cb85fc50645c7823159e3804f11290cb70af7eaa674732d61fafca12018dfb998ef
7
+ data.tar.gz: e3ec15feb9161084ec9580a00731e6b94273b7e15e18db19df4bdebab79404b6cd9c2c64ab39a20ee5d8827e6ae209c66cf1404fcb6bffaed5ffc527040f4566
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.684]:001 >>> PWN.help
40
+ pwn[v0.4.686]: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.684]:001 >>> PWN.help
55
+ pwn[v0.4.686]: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
@@ -101,25 +126,28 @@ def csv_diff(opts = {})
101
126
  # Write diff with redacted columns (to find differences we care about)
102
127
  CSV.open(diff_path, 'w', col_sep: ',', quote_char: '"', force_quotes: true) do |csv|
103
128
  larger_csv.each do |line_arr|
104
- line = line_arr.join(',')
105
- csv.puts line_arr if smaller_csv.select { |sc| sc.join(',') == line }.empty?
129
+ csv.puts line_arr if smaller_csv.select { |sc| sc == line_arr }.empty?
106
130
  end
107
131
  end
108
- diff_csv = CSV.read(diff_path)
132
+ diff_csv = CSV.open(
133
+ diff_path,
134
+ 'rb',
135
+ col_sep: ',',
136
+ quote_char: '"',
137
+ force_quotes: true
138
+ ).read
109
139
 
110
140
  # Write diff again with all columns.
111
141
  csv_headers_orig = larger_csv_orig.first
112
142
  CSV.open(diff_path, 'w', col_sep: ',', quote_char: '"', force_quotes: true) do |csv|
113
143
  if no_headers
114
144
  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?
145
+ csv.puts line_arr if diff_csv.select { |dc| dc == larger_csv[index] }.any?
117
146
  end
118
147
  else
119
- f.puts csv_headers_orig
148
+ csv.puts csv_headers_orig
120
149
  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?
150
+ csv.puts line_arr if diff_csv.select { |dc| dc == larger_csv[index] }.any?
123
151
  end
124
152
  end
125
153
  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.684'
4
+ VERSION = '0.4.686'
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.684
4
+ version: 0.4.686
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.