pwn 0.4.781 → 0.4.783
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop_todo.yml +14 -13
- data/Gemfile +2 -2
- data/README.md +2 -2
- data/bin/pwn_jenkins_install_plugin +45 -47
- data/lib/pwn/plugins/android.rb +2 -1
- data/lib/pwn/plugins/jenkins.rb +2 -10
- data/lib/pwn/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a0d1bb24dba9a8d5d163801e5797c02ea474d9be13dff0bbce7cf1eabfed62e0
|
4
|
+
data.tar.gz: d390d9ae67b2c5c6c3244896bc1725e6ea81c5468f388acd41b48592d07c529b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 47f60ff5a5635bea99bf3409c221d4e52b26f17f13d792da36a9bd87cbf3fb8fad3ec181aa48da9f5ddb4d1f952ffcd67d6241432cec86b51795dc7f399ed78c
|
7
|
+
data.tar.gz: 3d9d8355bd6511753ded5e39cce81e467514a4cfc5e64d436bdddee2e334ca7c024812fd492f93622a2c0ed529c9b34ccece0a58795a77466e0701cf9abd211b
|
data/.rubocop_todo.yml
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on 2023-
|
3
|
+
# on 2023-07-06 20:02:51 UTC using RuboCop version 1.53.1.
|
4
4
|
# The point is for the user to remove these configuration records
|
5
5
|
# one by one as the offenses are removed from the code base.
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
@@ -17,15 +17,16 @@ Layout/LineContinuationSpacing:
|
|
17
17
|
- 'packer/provisioners/wpscan.rb'
|
18
18
|
- 'vagrant/provisioners/beef.rb'
|
19
19
|
|
20
|
-
# Offense count:
|
20
|
+
# Offense count: 282
|
21
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
21
22
|
Lint/UselessAssignment:
|
22
23
|
Enabled: false
|
23
24
|
|
24
|
-
# Offense count:
|
25
|
+
# Offense count: 669
|
25
26
|
Lint/UselessRescue:
|
26
27
|
Enabled: false
|
27
28
|
|
28
|
-
# Offense count:
|
29
|
+
# Offense count: 283
|
29
30
|
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
|
30
31
|
Metrics/AbcSize:
|
31
32
|
Max: 328
|
@@ -36,7 +37,7 @@ Metrics/AbcSize:
|
|
36
37
|
Metrics/BlockLength:
|
37
38
|
Max: 196
|
38
39
|
|
39
|
-
# Offense count:
|
40
|
+
# Offense count: 49
|
40
41
|
# Configuration parameters: CountBlocks.
|
41
42
|
Metrics/BlockNesting:
|
42
43
|
Max: 5
|
@@ -47,31 +48,31 @@ Metrics/CollectionLiteralLength:
|
|
47
48
|
Exclude:
|
48
49
|
- 'lib/pwn/plugins/uri_scheme.rb'
|
49
50
|
|
50
|
-
# Offense count:
|
51
|
+
# Offense count: 108
|
51
52
|
# Configuration parameters: AllowedMethods, AllowedPatterns.
|
52
53
|
Metrics/CyclomaticComplexity:
|
53
54
|
Max: 231
|
54
55
|
|
55
|
-
# Offense count:
|
56
|
+
# Offense count: 518
|
56
57
|
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
|
57
58
|
Metrics/MethodLength:
|
58
59
|
Max: 466
|
59
60
|
|
60
|
-
# Offense count:
|
61
|
+
# Offense count: 52
|
61
62
|
# Configuration parameters: CountComments, CountAsOne.
|
62
63
|
Metrics/ModuleLength:
|
63
|
-
Max:
|
64
|
+
Max: 1187
|
64
65
|
|
65
|
-
# Offense count:
|
66
|
+
# Offense count: 101
|
66
67
|
# Configuration parameters: AllowedMethods, AllowedPatterns.
|
67
68
|
Metrics/PerceivedComplexity:
|
68
69
|
Max: 51
|
69
70
|
|
70
|
-
# Offense count:
|
71
|
+
# Offense count: 158
|
71
72
|
Style/ClassVars:
|
72
73
|
Enabled: false
|
73
74
|
|
74
|
-
# Offense count:
|
75
|
+
# Offense count: 287
|
75
76
|
# This cop supports safe autocorrection (--autocorrect).
|
76
77
|
# Configuration parameters: EnforcedStyle, SingleLineConditionsOnly, IncludeTernaryExpressions.
|
77
78
|
# SupportedStyles: assign_to_condition, assign_inside_condition
|
@@ -129,7 +130,7 @@ Style/StringLiterals:
|
|
129
130
|
Exclude:
|
130
131
|
- 'bin/pwn'
|
131
132
|
|
132
|
-
# Offense count:
|
133
|
+
# Offense count: 601
|
133
134
|
# This cop supports safe autocorrection (--autocorrect).
|
134
135
|
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
|
135
136
|
# URISchemes: http, https
|
data/Gemfile
CHANGED
@@ -48,7 +48,7 @@ gem 'net-ldap', '0.18.0'
|
|
48
48
|
gem 'net-openvpn', '0.8.7'
|
49
49
|
gem 'net-smtp', '0.3.3'
|
50
50
|
gem 'nexpose', '7.3.0'
|
51
|
-
gem 'nokogiri', '1.15.
|
51
|
+
gem 'nokogiri', '1.15.3'
|
52
52
|
gem 'nokogiri-diff', '0.2.0'
|
53
53
|
gem 'oily_png', '1.2.1'
|
54
54
|
gem 'open3', '0.1.2'
|
@@ -67,7 +67,7 @@ gem 'rex', '2.0.13'
|
|
67
67
|
gem 'rmagick', '5.2.0'
|
68
68
|
gem 'rspec', '3.12.0'
|
69
69
|
gem 'rtesseract', '3.1.2'
|
70
|
-
gem 'rubocop', '1.
|
70
|
+
gem 'rubocop', '1.54.1'
|
71
71
|
gem 'rubocop-rake', '0.6.0'
|
72
72
|
gem 'rubocop-rspec', '2.22.0'
|
73
73
|
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.
|
40
|
+
pwn[v0.4.783]: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.783]:001 >>> PWN.help
|
56
56
|
```
|
57
57
|
|
58
58
|
|
@@ -28,7 +28,7 @@ OptionParser.new do |options|
|
|
28
28
|
opts[:plugins] = plugins
|
29
29
|
end
|
30
30
|
|
31
|
-
options.on('-L', '--
|
31
|
+
options.on('-L', '--list-available', '<Optional - List Available Jenkins Plugins for Installation>') do |list_available_bool|
|
32
32
|
opts[:list_available_bool] = list_available_bool
|
33
33
|
end
|
34
34
|
|
@@ -42,54 +42,52 @@ if opts.empty?
|
|
42
42
|
exit 1
|
43
43
|
end
|
44
44
|
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
45
|
+
begin
|
46
|
+
ip = opts[:ip].to_s.scrub
|
47
|
+
port = opts[:port].to_i
|
48
|
+
username = opts[:username]
|
49
|
+
api_key = opts[:api_key]
|
50
|
+
plugins = opts[:plugins].to_s.scrub
|
51
|
+
list_available_bool = true if opts[:list_available_bool] ||= false
|
52
|
+
restart_jenkins = true if opts[:restart_jenkins] ||= false
|
53
|
+
|
54
|
+
if port.positive?
|
55
|
+
jenkins_obj = PWN::Plugins::Jenkins.connect(
|
56
|
+
ip: ip,
|
57
|
+
port: port,
|
58
|
+
username: username,
|
59
|
+
api_key: api_key
|
60
|
+
)
|
61
|
+
else
|
62
|
+
jenkins_obj = PWN::Plugins::Jenkins.connect(
|
63
|
+
ip: ip,
|
64
|
+
username: username,
|
65
|
+
api_key: api_key
|
66
|
+
)
|
67
|
+
end
|
55
68
|
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
end
|
69
|
+
if restart_jenkins
|
70
|
+
puts 'Restarting Jenkins...'
|
71
|
+
jenkins_obj.system.restart
|
72
|
+
exit 0
|
73
|
+
end
|
62
74
|
|
63
|
-
if
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
else
|
71
|
-
jenkins_obj = PWN::Plugins::Jenkins.connect(
|
72
|
-
ip: ip,
|
73
|
-
username: username,
|
74
|
-
api_key: api_key
|
75
|
-
)
|
76
|
-
end
|
75
|
+
if list_available_bool
|
76
|
+
puts jenkins_obj.plugin.list_available
|
77
|
+
else
|
78
|
+
plugin_arr = []
|
79
|
+
plugins.split(',').each do |p|
|
80
|
+
plugin_arr.push(p.strip.chomp)
|
81
|
+
end
|
77
82
|
|
78
|
-
|
79
|
-
puts jenkins_obj.plugin.list_available
|
80
|
-
else
|
81
|
-
plugin_arr = []
|
82
|
-
plugins.split(',').each do |p|
|
83
|
-
plugin_arr.push(p.strip.chomp)
|
83
|
+
jenkins_obj.plugin.install(plugin_arr)
|
84
84
|
end
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
85
|
+
rescue Interrupt
|
86
|
+
puts "\nGoodbye."
|
87
|
+
rescue JenkinsApi::Exceptions::ServiceUnavailable
|
88
|
+
puts 'Jenkins Server Unavailable.' unless restart_jenkins
|
89
|
+
rescue StandardError => e
|
90
|
+
raise e
|
91
|
+
ensure
|
92
|
+
PWN::Plugins::Jenkins.disconnect(jenkins_obj: jenkins_obj) unless restart_jenkins
|
93
93
|
end
|
94
|
-
|
95
|
-
PWN::Plugins::Jenkins.disconnect(jenkins_obj: jenkins_obj)
|
data/lib/pwn/plugins/android.rb
CHANGED
@@ -175,7 +175,8 @@ module PWN
|
|
175
175
|
end
|
176
176
|
|
177
177
|
`#{adb_path} root` if as_root
|
178
|
-
app_resp = `#{adb_path} shell pm list packages`
|
178
|
+
app_resp = `#{adb_path} shell pm list packages` if as_root
|
179
|
+
app_resp = `#{adb_path} shell pm list packages --user 0` unless as_root
|
179
180
|
app_resp.gsub("\npackage:", "\n").split("\n")
|
180
181
|
rescue StandardError => e
|
181
182
|
raise e
|
data/lib/pwn/plugins/jenkins.rb
CHANGED
@@ -23,20 +23,12 @@ module PWN
|
|
23
23
|
|
24
24
|
public_class_method def self.connect(opts = {})
|
25
25
|
ip = opts[:ip]
|
26
|
-
port =
|
27
|
-
opts[:port].to_i
|
28
|
-
else
|
29
|
-
8080
|
30
|
-
end
|
26
|
+
port = opts[:port].to_i ||= 8888
|
31
27
|
username = opts[:username].to_s.scrub
|
32
28
|
base_jenkins_api_uri = "https://#{ip}/ase/services".to_s.scrub
|
33
29
|
api_key = opts[:api_key].to_s.scrub
|
34
30
|
identity_file = opts[:identity_file].to_s.scrub
|
35
|
-
ssl_bool = if opts[:ssl]
|
36
|
-
opts[:ssl]
|
37
|
-
else
|
38
|
-
false
|
39
|
-
end
|
31
|
+
ssl_bool = true if opts[:ssl] ||= false
|
40
32
|
|
41
33
|
if opts[:proxy]
|
42
34
|
proxy = URI(opts[:proxy])
|
data/lib/pwn/version.rb
CHANGED
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.
|
4
|
+
version: 0.4.783
|
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-06
|
11
|
+
date: 2023-07-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -520,14 +520,14 @@ dependencies:
|
|
520
520
|
requirements:
|
521
521
|
- - '='
|
522
522
|
- !ruby/object:Gem::Version
|
523
|
-
version: 1.15.
|
523
|
+
version: 1.15.3
|
524
524
|
type: :runtime
|
525
525
|
prerelease: false
|
526
526
|
version_requirements: !ruby/object:Gem::Requirement
|
527
527
|
requirements:
|
528
528
|
- - '='
|
529
529
|
- !ruby/object:Gem::Version
|
530
|
-
version: 1.15.
|
530
|
+
version: 1.15.3
|
531
531
|
- !ruby/object:Gem::Dependency
|
532
532
|
name: nokogiri-diff
|
533
533
|
requirement: !ruby/object:Gem::Requirement
|
@@ -786,14 +786,14 @@ dependencies:
|
|
786
786
|
requirements:
|
787
787
|
- - '='
|
788
788
|
- !ruby/object:Gem::Version
|
789
|
-
version: 1.
|
789
|
+
version: 1.54.1
|
790
790
|
type: :runtime
|
791
791
|
prerelease: false
|
792
792
|
version_requirements: !ruby/object:Gem::Requirement
|
793
793
|
requirements:
|
794
794
|
- - '='
|
795
795
|
- !ruby/object:Gem::Version
|
796
|
-
version: 1.
|
796
|
+
version: 1.54.1
|
797
797
|
- !ruby/object:Gem::Dependency
|
798
798
|
name: rubocop-rake
|
799
799
|
requirement: !ruby/object:Gem::Requirement
|