pwn 0.4.681 → 0.4.683
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/README.md +2 -2
- data/bin/pwn_diff_csv_files_w_column_exclude +25 -15
- data/lib/pwn/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a362d5d6b626ad180e190b8db5c2266485132fa9ac27a080c213872f8219f966
|
4
|
+
data.tar.gz: 1deaf377020280c46f788c1f45536416fe622d725fe651e9e0f804149cdf128e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d6930a5c36baccb7c9415e13f1c169e796219cbf4f562de30dd78cdbaafdc21afff1be6c1b879d9426ce8cdb43d37885446214880b9f36adc444e44dd07c9a49
|
7
|
+
data.tar.gz: 1862fa144f7ced19c1cc4fdee53b4d250282de0002b7c28bbf40d46599cab93d01ba3951d639c2981b6560ccb41c401c19ef7f2d2a093e5b3fb4debb5c883311
|
data/Gemfile
CHANGED
@@ -66,7 +66,7 @@ gem 'rspec', '3.12.0'
|
|
66
66
|
gem 'rtesseract', '3.1.2'
|
67
67
|
gem 'rubocop', '1.50.2'
|
68
68
|
gem 'rubocop-rake', '0.6.0'
|
69
|
-
gem 'rubocop-rspec', '2.
|
69
|
+
gem 'rubocop-rspec', '2.22.0'
|
70
70
|
gem 'ruby-audio', '1.6.1'
|
71
71
|
gem 'ruby-nmap', '1.0.1'
|
72
72
|
gem 'ruby-saml', '1.15.0'
|
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.683]: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.683]:001 >>> PWN.help
|
56
56
|
```
|
57
57
|
|
58
58
|
|
@@ -42,6 +42,17 @@ if opts.empty?
|
|
42
42
|
exit 1
|
43
43
|
end
|
44
44
|
|
45
|
+
def ommit_columns_by_indices(opts = {})
|
46
|
+
csv = opts[:csv]
|
47
|
+
columns_index_arr = opts[:columns_index_arr]
|
48
|
+
|
49
|
+
csv.each do |line_arr|
|
50
|
+
line_arr.delete_if.with_index do |_, index|
|
51
|
+
columns_index_arr.include?(index)
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
45
56
|
def csv_diff(opts = {})
|
46
57
|
c1_path = opts[:c1_path]
|
47
58
|
c2_path = opts[:c2_path]
|
@@ -71,30 +82,29 @@ def csv_diff(opts = {})
|
|
71
82
|
# Exclude the column values for diff to ensure the same rows
|
72
83
|
# with for example different timestamps aren't included.
|
73
84
|
columns_index_arr = []
|
74
|
-
column_names_to_exclude&.each do |
|
85
|
+
column_names_to_exclude&.each do |cn|
|
86
|
+
column_name = cn.strip.chomp
|
75
87
|
column_index = smaller_csv.first.find_index(column_name)
|
76
88
|
columns_index_arr.push(column_index)
|
77
89
|
end
|
78
90
|
|
79
91
|
if columns_index_arr.any?
|
80
|
-
larger_csv
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
end
|
90
|
-
end
|
92
|
+
larger_csv = ommit_columns_by_indices(
|
93
|
+
csv: larger_csv,
|
94
|
+
columns_index_arr: columns_index_arr
|
95
|
+
)
|
96
|
+
|
97
|
+
smaller_csv = ommit_columns_by_indices(
|
98
|
+
csv: smaller_csv,
|
99
|
+
columns_index_arr: columns_index_arr
|
100
|
+
)
|
91
101
|
end
|
92
102
|
|
93
103
|
# Write diff with redacted columns (to find differences we care about)
|
94
104
|
File.open(diff_path, 'w') do |f|
|
95
105
|
larger_csv.each do |line_arr|
|
96
106
|
line = line_arr.join(',')
|
97
|
-
f.puts line unless smaller_csv.
|
107
|
+
f.puts line unless smaller_csv.select { |sc| sc.join(',') == line }
|
98
108
|
end
|
99
109
|
end
|
100
110
|
diff_csv = CSV.read(diff_path)
|
@@ -105,13 +115,13 @@ def csv_diff(opts = {})
|
|
105
115
|
if no_headers
|
106
116
|
larger_csv_orig.each do |line_arr|
|
107
117
|
line = line_arr.join(',')
|
108
|
-
f.puts line if diff_csv.
|
118
|
+
f.puts line if diff_csv.select { |dc| dc.join(',') == line }
|
109
119
|
end
|
110
120
|
else
|
111
121
|
f.puts csv_headers_orig
|
112
122
|
larger_csv_orig[1..-1].each do |line_arr|
|
113
123
|
line = line_arr.join(',')
|
114
|
-
f.puts line if diff_csv.
|
124
|
+
f.puts line if diff_csv.select { |dc| dc.join(',') == line }
|
115
125
|
end
|
116
126
|
end
|
117
127
|
end
|
data/lib/pwn/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pwn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.683
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- 0day Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-05-
|
11
|
+
date: 2023-05-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -786,14 +786,14 @@ dependencies:
|
|
786
786
|
requirements:
|
787
787
|
- - '='
|
788
788
|
- !ruby/object:Gem::Version
|
789
|
-
version: 2.
|
789
|
+
version: 2.22.0
|
790
790
|
type: :runtime
|
791
791
|
prerelease: false
|
792
792
|
version_requirements: !ruby/object:Gem::Requirement
|
793
793
|
requirements:
|
794
794
|
- - '='
|
795
795
|
- !ruby/object:Gem::Version
|
796
|
-
version: 2.
|
796
|
+
version: 2.22.0
|
797
797
|
- !ruby/object:Gem::Dependency
|
798
798
|
name: ruby-audio
|
799
799
|
requirement: !ruby/object:Gem::Requirement
|