pwn 0.5.459 → 0.5.460

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: 821ea05737825e8c254766da6476f90b5315c3b292d039cf621cfef01a7067f6
4
- data.tar.gz: 9451d08fb028c514d47604138ca5d6cd73142b9d4c8c111caacb8dfa2e5d879d
3
+ metadata.gz: e0fd4b3e503df4cf02f8ebfd3e74650492432f45621f08bd9b7089443dfa5e4c
4
+ data.tar.gz: 0f98ea5d9af915e0cc094ec7659ddae8ce6ce17ef0bd95e11356b43e0832972b
5
5
  SHA512:
6
- metadata.gz: 05506e6cb58d8bf3281f005c9faaf1f81229bddda894cbe49f9a558d1b61a6a2cc7c3ce8dee472c76ef9e80eeb538ad44db533ebfb8ea5ffd38e99179d4a0217
7
- data.tar.gz: 47ea7554ce6277eeb6ce8fb14448f4665849af9150eff0bc45e08e49d331f08f7a8ee09fad43db89556dab2b9fa114d00bf5e1425a13534f21170707bf26b942
6
+ metadata.gz: 8dcbcb9f1f2b919dde7faad6bbfa922351013e0fc793de1d4953fb412b305fb654f9842dabdfce07f3fa2661e55402a23b12e091240318fa149c7c89821f32fe
7
+ data.tar.gz: 7dd9700299cf76c776057f9b2c51ee7508d7301345e9ec52096cab4d7a8e41ee4300935b50e7fe9c630be3a53a7f35036f91246ffd7b70233b60be7d18965905
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.459]:001 >>> PWN.help
40
+ pwn[v0.5.460]: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.459]:001 >>> PWN.help
55
+ pwn[v0.5.460]: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.459]:001 >>> PWN.help
65
+ pwn[v0.5.460]: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:
@@ -384,6 +384,41 @@ module PWN
384
384
  raise e
385
385
  end
386
386
 
387
+ # Supported Method Parameters::
388
+ # issue_resp = PWN::Plugins::JiraServer.clone_issue(
389
+ # issue: 'required - issue to clone (e.g. Bug, Issue, Story, or Epic ID)'
390
+ # )
391
+
392
+ public_class_method def self.clone_issue(opts = {})
393
+ issue = opts[:issue]
394
+ raise 'ERROR: issue cannot be nil.' if issue.nil?
395
+
396
+ issue_data = get_issue(issue: issue)
397
+
398
+ project_key = issue_data[:fields][:project][:key]
399
+ summary = "CLONE - #{issue_data[:fields][:summary]}"
400
+ issue_type = issue_data[:fields][:issuetype][:name].downcase.to_sym
401
+ epic_name = nil
402
+ if issue_type == :epic
403
+ all_fields = get_all_fields
404
+ epic_name_field_key = all_fields.find { |field| field[:name] == 'Epic Name' }[:id]
405
+ epic_name = issue_data[:fields][epic_name_field_key.to_sym]
406
+ end
407
+ description = issue_data[:fields][:description]
408
+ additional_fields = { fields: issue_data[:fields] }
409
+
410
+ create_issue(
411
+ project_key: project_key,
412
+ summary: summary,
413
+ issue_type: issue_type,
414
+ epic_name: epic_name,
415
+ description: description,
416
+ additional_fields: additional_fields
417
+ )
418
+ rescue StandardError => e
419
+ raise e
420
+ end
421
+
387
422
  # Supported Method Parameters::
388
423
  # issue_resp = PWN::Plugins::JiraServer.delete_issue(
389
424
  # issue: 'required - issue to delete (e.g. Bug, Issue, Story, or Epic ID)'
@@ -467,6 +502,10 @@ module PWN
467
502
  comment: 'optional - comment to add or update in the issue (e.g. \"This is a comment\")'
468
503
  )
469
504
 
505
+ issue_resp = #{self}.clone_issue(
506
+ issue: 'required - issue to clone (e.g. Bug, Issue, Story, or Epic ID)'
507
+ )
508
+
470
509
  issue_resp = #{self}.delete_issue(
471
510
  issue: 'required - issue to delete (e.g. Bug, Issue, Story, or Epic ID)'
472
511
  )
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.459'
4
+ VERSION = '0.5.460'
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.459
4
+ version: 0.5.460
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.