pwn 0.4.833 → 0.4.834
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/lib/pwn/plugins/shodan.rb +25 -8
- 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: 3b73180eeb781bc4beafb24d1d0edb2aa282fa84ea3212e8f262cee936783f58
|
4
|
+
data.tar.gz: eee0dc190a49b6fcb9ee31c57e4f72fe520f88b9f5ff2ca382ce03e80164ab40
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a05cda9748c9dc51c332f481e676d6d47016369f88bb1321abd23fa0b60576efd0a70311e2b370acb345b39ee731558ef2889f0c193be7e68fb3f0ae99984d0
|
7
|
+
data.tar.gz: 74a0cb8a1b736d94029e78de10ecb8c80525890245946c2c09b38f85880d0ca2cfd201cc4170c005c224cb8757dd5ea49f5c8c5d67f36b5d2a8a5e143d1ad55b
|
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.834]: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.834]:001 >>> PWN.help
|
56
56
|
```
|
57
57
|
|
58
58
|
|
data/lib/pwn/plugins/shodan.rb
CHANGED
@@ -13,19 +13,36 @@ module PWN
|
|
13
13
|
@@logger = PWN::Plugins::PWNLogger.create
|
14
14
|
|
15
15
|
# Supported Method Parameters::
|
16
|
-
#
|
16
|
+
# valid_uri?(
|
17
17
|
# search_results_hash: 'required - iteration of search results'
|
18
18
|
# )
|
19
19
|
|
20
|
-
private_class_method def self.
|
20
|
+
private_class_method def self.valid_uri?(opts = {})
|
21
|
+
uri = URI.parse(opts[:uri].to_s)
|
22
|
+
%w[http https].include?(uri.scheme) && URI.parse(uri).host
|
23
|
+
rescue URI::BadURIError,
|
24
|
+
URI::InvalidURIError,
|
25
|
+
URI::InvalidComponentError
|
26
|
+
|
27
|
+
false
|
28
|
+
rescue StandardError => e
|
29
|
+
raise e
|
30
|
+
end
|
31
|
+
|
32
|
+
# Supported Method Parameters::
|
33
|
+
# extract_uris(
|
34
|
+
# search_results_hash: 'required - iteration of search results'
|
35
|
+
# )
|
36
|
+
|
37
|
+
private_class_method def self.extract_uris(opts = {})
|
21
38
|
search_results_hash = opts[:search_results_hash]
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
uri_arr.push(uri) if %w[http https].include?(URI.parse(uri).scheme)
|
39
|
+
search_results_hash.each_with_object([]) do |value, uris|
|
40
|
+
valid_uris_from_value = *URI.extract(value.to_s).select do |uri|
|
41
|
+
valid_uri?(uri: uri)
|
26
42
|
end
|
43
|
+
|
44
|
+
uris.push(valid_uris_from_value)
|
27
45
|
end
|
28
|
-
uri_arr
|
29
46
|
rescue URI::BadURIError,
|
30
47
|
URI::InvalidURIError,
|
31
48
|
URI::InvalidComponentError
|
@@ -505,7 +522,7 @@ module PWN
|
|
505
522
|
search_results = opts[:search_results]
|
506
523
|
|
507
524
|
search_results.map do |search_results_hash|
|
508
|
-
|
525
|
+
extract_uris(
|
509
526
|
search_results_hash: search_results_hash
|
510
527
|
)
|
511
528
|
end.flatten
|
data/lib/pwn/version.rb
CHANGED