pwn 0.5.463 → 0.5.464

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5780100847051667d337b384cd5fc617fe46cface20e5903cd62dc23d59536cd
4
- data.tar.gz: 8607ae725c223b7cd7c84a41d2532baf7cb6f9b623d184706ffa9e2a1c3a998e
3
+ metadata.gz: 8da2a09f078aabba13bc4f410a20baf3e5cb2f99b41940468c92041107a35e15
4
+ data.tar.gz: ce349029a51dc7513d1aa49823a92585521f641195c0c72fb5bda1e6a52622ef
5
5
  SHA512:
6
- metadata.gz: d2add06f66b9dd45458d2aa6b8c1ca0ad31f4af264e8a2c8edb8f9e861b10390244f48dea601bfdf65a29e536201c4b09ab8cb85f523d024498568879a79d556
7
- data.tar.gz: dc0c22a8f9f089c455fdceb78ffc429fb8a3647a8b4a0a7a903d7b5da1e6eb975133e0d2cbea9402cb7455eb32230ac4b1fd6c7581a975e5beff02464766d035
6
+ metadata.gz: 211bcfd878c18e7c96ec58f8d3eefdba253f70b2922cf51bcb9f3ce0c760f9f5382d88143c068918903af995147bac5733308cdab3916de2fe1d73eb9282d9c8
7
+ data.tar.gz: 55f32eced8d19f73227670efb1779ee7cdeb3f3c87b4f4dd4a0fa2bd9d181abf8b69929a2f4837f4aa1e774b2cc1be7584e00c1a692d64dd24e5332adc8b0040
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.463]:001 >>> PWN.help
40
+ pwn[v0.5.464]: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.4.4@pwn
52
52
  $ gem uninstall --all --executables pwn
53
53
  $ gem install --verbose pwn
54
54
  $ pwn
55
- pwn[v0.5.463]:001 >>> PWN.help
55
+ pwn[v0.5.464]: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.463]:001 >>> PWN.help
65
+ pwn[v0.5.464]: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:
@@ -387,7 +387,7 @@ module PWN
387
387
  # Supported Method Parameters::
388
388
  # issue_type_metadata = PWN::Plugins::JiraServer.get_issue_type_metadata(
389
389
  # project_key: 'required - project key (e.g. PWN)',
390
- # issue_type_id: 'required - issue type ID (e.g. 10000)'
390
+ # issue_type_id: 'required - issue type ID (e.g. issue[:fields][:issuetype][:id] from #get_issue method)'
391
391
  # )
392
392
 
393
393
  public_class_method def self.get_issue_type_metadata(opts = {})
@@ -415,36 +415,44 @@ module PWN
415
415
 
416
416
  project_key = issue_data[:fields][:project][:key]
417
417
  summary = "CLONE - #{issue_data[:fields][:summary]}"
418
- issue_type = issue_data[:fields][:issuetype][:name].downcase.to_sym
419
- issue_type_id = issue_data[:fields][:issuetype][:id]
420
-
421
- epic_name = nil
422
- if issue_type == :epic
423
- all_fields = get_all_fields
424
- epic_name_field_key = all_fields.find { |field| field[:name] == 'Epic Name' }[:id]
425
- epic_name = issue_data[:fields][epic_name_field_key.to_sym]
426
- end
427
- description = issue_data[:fields][:description]
418
+
419
+ http_body = { summary: summary }
420
+
421
+ rest_call(
422
+ http_method: :post,
423
+ rest_call: "issue/#{issue}/clone",
424
+ http_body: http_body
425
+ )
426
+ # issue_type = issue_data[:fields][:issuetype][:name].downcase.to_sym
427
+ # issue_type_id = issue_data[:fields][:issuetype][:id]
428
+
429
+ # epic_name = nil
430
+ # if issue_type == :epic
431
+ # all_fields = get_all_fields
432
+ # epic_name_field_key = all_fields.find { |field| field[:name] == 'Epic Name' }[:id]
433
+ # epic_name = issue_data[:fields][epic_name_field_key.to_sym]
434
+ # end
435
+ # description = issue_data[:fields][:description]
428
436
  # TODO: Better Field Handling:
429
437
  # GET issue/createmeta/{projectIdOrKey}/issuetypes/{issueTypeId}
430
438
  # to discover required/allowed fields dynamically before
431
439
  # building the payload. Copy only what makes sense—some fields
432
440
  # (e.g., status, created date) can't be set on creation.
433
- issue_type_metadata = get_issue_type_metadata(
434
- project_key: project_key,
435
- issue_type_id: issue_type_id
436
- )
437
- filtered_fields = issue_data[:fields].compact
438
- additional_fields = { fields: filtered_fields }
439
-
440
- create_issue(
441
- project_key: project_key,
442
- summary: summary,
443
- issue_type: issue_type,
444
- epic_name: epic_name,
445
- description: description,
446
- additional_fields: additional_fields
447
- )
441
+ # issue_type_metadata = get_issue_type_metadata(
442
+ # project_key: project_key,
443
+ # issue_type_id: issue_type_id
444
+ # )
445
+ # filtered_fields = issue_data[:fields].compact
446
+ # additional_fields = { fields: filtered_fields }
447
+
448
+ # create_issue(
449
+ # project_key: project_key,
450
+ # summary: summary,
451
+ # issue_type: issue_type,
452
+ # epic_name: epic_name,
453
+ # description: description,
454
+ # additional_fields: additional_fields
455
+ # )
448
456
  rescue StandardError => e
449
457
  raise e
450
458
  end
@@ -534,7 +542,7 @@ module PWN
534
542
 
535
543
  issue_type_metadata = #{self}.get_issue_type_metadata(
536
544
  project_key: 'required - project key (e.g. PWN)',
537
- issue_type_id: 'required - issue type ID (e.g. 10000)'
545
+ issue_type_id: 'required - issue type ID (e.g. issue[:fields][:issuetype][:id] from #get_issue method)'
538
546
  )
539
547
 
540
548
  issue_resp = #{self}.clone_issue(
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.5.463'
4
+ VERSION = '0.5.464'
5
5
  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.5.463
4
+ version: 0.5.464
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.