pwn 0.4.824 → 0.4.827
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/Gemfile +3 -1
- data/README.md +2 -2
- data/bin/pwn_www_uri_buster +3 -2
- data/lib/pwn/plugins/scannable_codes.rb +70 -0
- data/lib/pwn/plugins.rb +1 -0
- data/lib/pwn/version.rb +1 -1
- data/spec/lib/pwn/plugins/scannable_codes_spec.rb +15 -0
- metadata +33 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bdc9a2b7f219a0702dae4e7e3991817656b099ef38d89c9caf2a56bc4d5f98ea
|
4
|
+
data.tar.gz: ce6535b4acd5a43892b2489831e838c417ef35ecd019474484c0175e64fba3b1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0c7b6fcf8c0a9a42d4fd28b59df5d1d125922b080f9d456028251d834d21acc3e0c17864d11d21aa800eedb59a9224802ab4f3aa28322d766d5a5c52a635349b
|
7
|
+
data.tar.gz: ce7c22e7d7b758c91b6b9700639244de40e075ed7620b0de7880397ba5779f485dd100c3469f0e11b3ce04506b51f5c3b8c8345bb755b79d1a2bb0474758ddf6
|
data/Gemfile
CHANGED
@@ -16,6 +16,7 @@ gem 'anemone', '0.7.2'
|
|
16
16
|
gem 'authy', '3.0.1'
|
17
17
|
gem 'aws-sdk', '3.1.0'
|
18
18
|
# gem 'bettercap', '1.6.2'
|
19
|
+
gem 'barby', '0.6.8'
|
19
20
|
gem 'brakeman', '6.0.1'
|
20
21
|
gem 'bson', '4.15.0'
|
21
22
|
gem 'bundler', '>=2.4.18'
|
@@ -48,7 +49,7 @@ gem 'net-ldap', '0.18.0'
|
|
48
49
|
gem 'net-openvpn', '0.8.7'
|
49
50
|
gem 'net-smtp', '0.3.3'
|
50
51
|
gem 'nexpose', '7.3.0'
|
51
|
-
gem 'nokogiri', '1.15.
|
52
|
+
gem 'nokogiri', '1.15.4'
|
52
53
|
gem 'nokogiri-diff', '0.2.0'
|
53
54
|
gem 'oily_png', '1.2.1'
|
54
55
|
gem 'open3', '0.1.2'
|
@@ -65,6 +66,7 @@ gem 'rdoc', '6.5.0'
|
|
65
66
|
gem 'rest-client', '2.1.0'
|
66
67
|
gem 'rex', '2.0.13'
|
67
68
|
gem 'rmagick', '5.3.0'
|
69
|
+
gem 'rqrcode', '2.2.0'
|
68
70
|
gem 'rspec', '3.12.0'
|
69
71
|
gem 'rtesseract', '3.1.2'
|
70
72
|
gem 'rubocop', '1.56.0'
|
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.827]:001 >>> PWN.help
|
41
41
|
```
|
42
42
|
|
43
43
|
[](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.827]:001 >>> PWN.help
|
56
56
|
```
|
57
57
|
|
58
58
|
|
data/bin/pwn_www_uri_buster
CHANGED
@@ -7,6 +7,7 @@ require 'uri'
|
|
7
7
|
require 'cgi'
|
8
8
|
require 'htmlentities'
|
9
9
|
require 'faker'
|
10
|
+
require 'json'
|
10
11
|
|
11
12
|
opts = {}
|
12
13
|
OptionParser.new do |options|
|
@@ -107,7 +108,7 @@ def request_path(opts = {})
|
|
107
108
|
http_method: http_method,
|
108
109
|
http_resp_code: response.code,
|
109
110
|
http_resp_length: response.body.length,
|
110
|
-
http_resp_headers: response.headers,
|
111
|
+
http_resp_headers: JSON.pretty_generate(response.headers),
|
111
112
|
http_resp: "#{response.body[0..300]}..."
|
112
113
|
}
|
113
114
|
rescue Errno::ECONNREFUSED
|
@@ -137,7 +138,7 @@ def request_path(opts = {})
|
|
137
138
|
http_method: http_method,
|
138
139
|
http_resp_code: e.response.code,
|
139
140
|
http_resp_length: e.response.body.length,
|
140
|
-
http_resp_headers: e.response.headers,
|
141
|
+
http_resp_headers: JSON.pretty_generate(e.response.headers),
|
141
142
|
http_resp: "#{e.response.body[0..300]}..."
|
142
143
|
}
|
143
144
|
else
|
@@ -0,0 +1,70 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'barby'
|
4
|
+
require 'rqrcode'
|
5
|
+
require 'chunky_png'
|
6
|
+
|
7
|
+
module PWN
|
8
|
+
module Plugins
|
9
|
+
# This plugin is used to Create Scannable BarCodes and QR Codes
|
10
|
+
module ScannableCodes
|
11
|
+
# Supported Method Parameters::
|
12
|
+
# response = PWN::Plugins::ScannableCodes.generate(
|
13
|
+
# data: 'required - data to encode',
|
14
|
+
# type: 'optional - :barcode || :qrcode (defaults to :qrcode)',
|
15
|
+
# path: 'optional - path to save image (defaults to "./#{data}.png")'
|
16
|
+
# )
|
17
|
+
|
18
|
+
public_class_method def self.generate(opts = {})
|
19
|
+
data = opts[:data]
|
20
|
+
raise 'ERROR: option data is required.' unless data
|
21
|
+
|
22
|
+
type = opts[:type]
|
23
|
+
type ||= :qrcode
|
24
|
+
|
25
|
+
path = opts[:path]
|
26
|
+
path ||= "./#{data}.png"
|
27
|
+
|
28
|
+
case type
|
29
|
+
when :barcode
|
30
|
+
barcode = Barby::Code128B.new(data)
|
31
|
+
barcode.to_png.save(path)
|
32
|
+
when :qrcode
|
33
|
+
qrcode = RQRCode::QRCode.new(data)
|
34
|
+
png = qrcode.as_png
|
35
|
+
png.resize(200, 200).save(path)
|
36
|
+
else
|
37
|
+
raise 'ERROR: type must be :barcode or :qrcode.'
|
38
|
+
end
|
39
|
+
|
40
|
+
puts "Saved #{type} to #{path}"
|
41
|
+
rescue Interrupt
|
42
|
+
puts "\nGoodbye."
|
43
|
+
rescue StandardError => e
|
44
|
+
raise e
|
45
|
+
end
|
46
|
+
|
47
|
+
# Author(s):: 0day Inc. <request.pentest@0dayinc.com>
|
48
|
+
|
49
|
+
public_class_method def self.authors
|
50
|
+
"AUTHOR(S):
|
51
|
+
0day Inc. <request.pentest@0dayinc.com>
|
52
|
+
"
|
53
|
+
end
|
54
|
+
|
55
|
+
# Display Usage for this Module
|
56
|
+
|
57
|
+
public_class_method def self.help
|
58
|
+
puts "USAGE:
|
59
|
+
#{self}.generate(
|
60
|
+
data: 'required - data to encode',
|
61
|
+
type: 'optional - :barcode || :qrcode (defaults to :qrcode)',
|
62
|
+
path: 'optional - path to save image (defaults to \"./#{data}.png\")'
|
63
|
+
)
|
64
|
+
|
65
|
+
#{self}.authors
|
66
|
+
"
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
data/lib/pwn/plugins.rb
CHANGED
@@ -52,6 +52,7 @@ module PWN
|
|
52
52
|
autoload :PS, 'pwn/plugins/ps'
|
53
53
|
autoload :RabbitMQ, 'pwn/plugins/rabbit_mq'
|
54
54
|
autoload :RFIDler, 'pwn/plugins/rfidler'
|
55
|
+
autoload :ScannableCodes, 'pwn/plugins/scannable_codes'
|
55
56
|
autoload :Serial, 'pwn/plugins/serial'
|
56
57
|
autoload :Shodan, 'pwn/plugins/shodan'
|
57
58
|
autoload :SlackClient, 'pwn/plugins/slack_client'
|
data/lib/pwn/version.rb
CHANGED
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
|
5
|
+
describe PWN::Plugins::ScannableCodes do
|
6
|
+
it 'should display information for authors' do
|
7
|
+
authors_response = PWN::Plugins::ScannableCodes
|
8
|
+
expect(authors_response).to respond_to :authors
|
9
|
+
end
|
10
|
+
|
11
|
+
it 'should display information for existing help method' do
|
12
|
+
help_response = PWN::Plugins::ScannableCodes
|
13
|
+
expect(help_response).to respond_to :help
|
14
|
+
end
|
15
|
+
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.4.
|
4
|
+
version: 0.4.827
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- 0day Inc.
|
@@ -66,6 +66,20 @@ dependencies:
|
|
66
66
|
- - '='
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: 3.1.0
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: barby
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - '='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 0.6.8
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - '='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 0.6.8
|
69
83
|
- !ruby/object:Gem::Dependency
|
70
84
|
name: brakeman
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -520,14 +534,14 @@ dependencies:
|
|
520
534
|
requirements:
|
521
535
|
- - '='
|
522
536
|
- !ruby/object:Gem::Version
|
523
|
-
version: 1.15.
|
537
|
+
version: 1.15.4
|
524
538
|
type: :runtime
|
525
539
|
prerelease: false
|
526
540
|
version_requirements: !ruby/object:Gem::Requirement
|
527
541
|
requirements:
|
528
542
|
- - '='
|
529
543
|
- !ruby/object:Gem::Version
|
530
|
-
version: 1.15.
|
544
|
+
version: 1.15.4
|
531
545
|
- !ruby/object:Gem::Dependency
|
532
546
|
name: nokogiri-diff
|
533
547
|
requirement: !ruby/object:Gem::Requirement
|
@@ -752,6 +766,20 @@ dependencies:
|
|
752
766
|
- - '='
|
753
767
|
- !ruby/object:Gem::Version
|
754
768
|
version: 5.3.0
|
769
|
+
- !ruby/object:Gem::Dependency
|
770
|
+
name: rqrcode
|
771
|
+
requirement: !ruby/object:Gem::Requirement
|
772
|
+
requirements:
|
773
|
+
- - '='
|
774
|
+
- !ruby/object:Gem::Version
|
775
|
+
version: 2.2.0
|
776
|
+
type: :runtime
|
777
|
+
prerelease: false
|
778
|
+
version_requirements: !ruby/object:Gem::Requirement
|
779
|
+
requirements:
|
780
|
+
- - '='
|
781
|
+
- !ruby/object:Gem::Version
|
782
|
+
version: 2.2.0
|
755
783
|
- !ruby/object:Gem::Dependency
|
756
784
|
name: rspec
|
757
785
|
requirement: !ruby/object:Gem::Requirement
|
@@ -1700,6 +1728,7 @@ files:
|
|
1700
1728
|
- lib/pwn/plugins/pwn_logger.rb
|
1701
1729
|
- lib/pwn/plugins/rabbit_mq.rb
|
1702
1730
|
- lib/pwn/plugins/rfidler.rb
|
1731
|
+
- lib/pwn/plugins/scannable_codes.rb
|
1703
1732
|
- lib/pwn/plugins/serial.rb
|
1704
1733
|
- lib/pwn/plugins/shodan.rb
|
1705
1734
|
- lib/pwn/plugins/slack_client.rb
|
@@ -2011,6 +2040,7 @@ files:
|
|
2011
2040
|
- spec/lib/pwn/plugins/pwn_logger_spec.rb
|
2012
2041
|
- spec/lib/pwn/plugins/rabbit_mq_spec.rb
|
2013
2042
|
- spec/lib/pwn/plugins/rfidler_spec.rb
|
2043
|
+
- spec/lib/pwn/plugins/scannable_codes_spec.rb
|
2014
2044
|
- spec/lib/pwn/plugins/serial_spec.rb
|
2015
2045
|
- spec/lib/pwn/plugins/shodan_spec.rb
|
2016
2046
|
- spec/lib/pwn/plugins/slack_client_spec.rb
|