pwn 0.4.833 → 0.4.835
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: cc0f446ac633d03547678d911eb6f5d7682f17203e5590b1f2c84ccbf4ae54f1
|
4
|
+
data.tar.gz: 1e6934f82c049d923b4fefdae9f2f786f1d1ae2e33cdf28dade89e60564cdad2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c316a236286d97239029c1118ae4c62a5e5672eb066d1f0ccb90a2e2f482edd9582e8db760fe2e9aabf982a8fd546ad3ac8fbfbca128231fedaef98e92885295
|
7
|
+
data.tar.gz: 5660df80377f88567544110300745405af1f36d90a7b579ebf51a56a4baab5397f6cd61ac2baa84fee22572898a5a5214185b585aeb111d236a6a8e89645fd2a
|
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.835]: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.835]: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)
|
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