pwn 0.5.380 → 0.5.381
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 +4 -4
- data/README.md +3 -3
- data/lib/pwn/sast/amqp_connect_as_guest.rb +1 -0
- data/lib/pwn/sast/apache_file_system_util_api.rb +1 -0
- data/lib/pwn/sast/aws.rb +1 -0
- data/lib/pwn/sast/banned_function_calls_c.rb +1 -0
- data/lib/pwn/sast/base64.rb +1 -0
- data/lib/pwn/sast/beef_hook.rb +3 -2
- data/lib/pwn/sast/cmd_execution_java.rb +3 -2
- data/lib/pwn/sast/cmd_execution_python.rb +3 -2
- data/lib/pwn/sast/cmd_execution_ruby.rb +3 -2
- data/lib/pwn/sast/cmd_execution_scala.rb +3 -2
- data/lib/pwn/sast/csrf.rb +3 -2
- data/lib/pwn/sast/deserial_java.rb +3 -2
- data/lib/pwn/sast/emoticon.rb +3 -2
- data/lib/pwn/sast/eval.rb +3 -2
- data/lib/pwn/sast/factory.rb +3 -2
- data/lib/pwn/sast/http_authorization_header.rb +3 -2
- data/lib/pwn/sast/inner_html.rb +3 -2
- data/lib/pwn/sast/keystore.rb +3 -2
- data/lib/pwn/sast/local_storage.rb +3 -2
- data/lib/pwn/sast/location_hash.rb +3 -2
- data/lib/pwn/sast/log4j.rb +3 -2
- data/lib/pwn/sast/logger.rb +3 -2
- data/lib/pwn/sast/md5.rb +3 -2
- data/lib/pwn/sast/outer_html.rb +3 -2
- data/lib/pwn/sast/padding_oracle.rb +3 -2
- data/lib/pwn/sast/password.rb +3 -2
- data/lib/pwn/sast/php_input_mechanisms.rb +3 -2
- data/lib/pwn/sast/php_type_juggling.rb +3 -2
- data/lib/pwn/sast/pom_version.rb +3 -2
- data/lib/pwn/sast/port.rb +3 -2
- data/lib/pwn/sast/post_message.rb +3 -2
- data/lib/pwn/sast/private_key.rb +3 -2
- data/lib/pwn/sast/redirect.rb +3 -2
- data/lib/pwn/sast/redos.rb +3 -2
- data/lib/pwn/sast/shell.rb +3 -2
- data/lib/pwn/sast/signature.rb +3 -2
- data/lib/pwn/sast/sql.rb +3 -2
- data/lib/pwn/sast/ssl.rb +3 -2
- data/lib/pwn/sast/sudo.rb +3 -2
- data/lib/pwn/sast/task_tag.rb +3 -2
- data/lib/pwn/sast/throw_errors.rb +3 -2
- data/lib/pwn/sast/token.rb +3 -2
- data/lib/pwn/sast/type_script_type_juggling.rb +3 -2
- data/lib/pwn/sast/version.rb +3 -2
- data/lib/pwn/sast/window_location_hash.rb +3 -2
- 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: e641017027805238c4dfd469d24628b35bc914c7540f2f551ce99020de50c640
|
4
|
+
data.tar.gz: 5b893cb50ab8627355fb65b53b25e7cfd0bdf028b7b2d71dcefde67ed5c812dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f603c2b6dc6478f971e887841eb7ff6958c9bb1899ce6d96664252744a4201e5d9543580b6249cebae5331812deec923ab14ffbd232dad016588093bb97f65a9
|
7
|
+
data.tar.gz: 3e450f3839f9a7c5b40cb6c6e210199216c6e2aefd85299c10cbb339eef59ea9dab6c4ed224379da3f71b8c01338c20e3d55c87da46dd88f9f29de15f1088971
|
data/README.md
CHANGED
@@ -37,7 +37,7 @@ $ cd /opt/pwn
|
|
37
37
|
$ ./install.sh
|
38
38
|
$ ./install.sh ruby-gem
|
39
39
|
$ pwn
|
40
|
-
pwn[v0.5.
|
40
|
+
pwn[v0.5.381]:001 >>> PWN.help
|
41
41
|
```
|
42
42
|
|
43
43
|
[](https://youtu.be/G7iLUY4FzsI)
|
@@ -52,7 +52,7 @@ $ rvm use ruby-3.4.4@pwn
|
|
52
52
|
$ gem uninstall --all --executables pwn
|
53
53
|
$ gem install --verbose pwn
|
54
54
|
$ pwn
|
55
|
-
pwn[v0.5.
|
55
|
+
pwn[v0.5.381]:001 >>> PWN.help
|
56
56
|
```
|
57
57
|
|
58
58
|
If you're using a multi-user install of RVM do:
|
@@ -62,7 +62,7 @@ $ rvm use ruby-3.4.4@pwn
|
|
62
62
|
$ rvmsudo gem uninstall --all --executables pwn
|
63
63
|
$ rvmsudo gem install --verbose pwn
|
64
64
|
$ pwn
|
65
|
-
pwn[v0.5.
|
65
|
+
pwn[v0.5.381]:001 >>> PWN.help
|
66
66
|
```
|
67
67
|
|
68
68
|
PWN periodically upgrades to the latest version of Ruby which is reflected in `/opt/pwn/.ruby-version`. The easiest way to upgrade to the latest version of Ruby from a previous PWN installation is to run the following script:
|
@@ -22,6 +22,7 @@ module PWN
|
|
22
22
|
result_arr = []
|
23
23
|
logger_results = ''
|
24
24
|
|
25
|
+
Dir.chdir(dir_path)
|
25
26
|
PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
|
26
27
|
if File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/ && entry !~ /test/i
|
27
28
|
line_no_and_contents_arr = []
|
@@ -21,6 +21,7 @@ module PWN
|
|
21
21
|
result_arr = []
|
22
22
|
logger_results = ''
|
23
23
|
|
24
|
+
Dir.chdir(dir_path)
|
24
25
|
PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
|
25
26
|
if File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/ && entry !~ /test/i
|
26
27
|
line_no_and_contents_arr = []
|
data/lib/pwn/sast/aws.rb
CHANGED
@@ -20,6 +20,7 @@ module PWN
|
|
20
20
|
result_arr = []
|
21
21
|
logger_results = ''
|
22
22
|
|
23
|
+
Dir.chdir(dir_path)
|
23
24
|
PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
|
24
25
|
if File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/ && entry !~ /test/i
|
25
26
|
line_no_and_contents_arr = []
|
@@ -22,6 +22,7 @@ module PWN
|
|
22
22
|
result_arr = []
|
23
23
|
logger_results = ''
|
24
24
|
|
25
|
+
Dir.chdir(dir_path)
|
25
26
|
PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
|
26
27
|
if (File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/) && (File.extname(entry) == '.c' || File.extname(entry) == '.cpp' || File.extname(entry) == '.c++' || File.extname(entry) == '.cxx' || File.extname(entry) == '.h' || File.extname(entry) == '.hpp' || File.extname(entry) == '.h++' || File.extname(entry) == '.hh' || File.extname(entry) == '.hxx' || File.extname(entry) == '.ii' || File.extname(entry) == '.ixx' || File.extname(entry) == '.ipp' || File.extname(entry) == '.inl' || File.extname(entry) == '.txx' || File.extname(entry) == '.tpp' || File.extname(entry) == '.tpl') && entry !~ /test/i
|
27
28
|
line_no_and_contents_arr = []
|
data/lib/pwn/sast/base64.rb
CHANGED
@@ -21,6 +21,7 @@ module PWN
|
|
21
21
|
result_arr = []
|
22
22
|
logger_results = ''
|
23
23
|
|
24
|
+
Dir.chdir(dir_path)
|
24
25
|
PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
|
25
26
|
if File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/ && entry !~ /test/i
|
26
27
|
line_no_and_contents_arr = []
|
data/lib/pwn/sast/beef_hook.rb
CHANGED
@@ -21,6 +21,7 @@ module PWN
|
|
21
21
|
result_arr = []
|
22
22
|
logger_results = ''
|
23
23
|
|
24
|
+
Dir.chdir(dir_path)
|
24
25
|
PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
|
25
26
|
if File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/ && entry !~ /test/i
|
26
27
|
line_no_and_contents_arr = []
|
@@ -71,9 +72,9 @@ module PWN
|
|
71
72
|
target_file: entry,
|
72
73
|
entry_beautified: entry_beautified
|
73
74
|
)
|
74
|
-
else
|
75
|
-
author = 'N/A'
|
76
75
|
end
|
76
|
+
author ||= 'N/A'
|
77
|
+
|
77
78
|
hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
|
78
79
|
line_no: line_no,
|
79
80
|
contents: contents,
|
@@ -21,6 +21,7 @@ module PWN
|
|
21
21
|
result_arr = []
|
22
22
|
logger_results = ''
|
23
23
|
|
24
|
+
Dir.chdir(dir_path)
|
24
25
|
PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
|
25
26
|
if (File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/) && File.extname(entry) == '.java' && entry !~ /test/i
|
26
27
|
line_no_and_contents_arr = []
|
@@ -73,9 +74,9 @@ module PWN
|
|
73
74
|
target_file: entry,
|
74
75
|
entry_beautified: entry_beautified
|
75
76
|
)
|
76
|
-
else
|
77
|
-
author = 'N/A'
|
78
77
|
end
|
78
|
+
author ||= 'N/A'
|
79
|
+
|
79
80
|
hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
|
80
81
|
line_no: line_no,
|
81
82
|
contents: contents,
|
@@ -21,6 +21,7 @@ module PWN
|
|
21
21
|
result_arr = []
|
22
22
|
logger_results = ''
|
23
23
|
|
24
|
+
Dir.chdir(dir_path)
|
24
25
|
PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
|
25
26
|
if (File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/) && (File.extname(entry) == '.py' || File.extname(entry) == '.pyc' || File.extname(entry) == '.pyo' || File.extname(entry) == '.pyd') && entry !~ /test/i
|
26
27
|
line_no_and_contents_arr = []
|
@@ -75,9 +76,9 @@ module PWN
|
|
75
76
|
target_file: entry,
|
76
77
|
entry_beautified: entry_beautified
|
77
78
|
)
|
78
|
-
else
|
79
|
-
author = 'N/A'
|
80
79
|
end
|
80
|
+
author ||= 'N/A'
|
81
|
+
|
81
82
|
hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
|
82
83
|
line_no: line_no,
|
83
84
|
contents: contents,
|
@@ -21,6 +21,7 @@ module PWN
|
|
21
21
|
result_arr = []
|
22
22
|
logger_results = ''
|
23
23
|
|
24
|
+
Dir.chdir(dir_path)
|
24
25
|
PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
|
25
26
|
if (File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/) && (File.extname(entry) == '.rb' || File.extname(entry) == '.rbw') && entry !~ /test/i
|
26
27
|
line_no_and_contents_arr = []
|
@@ -83,9 +84,9 @@ module PWN
|
|
83
84
|
target_file: entry,
|
84
85
|
entry_beautified: entry_beautified
|
85
86
|
)
|
86
|
-
else
|
87
|
-
author = 'N/A'
|
88
87
|
end
|
88
|
+
author ||= 'N/A'
|
89
|
+
|
89
90
|
hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
|
90
91
|
line_no: line_no,
|
91
92
|
contents: contents,
|
@@ -21,6 +21,7 @@ module PWN
|
|
21
21
|
result_arr = []
|
22
22
|
logger_results = ''
|
23
23
|
|
24
|
+
Dir.chdir(dir_path)
|
24
25
|
PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
|
25
26
|
if (File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/) && File.extname(entry) == '.scala' && entry !~ /test/i
|
26
27
|
line_no_and_contents_arr = []
|
@@ -73,9 +74,9 @@ module PWN
|
|
73
74
|
target_file: entry,
|
74
75
|
entry_beautified: entry_beautified
|
75
76
|
)
|
76
|
-
else
|
77
|
-
author = 'N/A'
|
78
77
|
end
|
78
|
+
author ||= 'N/A'
|
79
|
+
|
79
80
|
hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
|
80
81
|
line_no: line_no,
|
81
82
|
contents: contents,
|
data/lib/pwn/sast/csrf.rb
CHANGED
@@ -22,6 +22,7 @@ module PWN
|
|
22
22
|
result_arr = []
|
23
23
|
logger_results = ''
|
24
24
|
|
25
|
+
Dir.chdir(dir_path)
|
25
26
|
PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
|
26
27
|
if File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/ && entry !~ /test/i
|
27
28
|
line_no_and_contents_arr = []
|
@@ -72,9 +73,9 @@ module PWN
|
|
72
73
|
target_file: entry,
|
73
74
|
entry_beautified: entry_beautified
|
74
75
|
)
|
75
|
-
else
|
76
|
-
author = 'N/A'
|
77
76
|
end
|
77
|
+
author ||= 'N/A'
|
78
|
+
|
78
79
|
hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
|
79
80
|
line_no: line_no,
|
80
81
|
contents: contents,
|
@@ -23,6 +23,7 @@ module PWN
|
|
23
23
|
result_arr = []
|
24
24
|
logger_results = ''
|
25
25
|
|
26
|
+
Dir.chdir(dir_path)
|
26
27
|
PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
|
27
28
|
if (File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/) && (File.extname(entry) == '.scala' || File.extname(entry) == '.java') && entry !~ /test/i
|
28
29
|
line_no_and_contents_arr = []
|
@@ -80,9 +81,9 @@ module PWN
|
|
80
81
|
target_file: entry,
|
81
82
|
entry_beautified: entry_beautified
|
82
83
|
)
|
83
|
-
else
|
84
|
-
author = 'N/A'
|
85
84
|
end
|
85
|
+
author ||= 'N/A'
|
86
|
+
|
86
87
|
hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
|
87
88
|
line_no: line_no,
|
88
89
|
contents: contents,
|
data/lib/pwn/sast/emoticon.rb
CHANGED
@@ -21,6 +21,7 @@ module PWN
|
|
21
21
|
result_arr = []
|
22
22
|
logger_results = ''
|
23
23
|
|
24
|
+
Dir.chdir(dir_path)
|
24
25
|
PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
|
25
26
|
if File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/ && entry !~ /test/i
|
26
27
|
line_no_and_contents_arr = []
|
@@ -78,9 +79,9 @@ module PWN
|
|
78
79
|
target_file: entry,
|
79
80
|
entry_beautified: entry_beautified
|
80
81
|
)
|
81
|
-
else
|
82
|
-
author = 'N/A'
|
83
82
|
end
|
83
|
+
author ||= 'N/A'
|
84
|
+
|
84
85
|
hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
|
85
86
|
line_no: line_no,
|
86
87
|
contents: contents,
|
data/lib/pwn/sast/eval.rb
CHANGED
@@ -22,6 +22,7 @@ module PWN
|
|
22
22
|
result_arr = []
|
23
23
|
logger_results = ''
|
24
24
|
|
25
|
+
Dir.chdir(dir_path)
|
25
26
|
PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
|
26
27
|
if File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/ && entry !~ /test/i
|
27
28
|
line_no_and_contents_arr = []
|
@@ -72,9 +73,9 @@ module PWN
|
|
72
73
|
target_file: entry,
|
73
74
|
entry_beautified: entry_beautified
|
74
75
|
)
|
75
|
-
else
|
76
|
-
author = 'N/A'
|
77
76
|
end
|
77
|
+
author ||= 'N/A'
|
78
|
+
|
78
79
|
hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
|
79
80
|
line_no: line_no,
|
80
81
|
contents: contents,
|
data/lib/pwn/sast/factory.rb
CHANGED
@@ -23,6 +23,7 @@ module PWN
|
|
23
23
|
result_arr = []
|
24
24
|
logger_results = ''
|
25
25
|
|
26
|
+
Dir.chdir(dir_path)
|
26
27
|
PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
|
27
28
|
if (File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/) && (File.extname(entry) == '.scala' || File.extname(entry) == '.java') && entry !~ /test/i
|
28
29
|
line_no_and_contents_arr = []
|
@@ -75,9 +76,9 @@ module PWN
|
|
75
76
|
target_file: entry,
|
76
77
|
entry_beautified: entry_beautified
|
77
78
|
)
|
78
|
-
else
|
79
|
-
author = 'N/A'
|
80
79
|
end
|
80
|
+
author ||= 'N/A'
|
81
|
+
|
81
82
|
hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
|
82
83
|
line_no: line_no,
|
83
84
|
contents: contents,
|
@@ -21,6 +21,7 @@ module PWN
|
|
21
21
|
result_arr = []
|
22
22
|
logger_results = ''
|
23
23
|
|
24
|
+
Dir.chdir(dir_path)
|
24
25
|
PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
|
25
26
|
if File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/ && entry !~ /test/i
|
26
27
|
line_no_and_contents_arr = []
|
@@ -80,9 +81,9 @@ module PWN
|
|
80
81
|
target_file: entry,
|
81
82
|
entry_beautified: entry_beautified
|
82
83
|
)
|
83
|
-
else
|
84
|
-
author = 'N/A'
|
85
84
|
end
|
85
|
+
author ||= 'N/A'
|
86
|
+
|
86
87
|
hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
|
87
88
|
line_no: line_no,
|
88
89
|
contents: contents,
|
data/lib/pwn/sast/inner_html.rb
CHANGED
@@ -22,6 +22,7 @@ module PWN
|
|
22
22
|
result_arr = []
|
23
23
|
logger_results = ''
|
24
24
|
|
25
|
+
Dir.chdir(dir_path)
|
25
26
|
PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
|
26
27
|
if File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/ && entry !~ /test/i
|
27
28
|
line_no_and_contents_arr = []
|
@@ -72,9 +73,9 @@ module PWN
|
|
72
73
|
target_file: entry,
|
73
74
|
entry_beautified: entry_beautified
|
74
75
|
)
|
75
|
-
else
|
76
|
-
author = 'N/A'
|
77
76
|
end
|
77
|
+
author ||= 'N/A'
|
78
|
+
|
78
79
|
hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
|
79
80
|
line_no: line_no,
|
80
81
|
contents: contents,
|
data/lib/pwn/sast/keystore.rb
CHANGED
@@ -21,6 +21,7 @@ module PWN
|
|
21
21
|
result_arr = []
|
22
22
|
logger_results = ''
|
23
23
|
|
24
|
+
Dir.chdir(dir_path)
|
24
25
|
PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
|
25
26
|
if File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/ && entry !~ /test/i
|
26
27
|
line_no_and_contents_arr = []
|
@@ -71,9 +72,9 @@ module PWN
|
|
71
72
|
target_file: entry,
|
72
73
|
entry_beautified: entry_beautified
|
73
74
|
)
|
74
|
-
else
|
75
|
-
author = 'N/A'
|
76
75
|
end
|
76
|
+
author ||= 'N/A'
|
77
|
+
|
77
78
|
hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
|
78
79
|
line_no: line_no,
|
79
80
|
contents: contents,
|
@@ -22,6 +22,7 @@ module PWN
|
|
22
22
|
result_arr = []
|
23
23
|
logger_results = ''
|
24
24
|
|
25
|
+
Dir.chdir(dir_path)
|
25
26
|
PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
|
26
27
|
if File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/ && entry !~ /test/i
|
27
28
|
line_no_and_contents_arr = []
|
@@ -73,9 +74,9 @@ module PWN
|
|
73
74
|
target_file: entry,
|
74
75
|
entry_beautified: entry_beautified
|
75
76
|
)
|
76
|
-
else
|
77
|
-
author = 'N/A'
|
78
77
|
end
|
78
|
+
author ||= 'N/A'
|
79
|
+
|
79
80
|
hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
|
80
81
|
line_no: line_no,
|
81
82
|
contents: contents,
|
@@ -22,6 +22,7 @@ module PWN
|
|
22
22
|
result_arr = []
|
23
23
|
logger_results = ''
|
24
24
|
|
25
|
+
Dir.chdir(dir_path)
|
25
26
|
PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
|
26
27
|
if File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/ && entry !~ /test/i
|
27
28
|
line_no_and_contents_arr = []
|
@@ -72,9 +73,9 @@ module PWN
|
|
72
73
|
target_file: entry,
|
73
74
|
entry_beautified: entry_beautified
|
74
75
|
)
|
75
|
-
else
|
76
|
-
author = 'N/A'
|
77
76
|
end
|
77
|
+
author ||= 'N/A'
|
78
|
+
|
78
79
|
hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
|
79
80
|
line_no: line_no,
|
80
81
|
contents: contents,
|
data/lib/pwn/sast/log4j.rb
CHANGED
@@ -21,6 +21,7 @@ module PWN
|
|
21
21
|
result_arr = []
|
22
22
|
logger_results = ''
|
23
23
|
|
24
|
+
Dir.chdir(dir_path)
|
24
25
|
PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
|
25
26
|
if (File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/) && File.extname(entry) == '.java' && entry !~ /test/i
|
26
27
|
line_no_and_contents_arr = []
|
@@ -71,9 +72,9 @@ module PWN
|
|
71
72
|
target_file: entry,
|
72
73
|
entry_beautified: entry_beautified
|
73
74
|
)
|
74
|
-
else
|
75
|
-
author = 'N/A'
|
76
75
|
end
|
76
|
+
author ||= 'N/A'
|
77
|
+
|
77
78
|
hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
|
78
79
|
line_no: line_no,
|
79
80
|
contents: contents,
|
data/lib/pwn/sast/logger.rb
CHANGED
@@ -22,6 +22,7 @@ module PWN
|
|
22
22
|
result_arr = []
|
23
23
|
logger_results = ''
|
24
24
|
|
25
|
+
Dir.chdir(dir_path)
|
25
26
|
PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
|
26
27
|
if (File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/) && (File.extname(entry) == '.scala' || File.extname(entry) == '.java') && entry !~ /test/i
|
27
28
|
line_no_and_contents_arr = []
|
@@ -86,9 +87,9 @@ module PWN
|
|
86
87
|
target_file: entry,
|
87
88
|
entry_beautified: entry_beautified
|
88
89
|
)
|
89
|
-
else
|
90
|
-
author = 'N/A'
|
91
90
|
end
|
91
|
+
author ||= 'N/A'
|
92
|
+
|
92
93
|
hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
|
93
94
|
line_no: line_no,
|
94
95
|
contents: contents,
|
data/lib/pwn/sast/md5.rb
CHANGED
@@ -21,6 +21,7 @@ module PWN
|
|
21
21
|
result_arr = []
|
22
22
|
logger_results = ''
|
23
23
|
|
24
|
+
Dir.chdir(dir_path)
|
24
25
|
PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
|
25
26
|
if File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/ && entry !~ /test/i
|
26
27
|
line_no_and_contents_arr = []
|
@@ -71,9 +72,9 @@ module PWN
|
|
71
72
|
target_file: entry,
|
72
73
|
entry_beautified: entry_beautified
|
73
74
|
)
|
74
|
-
else
|
75
|
-
author = 'N/A'
|
76
75
|
end
|
76
|
+
author ||= 'N/A'
|
77
|
+
|
77
78
|
hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
|
78
79
|
line_no: line_no,
|
79
80
|
contents: contents,
|
data/lib/pwn/sast/outer_html.rb
CHANGED
@@ -22,6 +22,7 @@ module PWN
|
|
22
22
|
result_arr = []
|
23
23
|
logger_results = ''
|
24
24
|
|
25
|
+
Dir.chdir(dir_path)
|
25
26
|
PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
|
26
27
|
if File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/ && entry !~ /test/i
|
27
28
|
line_no_and_contents_arr = []
|
@@ -72,9 +73,9 @@ module PWN
|
|
72
73
|
target_file: entry,
|
73
74
|
entry_beautified: entry_beautified
|
74
75
|
)
|
75
|
-
else
|
76
|
-
author = 'N/A'
|
77
76
|
end
|
77
|
+
author ||= 'N/A'
|
78
|
+
|
78
79
|
hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
|
79
80
|
line_no: line_no,
|
80
81
|
contents: contents,
|
@@ -20,6 +20,7 @@ module PWN
|
|
20
20
|
result_arr = []
|
21
21
|
logger_results = ''
|
22
22
|
|
23
|
+
Dir.chdir(dir_path)
|
23
24
|
PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
|
24
25
|
if File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/ && entry !~ /test/i
|
25
26
|
line_no_and_contents_arr = []
|
@@ -71,9 +72,9 @@ module PWN
|
|
71
72
|
target_file: entry,
|
72
73
|
entry_beautified: entry_beautified
|
73
74
|
)
|
74
|
-
else
|
75
|
-
author = 'N/A'
|
76
75
|
end
|
76
|
+
author ||= 'N/A'
|
77
|
+
|
77
78
|
hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
|
78
79
|
line_no: line_no,
|
79
80
|
contents: contents,
|
data/lib/pwn/sast/password.rb
CHANGED
@@ -21,6 +21,7 @@ module PWN
|
|
21
21
|
result_arr = []
|
22
22
|
logger_results = ''
|
23
23
|
|
24
|
+
Dir.chdir(dir_path)
|
24
25
|
PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
|
25
26
|
if File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/ && entry !~ /test/i
|
26
27
|
line_no_and_contents_arr = []
|
@@ -75,9 +76,9 @@ module PWN
|
|
75
76
|
target_file: entry,
|
76
77
|
entry_beautified: entry_beautified
|
77
78
|
)
|
78
|
-
else
|
79
|
-
author = 'N/A'
|
80
79
|
end
|
80
|
+
author ||= 'N/A'
|
81
|
+
|
81
82
|
hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
|
82
83
|
line_no: line_no,
|
83
84
|
contents: contents,
|
@@ -21,6 +21,7 @@ module PWN
|
|
21
21
|
result_arr = []
|
22
22
|
logger_results = ''
|
23
23
|
|
24
|
+
Dir.chdir(dir_path)
|
24
25
|
PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
|
25
26
|
if (File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/) && File.extname(entry).include?('.php') && entry !~ /test/i
|
26
27
|
line_no_and_contents_arr = []
|
@@ -77,9 +78,9 @@ module PWN
|
|
77
78
|
target_file: entry,
|
78
79
|
entry_beautified: entry_beautified
|
79
80
|
)
|
80
|
-
else
|
81
|
-
author = 'N/A'
|
82
81
|
end
|
82
|
+
author ||= 'N/A'
|
83
|
+
|
83
84
|
hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
|
84
85
|
line_no: line_no,
|
85
86
|
contents: contents,
|
@@ -21,6 +21,7 @@ module PWN
|
|
21
21
|
result_arr = []
|
22
22
|
logger_results = ''
|
23
23
|
|
24
|
+
Dir.chdir(dir_path)
|
24
25
|
PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
|
25
26
|
if (File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/) && File.extname(entry).include?('.php') && entry !~ /test/i
|
26
27
|
line_no_and_contents_arr = []
|
@@ -75,9 +76,9 @@ module PWN
|
|
75
76
|
target_file: entry,
|
76
77
|
entry_beautified: entry_beautified
|
77
78
|
)
|
78
|
-
else
|
79
|
-
author = 'N/A'
|
80
79
|
end
|
80
|
+
author ||= 'N/A'
|
81
|
+
|
81
82
|
hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
|
82
83
|
line_no: line_no,
|
83
84
|
contents: contents,
|
data/lib/pwn/sast/pom_version.rb
CHANGED
@@ -22,6 +22,7 @@ module PWN
|
|
22
22
|
result_arr = []
|
23
23
|
logger_results = ''
|
24
24
|
|
25
|
+
Dir.chdir(dir_path)
|
25
26
|
PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
|
26
27
|
if File.file?(entry) && File.basename(entry) == 'pom.xml' && entry !~ /test/i
|
27
28
|
line_no_and_contents_arr = []
|
@@ -74,9 +75,9 @@ module PWN
|
|
74
75
|
target_file: entry,
|
75
76
|
entry_beautified: entry_beautified
|
76
77
|
)
|
77
|
-
else
|
78
|
-
author = 'N/A'
|
79
78
|
end
|
79
|
+
author ||= 'N/A'
|
80
|
+
|
80
81
|
hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
|
81
82
|
line_no: line_no,
|
82
83
|
contents: contents,
|
data/lib/pwn/sast/port.rb
CHANGED
@@ -23,6 +23,7 @@ module PWN
|
|
23
23
|
result_arr = []
|
24
24
|
logger_results = ''
|
25
25
|
|
26
|
+
Dir.chdir(dir_path)
|
26
27
|
PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
|
27
28
|
if File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/ && entry !~ /test/i
|
28
29
|
line_no_and_contents_arr = []
|
@@ -78,9 +79,9 @@ module PWN
|
|
78
79
|
target_file: entry,
|
79
80
|
entry_beautified: entry_beautified
|
80
81
|
)
|
81
|
-
else
|
82
|
-
author = 'N/A'
|
83
82
|
end
|
83
|
+
author ||= 'N/A'
|
84
|
+
|
84
85
|
hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
|
85
86
|
line_no: line_no,
|
86
87
|
contents: contents,
|
@@ -22,6 +22,7 @@ module PWN
|
|
22
22
|
result_arr = []
|
23
23
|
logger_results = ''
|
24
24
|
|
25
|
+
Dir.chdir(dir_path)
|
25
26
|
PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
|
26
27
|
if File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/ && entry !~ /test/i
|
27
28
|
line_no_and_contents_arr = []
|
@@ -72,9 +73,9 @@ module PWN
|
|
72
73
|
target_file: entry,
|
73
74
|
entry_beautified: entry_beautified
|
74
75
|
)
|
75
|
-
else
|
76
|
-
author = 'N/A'
|
77
76
|
end
|
77
|
+
author ||= 'N/A'
|
78
|
+
|
78
79
|
hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
|
79
80
|
line_no: line_no,
|
80
81
|
contents: contents,
|
data/lib/pwn/sast/private_key.rb
CHANGED
@@ -21,6 +21,7 @@ module PWN
|
|
21
21
|
result_arr = []
|
22
22
|
logger_results = ''
|
23
23
|
|
24
|
+
Dir.chdir(dir_path)
|
24
25
|
PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
|
25
26
|
if File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/ && entry !~ /test/i
|
26
27
|
line_no_and_contents_arr = []
|
@@ -71,9 +72,9 @@ module PWN
|
|
71
72
|
target_file: entry,
|
72
73
|
entry_beautified: entry_beautified
|
73
74
|
)
|
74
|
-
else
|
75
|
-
author = 'N/A'
|
76
75
|
end
|
76
|
+
author ||= 'N/A'
|
77
|
+
|
77
78
|
hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
|
78
79
|
line_no: line_no,
|
79
80
|
contents: contents,
|
data/lib/pwn/sast/redirect.rb
CHANGED
@@ -21,6 +21,7 @@ module PWN
|
|
21
21
|
result_arr = []
|
22
22
|
logger_results = ''
|
23
23
|
|
24
|
+
Dir.chdir(dir_path)
|
24
25
|
PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
|
25
26
|
if File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/ && entry !~ /test/i
|
26
27
|
line_no_and_contents_arr = []
|
@@ -73,9 +74,9 @@ module PWN
|
|
73
74
|
target_file: entry,
|
74
75
|
entry_beautified: entry_beautified
|
75
76
|
)
|
76
|
-
else
|
77
|
-
author = 'N/A'
|
78
77
|
end
|
78
|
+
author ||= 'N/A'
|
79
|
+
|
79
80
|
hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
|
80
81
|
line_no: line_no,
|
81
82
|
contents: contents,
|
data/lib/pwn/sast/redos.rb
CHANGED
@@ -22,6 +22,7 @@ module PWN
|
|
22
22
|
result_arr = []
|
23
23
|
logger_results = ''
|
24
24
|
|
25
|
+
Dir.chdir(dir_path)
|
25
26
|
PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
|
26
27
|
if File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/ && entry !~ /test/i
|
27
28
|
line_no_and_contents_arr = []
|
@@ -78,9 +79,9 @@ module PWN
|
|
78
79
|
target_file: entry,
|
79
80
|
entry_beautified: entry_beautified
|
80
81
|
)
|
81
|
-
else
|
82
|
-
author = 'N/A'
|
83
82
|
end
|
83
|
+
author ||= 'N/A'
|
84
|
+
|
84
85
|
hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
|
85
86
|
line_no: line_no,
|
86
87
|
contents: contents,
|
data/lib/pwn/sast/shell.rb
CHANGED
@@ -21,6 +21,7 @@ module PWN
|
|
21
21
|
result_arr = []
|
22
22
|
logger_results = ''
|
23
23
|
|
24
|
+
Dir.chdir(dir_path)
|
24
25
|
PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
|
25
26
|
if File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/ && entry !~ /test/i
|
26
27
|
line_no_and_contents_arr = []
|
@@ -79,9 +80,9 @@ module PWN
|
|
79
80
|
target_file: entry,
|
80
81
|
entry_beautified: entry_beautified
|
81
82
|
)
|
82
|
-
else
|
83
|
-
author = 'N/A'
|
84
83
|
end
|
84
|
+
author ||= 'N/A'
|
85
|
+
|
85
86
|
hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
|
86
87
|
line_no: line_no,
|
87
88
|
contents: contents,
|
data/lib/pwn/sast/signature.rb
CHANGED
@@ -21,6 +21,7 @@ module PWN
|
|
21
21
|
result_arr = []
|
22
22
|
logger_results = ''
|
23
23
|
|
24
|
+
Dir.chdir(dir_path)
|
24
25
|
PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
|
25
26
|
if File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/ && entry !~ /test/i
|
26
27
|
line_no_and_contents_arr = []
|
@@ -71,9 +72,9 @@ module PWN
|
|
71
72
|
target_file: entry,
|
72
73
|
entry_beautified: entry_beautified
|
73
74
|
)
|
74
|
-
else
|
75
|
-
author = 'N/A'
|
76
75
|
end
|
76
|
+
author ||= 'N/A'
|
77
|
+
|
77
78
|
hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
|
78
79
|
line_no: line_no,
|
79
80
|
contents: contents,
|
data/lib/pwn/sast/sql.rb
CHANGED
@@ -22,6 +22,7 @@ module PWN
|
|
22
22
|
result_arr = []
|
23
23
|
logger_results = ''
|
24
24
|
|
25
|
+
Dir.chdir(dir_path)
|
25
26
|
PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
|
26
27
|
if File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/ && entry !~ /test/i
|
27
28
|
line_no_and_contents_arr = []
|
@@ -75,9 +76,9 @@ module PWN
|
|
75
76
|
target_file: entry,
|
76
77
|
entry_beautified: entry_beautified
|
77
78
|
)
|
78
|
-
else
|
79
|
-
author = 'N/A'
|
80
79
|
end
|
80
|
+
author ||= 'N/A'
|
81
|
+
|
81
82
|
hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
|
82
83
|
line_no: line_no,
|
83
84
|
contents: contents,
|
data/lib/pwn/sast/ssl.rb
CHANGED
@@ -21,6 +21,7 @@ module PWN
|
|
21
21
|
result_arr = []
|
22
22
|
logger_results = ''
|
23
23
|
|
24
|
+
Dir.chdir(dir_path)
|
24
25
|
PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
|
25
26
|
if File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/ && entry !~ /test/i
|
26
27
|
line_no_and_contents_arr = []
|
@@ -75,9 +76,9 @@ module PWN
|
|
75
76
|
target_file: entry,
|
76
77
|
entry_beautified: entry_beautified
|
77
78
|
)
|
78
|
-
else
|
79
|
-
author = 'N/A'
|
80
79
|
end
|
80
|
+
author ||= 'N/A'
|
81
|
+
|
81
82
|
hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
|
82
83
|
line_no: line_no,
|
83
84
|
contents: contents,
|
data/lib/pwn/sast/sudo.rb
CHANGED
@@ -21,6 +21,7 @@ module PWN
|
|
21
21
|
result_arr = []
|
22
22
|
logger_results = ''
|
23
23
|
|
24
|
+
Dir.chdir(dir_path)
|
24
25
|
PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
|
25
26
|
if File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/ && entry !~ /test/i
|
26
27
|
line_no_and_contents_arr = []
|
@@ -71,9 +72,9 @@ module PWN
|
|
71
72
|
target_file: entry,
|
72
73
|
entry_beautified: entry_beautified
|
73
74
|
)
|
74
|
-
else
|
75
|
-
author = 'N/A'
|
76
75
|
end
|
76
|
+
author ||= 'N/A'
|
77
|
+
|
77
78
|
hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
|
78
79
|
line_no: line_no,
|
79
80
|
contents: contents,
|
data/lib/pwn/sast/task_tag.rb
CHANGED
@@ -22,6 +22,7 @@ module PWN
|
|
22
22
|
result_arr = []
|
23
23
|
logger_results = ''
|
24
24
|
|
25
|
+
Dir.chdir(dir_path)
|
25
26
|
PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
|
26
27
|
if File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/ && entry !~ /test/i
|
27
28
|
line_no_and_contents_arr = []
|
@@ -85,9 +86,9 @@ module PWN
|
|
85
86
|
target_file: entry,
|
86
87
|
entry_beautified: entry_beautified
|
87
88
|
)
|
88
|
-
else
|
89
|
-
author = 'N/A'
|
90
89
|
end
|
90
|
+
author ||= 'N/A'
|
91
|
+
|
91
92
|
hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
|
92
93
|
line_no: line_no,
|
93
94
|
contents: contents,
|
@@ -21,6 +21,7 @@ module PWN
|
|
21
21
|
result_arr = []
|
22
22
|
logger_results = ''
|
23
23
|
|
24
|
+
Dir.chdir(dir_path)
|
24
25
|
PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
|
25
26
|
if (File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/) && (File.extname(entry) == '.scala' || File.extname(entry) == '.java') && entry !~ /test/i
|
26
27
|
line_no_and_contents_arr = []
|
@@ -72,9 +73,9 @@ module PWN
|
|
72
73
|
target_file: entry,
|
73
74
|
entry_beautified: entry_beautified
|
74
75
|
)
|
75
|
-
else
|
76
|
-
author = 'N/A'
|
77
76
|
end
|
77
|
+
author ||= 'N/A'
|
78
|
+
|
78
79
|
hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
|
79
80
|
line_no: line_no,
|
80
81
|
contents: contents,
|
data/lib/pwn/sast/token.rb
CHANGED
@@ -21,6 +21,7 @@ module PWN
|
|
21
21
|
result_arr = []
|
22
22
|
logger_results = ''
|
23
23
|
|
24
|
+
Dir.chdir(dir_path)
|
24
25
|
PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
|
25
26
|
if File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/ && entry !~ /test/i
|
26
27
|
line_no_and_contents_arr = []
|
@@ -73,9 +74,9 @@ module PWN
|
|
73
74
|
target_file: entry,
|
74
75
|
entry_beautified: entry_beautified
|
75
76
|
)
|
76
|
-
else
|
77
|
-
author = 'N/A'
|
78
77
|
end
|
78
|
+
author ||= 'N/A'
|
79
|
+
|
79
80
|
hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
|
80
81
|
line_no: line_no,
|
81
82
|
contents: contents,
|
@@ -21,6 +21,7 @@ module PWN
|
|
21
21
|
result_arr = []
|
22
22
|
logger_results = ''
|
23
23
|
|
24
|
+
Dir.chdir(dir_path)
|
24
25
|
PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
|
25
26
|
if (File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/) && File.extname(entry).include?('.ts') && entry !~ /test/i
|
26
27
|
line_no_and_contents_arr = []
|
@@ -75,9 +76,9 @@ module PWN
|
|
75
76
|
target_file: entry,
|
76
77
|
entry_beautified: entry_beautified
|
77
78
|
)
|
78
|
-
else
|
79
|
-
author = 'N/A'
|
80
79
|
end
|
80
|
+
author ||= 'N/A'
|
81
|
+
|
81
82
|
hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
|
82
83
|
line_no: line_no,
|
83
84
|
contents: contents,
|
data/lib/pwn/sast/version.rb
CHANGED
@@ -21,6 +21,7 @@ module PWN
|
|
21
21
|
result_arr = []
|
22
22
|
logger_results = ''
|
23
23
|
|
24
|
+
Dir.chdir(dir_path)
|
24
25
|
PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
|
25
26
|
if File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/ && entry !~ /test/i
|
26
27
|
line_no_and_contents_arr = []
|
@@ -72,9 +73,9 @@ module PWN
|
|
72
73
|
target_file: entry,
|
73
74
|
entry_beautified: entry_beautified
|
74
75
|
)
|
75
|
-
else
|
76
|
-
author = 'N/A'
|
77
76
|
end
|
77
|
+
author ||= 'N/A'
|
78
|
+
|
78
79
|
hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
|
79
80
|
line_no: line_no,
|
80
81
|
contents: contents,
|
@@ -21,6 +21,7 @@ module PWN
|
|
21
21
|
result_arr = []
|
22
22
|
logger_results = ''
|
23
23
|
|
24
|
+
Dir.chdir(dir_path)
|
24
25
|
PWN::Plugins::FileFu.recurse_in_dir(dir_path: dir_path) do |entry|
|
25
26
|
if File.file?(entry) && File.basename(entry) !~ /^pwn.+(html|json|db)$/ && File.basename(entry) !~ /\.JS-BEAUTIFIED$/ && entry !~ /test/i
|
26
27
|
line_no_and_contents_arr = []
|
@@ -71,9 +72,9 @@ module PWN
|
|
71
72
|
target_file: entry,
|
72
73
|
entry_beautified: entry_beautified
|
73
74
|
)
|
74
|
-
else
|
75
|
-
author = 'N/A'
|
76
75
|
end
|
76
|
+
author ||= 'N/A'
|
77
|
+
|
77
78
|
hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
|
78
79
|
line_no: line_no,
|
79
80
|
contents: contents,
|
data/lib/pwn/version.rb
CHANGED