pwn 0.4.683 → 0.4.685

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: a362d5d6b626ad180e190b8db5c2266485132fa9ac27a080c213872f8219f966
4
- data.tar.gz: 1deaf377020280c46f788c1f45536416fe622d725fe651e9e0f804149cdf128e
3
+ metadata.gz: 7c8a9d19201ea5bc364c54f219793d78d18d123597948e9ef303c932f79c0131
4
+ data.tar.gz: 6c00287d48a1c29b91ca168f19dcb42e0be0d9f0511e21f0ef9fd4a9a14b3670
5
5
  SHA512:
6
- metadata.gz: d6930a5c36baccb7c9415e13f1c169e796219cbf4f562de30dd78cdbaafdc21afff1be6c1b879d9426ce8cdb43d37885446214880b9f36adc444e44dd07c9a49
7
- data.tar.gz: 1862fa144f7ced19c1cc4fdee53b4d250282de0002b7c28bbf40d46599cab93d01ba3951d639c2981b6560ccb41c401c19ef7f2d2a093e5b3fb4debb5c883311
6
+ metadata.gz: c816e09aa17304195221630d3305f387e0ef48854bbf0db8887169f43f31ae8067be097dd1bfdec8446d0f4714afc1ff58126879bf5dfb08e36fbb81eef911ae
7
+ data.tar.gz: 73be9fe0f2ed5ea932b05852a2fbc2ce23b620ea9829211521a88a30ff3e69ec49d1f257804c3af92635891c84012b328d2e762b999ff84d338ee831e9efce48
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.683]:001 >>> PWN.help
40
+ pwn[v0.4.685]: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.683]:001 >>> PWN.help
55
+ pwn[v0.4.685]: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,7 +75,6 @@ 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
@@ -101,27 +99,27 @@ def csv_diff(opts = {})
101
99
  end
102
100
 
103
101
  # Write diff with redacted columns (to find differences we care about)
104
- File.open(diff_path, 'w') do |f|
102
+ CSV.open(diff_path, 'w', col_sep: ',', quote_char: '"', force_quotes: true) do |csv|
105
103
  larger_csv.each do |line_arr|
106
104
  line = line_arr.join(',')
107
- 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?
108
106
  end
109
107
  end
110
108
  diff_csv = CSV.read(diff_path)
111
109
 
112
110
  # Write diff again with all columns.
113
- csv_headers_orig = larger_csv_orig.first.join(',')
114
- 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|
115
113
  if no_headers
116
- larger_csv_orig.each do |line_arr|
117
- line = line_arr.join(',')
118
- 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?
119
117
  end
120
118
  else
121
- f.puts csv_headers_orig
122
- larger_csv_orig[1..-1].each do |line_arr|
123
- line = line_arr.join(',')
124
- f.puts line if diff_csv.select { |dc| dc.join(',') == line }
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?
125
123
  end
126
124
  end
127
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.683'
4
+ VERSION = '0.4.685'
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.683
4
+ version: 0.4.685
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.