pwn 0.5.466 → 0.5.467
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 +2 -2
- data/README.md +3 -3
- data/lib/pwn/config.rb +12 -2
- data/lib/pwn/plugins/jira_data_center.rb +41 -21
- data/lib/pwn/version.rb +1 -1
- data/third_party/pwn_rdoc.jsonl +13 -12
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e3a33b87844e4b90189fcd211d5b2712dd2fb68e85643af79e48b0814a67f082
|
4
|
+
data.tar.gz: bafa428dd2e68c076d9c33e402813d7f677530b1f10c440f99b26b1cdf2f47a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 824bb07f7116b6aeef4adcc9aa83f2c3026bfe6b7b4ff55576050af40dd423f0b7451ea4445c22d5c142efd9a72586f2cfc52cb67eb7dc7dbbfc1e35c4972960
|
7
|
+
data.tar.gz: 7fdd8bc18a046feaeb9b861316284277262f33f5501332368683d6a51d2bbadcbcbc432afd2bdacd640e18970a089ff94eeca3f10296f60eb832cbab9460fe59
|
data/Gemfile
CHANGED
@@ -77,9 +77,9 @@ gem 'rest-client', '2.1.0'
|
|
77
77
|
gem 'rex', '2.0.13'
|
78
78
|
gem 'rmagick', '6.1.4'
|
79
79
|
gem 'rqrcode', '3.1.0'
|
80
|
-
gem 'rspec', '3.13.
|
80
|
+
gem 'rspec', '3.13.2'
|
81
81
|
gem 'rtesseract', '3.1.4'
|
82
|
-
gem 'rubocop', '1.81.
|
82
|
+
gem 'rubocop', '1.81.6'
|
83
83
|
gem 'rubocop-rake', '0.7.1'
|
84
84
|
gem 'rubocop-rspec', '3.7.0'
|
85
85
|
gem 'ruby-audio', '1.6.1'
|
data/README.md
CHANGED
@@ -37,7 +37,7 @@ $ cd /opt/pwn
|
|
37
37
|
$ ./install.sh
|
38
38
|
$ ./install.sh ruby-gem
|
39
39
|
$ pwn
|
40
|
-
pwn[v0.5.
|
40
|
+
pwn[v0.5.467]:001 >>> PWN.help
|
41
41
|
```
|
42
42
|
|
43
43
|
[](https://youtu.be/G7iLUY4FzsI)
|
@@ -52,7 +52,7 @@ $ rvm use ruby-3.4.4@pwn
|
|
52
52
|
$ gem uninstall --all --executables pwn
|
53
53
|
$ gem install --verbose pwn
|
54
54
|
$ pwn
|
55
|
-
pwn[v0.5.
|
55
|
+
pwn[v0.5.467]:001 >>> PWN.help
|
56
56
|
```
|
57
57
|
|
58
58
|
If you're using a multi-user install of RVM do:
|
@@ -62,7 +62,7 @@ $ rvm use ruby-3.4.4@pwn
|
|
62
62
|
$ rvmsudo gem uninstall --all --executables pwn
|
63
63
|
$ rvmsudo gem install --verbose pwn
|
64
64
|
$ pwn
|
65
|
-
pwn[v0.5.
|
65
|
+
pwn[v0.5.467]:001 >>> PWN.help
|
66
66
|
```
|
67
67
|
|
68
68
|
PWN periodically upgrades to the latest version of Ruby which is reflected in `/opt/pwn/.ruby-version`. The easiest way to upgrade to the latest version of Ruby from a previous PWN installation is to run the following script:
|
data/lib/pwn/config.rb
CHANGED
@@ -90,6 +90,13 @@ module PWN
|
|
90
90
|
token: 'Jira Server API Token'
|
91
91
|
},
|
92
92
|
meshtastic: {
|
93
|
+
serial: {
|
94
|
+
port: '/dev/ttyUSB0',
|
95
|
+
baud: 115_200,
|
96
|
+
bits: 8,
|
97
|
+
stop: 1,
|
98
|
+
parity: :none
|
99
|
+
},
|
93
100
|
mqtt: {
|
94
101
|
host: 'mqtt.meshtastic.org',
|
95
102
|
port: 1883,
|
@@ -100,18 +107,21 @@ module PWN
|
|
100
107
|
LongFast: {
|
101
108
|
psk: 'AQ==',
|
102
109
|
region: 'US/<STATE>',
|
103
|
-
channel_topic: '2/e/#'
|
110
|
+
channel_topic: '2/e/#',
|
111
|
+
channel_num: 8
|
104
112
|
},
|
105
113
|
PWN: {
|
106
114
|
psk: 'required - PSK for pwn channel',
|
107
115
|
region: 'US/<STATE>',
|
108
|
-
channel_topic: '2/e/PWN/#'
|
116
|
+
channel_topic: '2/e/PWN/#',
|
117
|
+
channel_num: 99
|
109
118
|
}
|
110
119
|
}
|
111
120
|
},
|
112
121
|
shodan: { api_key: 'SHODAN API Key' }
|
113
122
|
}
|
114
123
|
}
|
124
|
+
|
115
125
|
# Remove beginning colon from key names
|
116
126
|
yaml_env = YAML.dump(env).gsub(/^(\s*):/, '\1')
|
117
127
|
File.write(pwn_env_path, yaml_env)
|
@@ -397,7 +397,24 @@ module PWN
|
|
397
397
|
issue_type_id = opts[:issue_type_id]
|
398
398
|
raise 'ERROR: issue_type_id cannot be nil.' if issue_type_id.nil?
|
399
399
|
|
400
|
-
|
400
|
+
response = { values: [] }
|
401
|
+
start_at = 0
|
402
|
+
loop do
|
403
|
+
params = { startAt: start_at }
|
404
|
+
this_resp = rest_call(
|
405
|
+
rest_call: "issue/createmeta/#{project_key}/issuetypes/#{issue_type_id}",
|
406
|
+
params: params
|
407
|
+
)
|
408
|
+
max_results = this_resp[:maxResults]
|
409
|
+
total = this_resp[:total]
|
410
|
+
is_last = this_resp[:isLast]
|
411
|
+
response[:values].push(this_resp[:values])
|
412
|
+
break if is_last
|
413
|
+
|
414
|
+
start_at += max_results
|
415
|
+
end
|
416
|
+
|
417
|
+
response
|
401
418
|
rescue StandardError => e
|
402
419
|
raise e
|
403
420
|
end
|
@@ -411,7 +428,7 @@ module PWN
|
|
411
428
|
issue = opts[:issue]
|
412
429
|
raise 'ERROR: issue cannot be nil.' if issue.nil?
|
413
430
|
|
414
|
-
issue_data = get_issue(issue: issue)
|
431
|
+
issue_data = get_issue(issue: issue, params: { expand: 'editmeta' })
|
415
432
|
|
416
433
|
project_key = issue_data[:fields][:project][:key]
|
417
434
|
summary = "CLONE - #{issue_data[:fields][:summary]}"
|
@@ -419,33 +436,36 @@ module PWN
|
|
419
436
|
issue_type = issue_data[:fields][:issuetype][:name].downcase.to_sym
|
420
437
|
issue_type_id = issue_data[:fields][:issuetype][:id]
|
421
438
|
|
439
|
+
reject_keys = %i[
|
440
|
+
project
|
441
|
+
summary
|
442
|
+
issuetype
|
443
|
+
description
|
444
|
+
created
|
445
|
+
updated
|
446
|
+
resolution
|
447
|
+
status
|
448
|
+
resolutiondate
|
449
|
+
environment
|
450
|
+
comment
|
451
|
+
attachment
|
452
|
+
]
|
453
|
+
|
422
454
|
epic_name = nil
|
455
|
+
epic_name_field_key = nil
|
423
456
|
if issue_type == :epic
|
424
457
|
all_fields = get_all_fields
|
425
458
|
epic_name_field_key = all_fields.find { |field| field[:name] == 'Epic Name' }[:id]
|
426
459
|
epic_name = issue_data[:fields][epic_name_field_key.to_sym]
|
460
|
+
reject_keys << epic_name_field_key.to_sym
|
427
461
|
end
|
462
|
+
|
428
463
|
description = issue_data[:fields][:description]
|
429
|
-
# TODO: Better Field Handling:
|
430
|
-
# GET issue/createmeta/{projectIdOrKey}/issuetypes/{issueTypeId}
|
431
|
-
# to discover required/allowed fields dynamically before
|
432
|
-
# building the payload. Copy only what makes sense—some fields
|
433
|
-
# (e.g., status, created date) can't be set on creation.
|
434
|
-
issue_type_metadata = get_issue_type_metadata(
|
435
|
-
project_key: project_key,
|
436
|
-
issue_type_id: issue_type_id
|
437
|
-
)
|
438
|
-
issue_type_metadata_filter = issue_type_metadata[:fields].select do |field_key, field_value|
|
439
|
-
issue_data[:fields].key?(field_key.to_sym) &&
|
440
|
-
!field_value[:required] == false &&
|
441
|
-
!%w[status created updated resolution].include?(field_key)
|
442
|
-
end
|
443
464
|
|
444
|
-
|
445
|
-
|
446
|
-
end
|
465
|
+
clone_fields = issue_data[:fields].dup
|
466
|
+
clone_fields.reject! { |key, value| reject_keys.include?(key) || value.nil? }
|
447
467
|
|
448
|
-
additional_fields = { fields:
|
468
|
+
additional_fields = { fields: clone_fields }
|
449
469
|
|
450
470
|
create_issue(
|
451
471
|
project_key: project_key,
|
@@ -514,7 +534,7 @@ module PWN
|
|
514
534
|
|
515
535
|
issue_resp = #{self}.get_issue(
|
516
536
|
issue: 'required - issue to lookup (e.g. Bug, Issue, Story, or Epic ID)',
|
517
|
-
params: 'optional - additional parameters to pass in the URI'
|
537
|
+
params: 'optional - additional parameters to pass in the URI (e.g. fields, expand, etc.)'
|
518
538
|
)
|
519
539
|
|
520
540
|
issue_resp = #{self}.create_issue(
|
data/lib/pwn/version.rb
CHANGED
data/third_party/pwn_rdoc.jsonl
CHANGED
@@ -736,18 +736,19 @@
|
|
736
736
|
{"messages":[{"role":"user","content":"PWN::Plugins::Jenkins.help Usage"},{"role":"assistant","content":"`PWN::Plugins::Jenkins.help`: "}]}
|
737
737
|
{"messages":[{"role":"user","content":"PWN::Plugins::Jenkins.list_nested_jobs Usage"},{"role":"assistant","content":"`PWN::Plugins::Jenkins.list_nested_jobs`: Supported Method Parameters\n\nPWN::Plugins::Jenkins.list_nested_jobs(\n\njenkins_obj: 'required jenkins_obj returned from #connect method',\nview_path: 'required view path to list jobs'\n\n)\n"}]}
|
738
738
|
{"messages":[{"role":"user","content":"PWN::Plugins::Jenkins.list_nested_views Usage"},{"role":"assistant","content":"`PWN::Plugins::Jenkins.list_nested_views`: Supported Method Parameters\n\nPWN::Plugins::Jenkins.list_nested_views(\n\njenkins_obj: 'required jenkins_obj returned from #connect method',\nview_path: 'required view path list sub-views'\n\n)\n"}]}
|
739
|
-
{"messages":[{"role":"user","content":"PWN::Plugins::
|
740
|
-
{"messages":[{"role":"user","content":"PWN::Plugins::
|
741
|
-
{"messages":[{"role":"user","content":"PWN::Plugins::
|
742
|
-
{"messages":[{"role":"user","content":"PWN::Plugins::
|
743
|
-
{"messages":[{"role":"user","content":"PWN::Plugins::
|
744
|
-
{"messages":[{"role":"user","content":"PWN::Plugins::
|
745
|
-
{"messages":[{"role":"user","content":"PWN::Plugins::
|
746
|
-
{"messages":[{"role":"user","content":"PWN::Plugins::
|
747
|
-
{"messages":[{"role":"user","content":"PWN::Plugins::
|
748
|
-
{"messages":[{"role":"user","content":"PWN::Plugins::
|
749
|
-
{"messages":[{"role":"user","content":"PWN::Plugins::
|
750
|
-
{"messages":[{"role":"user","content":"PWN::Plugins::
|
739
|
+
{"messages":[{"role":"user","content":"PWN::Plugins::JiraDataCenter.authors Usage"},{"role":"assistant","content":"`PWN::Plugins::JiraDataCenter.authors`: Author(s)\n\n0day Inc. <support@0dayinc.com>\n"}]}
|
740
|
+
{"messages":[{"role":"user","content":"PWN::Plugins::JiraDataCenter.clone_issue Usage"},{"role":"assistant","content":"`PWN::Plugins::JiraDataCenter.clone_issue`: Supported Method Parameters\n\nissue_resp = PWN::Plugins::JiraDataCenter.clone_issue(\n\nissue: 'required - issue to clone (e.g. Bug, Issue, Story, or Epic ID)'\n\n)\n"}]}
|
741
|
+
{"messages":[{"role":"user","content":"PWN::Plugins::JiraDataCenter.create_issue Usage"},{"role":"assistant","content":"`PWN::Plugins::JiraDataCenter.create_issue`: Supported Method Parameters\n\nissue_resp = PWN::Plugins::JiraDataCenter.create_issue(\n\nproject_key: 'required - project key (e.g. PWN)',\nsummary: 'required - summary of the issue (e.g. Epic for PWN-1337)',\nissue_type: 'required - issue type (e.g. :epic, :story, :bug)',\ndescription: 'optional - description of the issue',\nepic_name: 'optional - name of the epic',\nadditional_fields: 'optional - additional fields to set in the issue (e.g. labels, components, custom fields, etc.)'\nattachments: 'optional - array of attachment paths to upload to the issue (e.g. [\"/tmp/file1.txt\", \"/tmp/file2.txt\"])',\ncomment: 'optional - comment to add to the issue (e.g. \"This is a comment\")'\n\n)\n"}]}
|
742
|
+
{"messages":[{"role":"user","content":"PWN::Plugins::JiraDataCenter.delete_attachment Usage"},{"role":"assistant","content":"`PWN::Plugins::JiraDataCenter.delete_attachment`: Supported Method Parameters\n\nissue_resp = PWN::Plugins::JiraDataCenter.delete_attachment(\n\nid: 'required - attachment ID to delete (e.g. 10000) found in #get_issue method'\n\n)\n"}]}
|
743
|
+
{"messages":[{"role":"user","content":"PWN::Plugins::JiraDataCenter.delete_issue Usage"},{"role":"assistant","content":"`PWN::Plugins::JiraDataCenter.delete_issue`: Supported Method Parameters\n\nissue_resp = PWN::Plugins::JiraDataCenter.delete_issue(\n\nissue: 'required - issue to delete (e.g. Bug, Issue, Story, or Epic ID)'\n\n)\n"}]}
|
744
|
+
{"messages":[{"role":"user","content":"PWN::Plugins::JiraDataCenter.get_all_fields Usage"},{"role":"assistant","content":"`PWN::Plugins::JiraDataCenter.get_all_fields`: Supported Method Parameters\n\nall_fields = PWN::Plugins::JiraDataCenter.get_all_fields\n"}]}
|
745
|
+
{"messages":[{"role":"user","content":"PWN::Plugins::JiraDataCenter.get_issue Usage"},{"role":"assistant","content":"`PWN::Plugins::JiraDataCenter.get_issue`: Supported Method Parameters\n\nissue_resp = PWN::Plugins::JiraDataCenter.get_issue(\n\nissue: 'required - issue to lookup (e.g. Bug, Issue, Story, or Epic ID)',\nparams: 'optional - additional parameters to pass in the URI (e.g. fields, expand, etc.)'\n\n)\n"}]}
|
746
|
+
{"messages":[{"role":"user","content":"PWN::Plugins::JiraDataCenter.get_issue_type_metadata Usage"},{"role":"assistant","content":"`PWN::Plugins::JiraDataCenter.get_issue_type_metadata`: Supported Method Parameters\n\nissue_type_metadata = PWN::Plugins::JiraDataCenter.get_issue_type_metadata(\n\nproject_key: 'required - project key (e.g. PWN)',\nissue_type_id: 'required - issue type ID (e.g. issue[:fields][:issuetype][:id] from #get_issue method)'\n\n)\n"}]}
|
747
|
+
{"messages":[{"role":"user","content":"PWN::Plugins::JiraDataCenter.get_user Usage"},{"role":"assistant","content":"`PWN::Plugins::JiraDataCenter.get_user`: Supported Method Parameters\n\nuser = PWN::Plugins::JiraDataCenter.get_user(\n\nusername: 'required - username to lookup (e.g. jane.doe)',\nparams: 'optional - additional parameters to pass in the URI (e.g. expand, etc.)'\n\n)\n"}]}
|
748
|
+
{"messages":[{"role":"user","content":"PWN::Plugins::JiraDataCenter.help Usage"},{"role":"assistant","content":"`PWN::Plugins::JiraDataCenter.help`: "}]}
|
749
|
+
{"messages":[{"role":"user","content":"PWN::Plugins::JiraDataCenter.issue_comment Usage"},{"role":"assistant","content":"`PWN::Plugins::JiraDataCenter.issue_comment`: Supported Method Parameters\n\nissue_resp = PWN::Plugins::JiraDataCenter.issue_comment(\n\nissue: 'required - issue to delete (e.g. Bug, Issue, Story, or Epic ID)',\ncomment_action: 'required - action to perform on the issue comment (e.g. :delete, :add, :update - Defaults to :add)',\ncomment_id: 'optional - comment ID to delete or update (e.g. 10000)',\nauthor: 'optional - author of the comment (e.g. \"jane.doe\")',\ncomment: 'optional - comment to add or update in the issue (e.g. \"This is a comment\")'\n\n)\n"}]}
|
750
|
+
{"messages":[{"role":"user","content":"PWN::Plugins::JiraDataCenter.rest_call Usage"},{"role":"assistant","content":"`PWN::Plugins::JiraDataCenter.rest_call`: Supported Method Parameters\n\nrest_call(\n\ntoken: 'required - personal access token',\nhttp_method: 'optional HTTP method (defaults to GET)',\nrest_call: 'required rest call to make per the schema',\nparams: 'optional params passed in the URI or HTTP Headers',\nhttp_body: 'optional HTTP body sent in HTTP methods that support it e.g. POST'\n\n)\n"}]}
|
751
|
+
{"messages":[{"role":"user","content":"PWN::Plugins::JiraDataCenter.update_issue Usage"},{"role":"assistant","content":"`PWN::Plugins::JiraDataCenter.update_issue`: Supported Method Parameters\n\nissue_resp = PWN::Plugins::JiraDataCenter.update_issue(\n\nfields: 'required - fields to update in the issue (e.g. summary, description, labels, components, custom fields, etc.)',\nattachments: 'optional - array of attachment paths to upload to the issue (e.g. [\"/tmp/file1.txt\", \"/tmp/file2.txt\"])',\n\n)\n"}]}
|
751
752
|
{"messages":[{"role":"user","content":"PWN::Plugins::Log.append Usage"},{"role":"assistant","content":"`PWN::Plugins::Log.append`: Supported Method Parameters\n\nPWN::Log.create( )\n"}]}
|
752
753
|
{"messages":[{"role":"user","content":"PWN::Plugins::Log.authors Usage"},{"role":"assistant","content":"`PWN::Plugins::Log.authors`: Author(s)\n\n0day Inc. <support@0dayinc.com>\n"}]}
|
753
754
|
{"messages":[{"role":"user","content":"PWN::Plugins::Log.help Usage"},{"role":"assistant","content":"`PWN::Plugins::Log.help`: "}]}
|
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.5.
|
4
|
+
version: 0.5.467
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- 0day Inc.
|
@@ -925,14 +925,14 @@ dependencies:
|
|
925
925
|
requirements:
|
926
926
|
- - '='
|
927
927
|
- !ruby/object:Gem::Version
|
928
|
-
version: 3.13.
|
928
|
+
version: 3.13.2
|
929
929
|
type: :development
|
930
930
|
prerelease: false
|
931
931
|
version_requirements: !ruby/object:Gem::Requirement
|
932
932
|
requirements:
|
933
933
|
- - '='
|
934
934
|
- !ruby/object:Gem::Version
|
935
|
-
version: 3.13.
|
935
|
+
version: 3.13.2
|
936
936
|
- !ruby/object:Gem::Dependency
|
937
937
|
name: rtesseract
|
938
938
|
requirement: !ruby/object:Gem::Requirement
|
@@ -953,14 +953,14 @@ dependencies:
|
|
953
953
|
requirements:
|
954
954
|
- - '='
|
955
955
|
- !ruby/object:Gem::Version
|
956
|
-
version: 1.81.
|
956
|
+
version: 1.81.6
|
957
957
|
type: :runtime
|
958
958
|
prerelease: false
|
959
959
|
version_requirements: !ruby/object:Gem::Requirement
|
960
960
|
requirements:
|
961
961
|
- - '='
|
962
962
|
- !ruby/object:Gem::Version
|
963
|
-
version: 1.81.
|
963
|
+
version: 1.81.6
|
964
964
|
- !ruby/object:Gem::Dependency
|
965
965
|
name: rubocop-rake
|
966
966
|
requirement: !ruby/object:Gem::Requirement
|