pwn 0.5.379 → 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.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -3
  3. data/bin/pwn_sast +4 -2
  4. data/lib/pwn/sast/amqp_connect_as_guest.rb +3 -2
  5. data/lib/pwn/sast/apache_file_system_util_api.rb +3 -2
  6. data/lib/pwn/sast/aws.rb +3 -2
  7. data/lib/pwn/sast/banned_function_calls_c.rb +3 -2
  8. data/lib/pwn/sast/base64.rb +3 -2
  9. data/lib/pwn/sast/beef_hook.rb +3 -2
  10. data/lib/pwn/sast/cmd_execution_java.rb +3 -2
  11. data/lib/pwn/sast/cmd_execution_python.rb +3 -2
  12. data/lib/pwn/sast/cmd_execution_ruby.rb +3 -2
  13. data/lib/pwn/sast/cmd_execution_scala.rb +3 -2
  14. data/lib/pwn/sast/csrf.rb +3 -2
  15. data/lib/pwn/sast/deserial_java.rb +3 -2
  16. data/lib/pwn/sast/emoticon.rb +3 -2
  17. data/lib/pwn/sast/eval.rb +3 -2
  18. data/lib/pwn/sast/factory.rb +3 -2
  19. data/lib/pwn/sast/http_authorization_header.rb +3 -2
  20. data/lib/pwn/sast/inner_html.rb +3 -2
  21. data/lib/pwn/sast/keystore.rb +3 -2
  22. data/lib/pwn/sast/local_storage.rb +3 -2
  23. data/lib/pwn/sast/location_hash.rb +3 -2
  24. data/lib/pwn/sast/log4j.rb +3 -2
  25. data/lib/pwn/sast/logger.rb +3 -2
  26. data/lib/pwn/sast/md5.rb +3 -2
  27. data/lib/pwn/sast/outer_html.rb +3 -2
  28. data/lib/pwn/sast/padding_oracle.rb +3 -2
  29. data/lib/pwn/sast/password.rb +3 -2
  30. data/lib/pwn/sast/php_input_mechanisms.rb +3 -2
  31. data/lib/pwn/sast/php_type_juggling.rb +3 -2
  32. data/lib/pwn/sast/pom_version.rb +3 -2
  33. data/lib/pwn/sast/port.rb +3 -2
  34. data/lib/pwn/sast/post_message.rb +3 -2
  35. data/lib/pwn/sast/private_key.rb +3 -2
  36. data/lib/pwn/sast/redirect.rb +3 -2
  37. data/lib/pwn/sast/redos.rb +3 -2
  38. data/lib/pwn/sast/shell.rb +3 -2
  39. data/lib/pwn/sast/signature.rb +3 -2
  40. data/lib/pwn/sast/sql.rb +3 -2
  41. data/lib/pwn/sast/ssl.rb +3 -2
  42. data/lib/pwn/sast/sudo.rb +3 -2
  43. data/lib/pwn/sast/task_tag.rb +3 -2
  44. data/lib/pwn/sast/throw_errors.rb +3 -2
  45. data/lib/pwn/sast/token.rb +3 -2
  46. data/lib/pwn/sast/type_script_type_juggling.rb +3 -2
  47. data/lib/pwn/sast/version.rb +3 -2
  48. data/lib/pwn/sast/window_location_hash.rb +3 -2
  49. data/lib/pwn/version.rb +1 -1
  50. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '08c57893a7c8ff17823511aa3c0322a12a4f4ce089120f6067bf6e6b58e5d27e'
4
- data.tar.gz: 3b8e0556e4de92f923a16e7a6e79bdbf017523ba952c4f617bc0bfa36e2e83e5
3
+ metadata.gz: e641017027805238c4dfd469d24628b35bc914c7540f2f551ce99020de50c640
4
+ data.tar.gz: 5b893cb50ab8627355fb65b53b25e7cfd0bdf028b7b2d71dcefde67ed5c812dc
5
5
  SHA512:
6
- metadata.gz: 4b627e3542f5b38403e1a7ed028f0e82c2c060751acdecfe7fdfe9ed0ea5cd5196558a9da64b84bece55584d51ade3337bd5234576b5aa982c753f7a2988bfb8
7
- data.tar.gz: 9a1966d1dd62ae3f06876895f3fa2b328cacc21441b7df0621d212406d7c78a8b7f2d44b8cdcef38cb16d3a03bc79ab45bca288b7c9fa80c010982110fa892b3
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.379]:001 >>> PWN.help
40
+ pwn[v0.5.381]: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.4.4@pwn
52
52
  $ gem uninstall --all --executables pwn
53
53
  $ gem install --verbose pwn
54
54
  $ pwn
55
- pwn[v0.5.379]:001 >>> PWN.help
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.379]:001 >>> PWN.help
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:
data/bin/pwn_sast CHANGED
@@ -79,6 +79,8 @@ begin
79
79
  end_of_color = "\e[0m"
80
80
 
81
81
  dir_path = opts[:dir_path] ||= '.'
82
+ previous_dir = Dir.pwd
83
+ Dir.chdir(dir_path) unless dir_path == '.'
82
84
 
83
85
  uri_source_root = opts[:uri_source_root].to_s.scrub
84
86
 
@@ -211,8 +213,6 @@ begin
211
213
 
212
214
  # Start Simple HTTP Server (If Requested)
213
215
  if start_reporting_server
214
- Dir.chdir(dir_path)
215
-
216
216
  listen_ip = '127.0.0.1'
217
217
  listen_ip = '0.0.0.0' if pwn_provider == 'docker'
218
218
  listen_port = PWN::Plugins::Sock.get_random_unused_port.to_s
@@ -228,4 +228,6 @@ begin
228
228
  end
229
229
  rescue SystemExit, Interrupt
230
230
  puts "\nGoodbye."
231
+ ensure
232
+ Dir.chdir(previous_dir) unless dir_path == '.'
231
233
  end
@@ -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,
@@ -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,
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 = []
@@ -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$/) && (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 = []
@@ -200,9 +201,9 @@ module PWN
200
201
  target_file: entry,
201
202
  entry_beautified: entry_beautified
202
203
  )
203
- else
204
- author = 'N/A'
205
204
  end
205
+ author ||= 'N/A'
206
+
206
207
  hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
207
208
  line_no: line_no,
208
209
  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 = []
@@ -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,
@@ -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,
@@ -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,
@@ -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,
@@ -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,
@@ -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,
@@ -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,
@@ -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,
@@ -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,
@@ -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,
@@ -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,
@@ -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$/ && 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,
@@ -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,
@@ -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,
@@ -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,
@@ -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,
@@ -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,
@@ -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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PWN
4
- VERSION = '0.5.379'
4
+ VERSION = '0.5.381'
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.5.379
4
+ version: 0.5.381
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.