pwn 0.4.682 → 0.4.684
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/bin/pwn_diff_csv_files_w_column_exclude +12 -13
- data/lib/pwn/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fc65a639b9feb5d098338ec5aff1a879749d356c8d56ee28d3de50100ea95ab4
|
4
|
+
data.tar.gz: 7eaba402e2224b56b079d05a674bb486fc993b87b69d959a8c364dacbf1bf09b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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.
|
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 |
|
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
|
-
|
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
|
-
|
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
|
113
|
-
|
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.
|
116
|
-
line =
|
117
|
-
|
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].
|
122
|
-
line =
|
123
|
-
|
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