pwn 0.4.830 → 0.4.831

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1f8fe3b903e8f8cdcb3bd315ba1c9f8a2a3864e1186c8606f22092278e40f03d
4
- data.tar.gz: cdb2e98c75a3e13daa0dcbf48fcd1c45653f7837015163581af9fd081e3dbf23
3
+ metadata.gz: 006b32a48b59e5990975a5f161e91c63749c3f63fc1a825c8ce67cf647a9c3e5
4
+ data.tar.gz: d27b7a2ddcd2102ebb6273bc284352cb67b9327dead053c9cb82584a693b73a4
5
5
  SHA512:
6
- metadata.gz: 159987de9835f9cb5e49d000cbcaab1bb377d4cf49f527ff3a0b5632081011496d206c076f7fc5ce0ca4227a0d121aafd5d37cfdec61f7611475ba7187ff937d
7
- data.tar.gz: a97eafa3d0aea791e3f30b361c53c5a4edb5b1bd2593680a8298b43e3d0af666b6a4eb77d38432f9cc3ede31a452497a3bee6cb8370992dfe1d51434e5fa29d1
6
+ metadata.gz: 1643fe23f6480e7eca3b87b780586676c15a0ea5202d82bc58ec314b8ed7e971d67ad0e9d4c18e972173a29fe2ebc23688bae4eecae93cf21d9bbb53014cab6b
7
+ data.tar.gz: 173647df72e9ccbe41b7bab18da2596caa3ec6e3b49daec6b1db4989fb95262d7ebc7ef78759676491288cbb80e98e652d08b18addb0dec4fc648a69200ea6b1
data/Gemfile CHANGED
@@ -19,7 +19,7 @@ gem 'aws-sdk', '3.1.0'
19
19
  gem 'barby', '0.6.8'
20
20
  gem 'brakeman', '6.0.1'
21
21
  gem 'bson', '4.15.0'
22
- gem 'bundler', '>=2.4.18'
22
+ gem 'bundler', '>=2.4.19'
23
23
  gem 'bundler-audit', '0.9.1'
24
24
  gem 'bunny', '2.22.0'
25
25
  gem 'colorize', '1.1.0'
@@ -69,7 +69,7 @@ gem 'rmagick', '5.3.0'
69
69
  gem 'rqrcode', '2.2.0'
70
70
  gem 'rspec', '3.12.0'
71
71
  gem 'rtesseract', '3.1.2'
72
- gem 'rubocop', '1.56.0'
72
+ gem 'rubocop', '1.56.1'
73
73
  gem 'rubocop-rake', '0.6.0'
74
74
  gem 'rubocop-rspec', '2.23.2'
75
75
  gem 'ruby-audio', '1.6.1'
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.830]:001 >>> PWN.help
40
+ pwn[v0.4.831]: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.830]:001 >>> PWN.help
55
+ pwn[v0.4.831]:001 >>> PWN.help
56
56
  ```
57
57
 
58
58
 
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'json'
4
+ require 'uri'
4
5
 
5
6
  module PWN
6
7
  module Plugins
@@ -11,6 +12,29 @@ module PWN
11
12
  module Shodan
12
13
  @@logger = PWN::Plugins::PWNLogger.create
13
14
 
15
+ # Supported Method Parameters::
16
+ # extract_and_validate_uris((
17
+ # search_results_hash: 'required - iteration of search results'
18
+ # )
19
+
20
+ private_class_method def self.extract_and_validate_uris(opts = {})
21
+ search_result_hash = opts[:search_result_hash]
22
+ uri_arr = []
23
+ search_result_hash.each_value do |search_result_value|
24
+ URI.extract(search_result_value.to_s).each do |uri|
25
+ uri_arr.push(uri) if %w[http https].include?(URI.parse(uri).scheme)
26
+ end
27
+ end
28
+ uri_arr
29
+ rescue URI::BadURIError,
30
+ URI::InvalidURIError,
31
+ URI::InvalidComponentError
32
+
33
+ next
34
+ rescue StandardError => e
35
+ raise e
36
+ end
37
+
14
38
  # Supported Method Parameters::
15
39
  # shodan_rest_call(
16
40
  # api_key: 'required - shodan api key',
@@ -472,6 +496,23 @@ module PWN
472
496
  raise e
473
497
  end
474
498
 
499
+ # Supported Method Parameters::
500
+ # uri_arr = PWN::Plugins::Shodan.get_uris(
501
+ # search_results: 'required - search_results object returned from #search method'
502
+ # )
503
+
504
+ public_class_method def self.get_uris(opts = {})
505
+ search_results = opts[:search_results]
506
+
507
+ search_results[:matches].map do |search_resuls_hash|
508
+ extract_and_validate_uris(
509
+ search_results_hash: search_results_hash
510
+ )
511
+ end.flatten
512
+ rescue StandardError => e
513
+ raise e
514
+ end
515
+
475
516
  # Author(s):: 0day Inc. <request.pentest@0dayinc.com>
476
517
 
477
518
  public_class_method def self.authors
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.4.830'
4
+ VERSION = '0.4.831'
5
5
  end
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.830
4
+ version: 0.4.831
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-08-17 00:00:00.000000000 Z
11
+ date: 2023-08-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -114,14 +114,14 @@ dependencies:
114
114
  requirements:
115
115
  - - ">="
116
116
  - !ruby/object:Gem::Version
117
- version: 2.4.18
117
+ version: 2.4.19
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - ">="
123
123
  - !ruby/object:Gem::Version
124
- version: 2.4.18
124
+ version: 2.4.19
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: bundler-audit
127
127
  requirement: !ruby/object:Gem::Requirement
@@ -814,14 +814,14 @@ dependencies:
814
814
  requirements:
815
815
  - - '='
816
816
  - !ruby/object:Gem::Version
817
- version: 1.56.0
817
+ version: 1.56.1
818
818
  type: :runtime
819
819
  prerelease: false
820
820
  version_requirements: !ruby/object:Gem::Requirement
821
821
  requirements:
822
822
  - - '='
823
823
  - !ruby/object:Gem::Version
824
- version: 1.56.0
824
+ version: 1.56.1
825
825
  - !ruby/object:Gem::Dependency
826
826
  name: rubocop-rake
827
827
  requirement: !ruby/object:Gem::Requirement
@@ -2179,7 +2179,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
2179
2179
  - !ruby/object:Gem::Version
2180
2180
  version: '0'
2181
2181
  requirements: []
2182
- rubygems_version: 3.4.18
2182
+ rubygems_version: 3.4.19
2183
2183
  signing_key:
2184
2184
  specification_version: 4
2185
2185
  summary: Automated Security Testing for CI/CD Pipelines & Beyond