pwn 0.5.459 → 0.5.461

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: bb45913566f80b116f5e5417cc7bd0a8820f8b6b2f15502f7e56bd4ba02b497e
4
+ data.tar.gz: '075462589e7d596c8e92031e661b1e17ef8fb56120d34e370cf6d634e8f14593'
5
5
  SHA512:
6
- metadata.gz: 05506e6cb58d8bf3281f005c9faaf1f81229bddda894cbe49f9a558d1b61a6a2cc7c3ce8dee472c76ef9e80eeb538ad44db533ebfb8ea5ffd38e99179d4a0217
7
- data.tar.gz: 47ea7554ce6277eeb6ce8fb14448f4665849af9150eff0bc45e08e49d331f08f7a8ee09fad43db89556dab2b9fa114d00bf5e1425a13534f21170707bf26b942
6
+ metadata.gz: a73a34aa2f16dab1cfc7b64a694f1568e6e06fc43ce393359cbdc29cf23b4c7b0d4039793f56c44c88a09bf010eb72263e7fc25155e7c7852e0841f5691ee57f
7
+ data.tar.gz: 8e4016fe8fdb0d230fc406f0850a041746526c2a065a58fc737eacd44eb0e5ec8febdf3d52b772b8841e1be6fb229c4e72a3deeca02a8bf6199ea960d996ff5f
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.461]: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.461]: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.461]: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,45 @@ 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
+ # Filter out nil values from the additional fields
409
+ # which can be problematic during issue creation if
410
+ # custom fields aren't in the proper context.
411
+ filtered_fields = issue_data[:fields].compact
412
+ additional_fields = { fields: filtered_fields }
413
+
414
+ create_issue(
415
+ project_key: project_key,
416
+ summary: summary,
417
+ issue_type: issue_type,
418
+ epic_name: epic_name,
419
+ description: description,
420
+ additional_fields: additional_fields
421
+ )
422
+ rescue StandardError => e
423
+ raise e
424
+ end
425
+
387
426
  # Supported Method Parameters::
388
427
  # issue_resp = PWN::Plugins::JiraServer.delete_issue(
389
428
  # issue: 'required - issue to delete (e.g. Bug, Issue, Story, or Epic ID)'
@@ -467,6 +506,10 @@ module PWN
467
506
  comment: 'optional - comment to add or update in the issue (e.g. \"This is a comment\")'
468
507
  )
469
508
 
509
+ issue_resp = #{self}.clone_issue(
510
+ issue: 'required - issue to clone (e.g. Bug, Issue, Story, or Epic ID)'
511
+ )
512
+
470
513
  issue_resp = #{self}.delete_issue(
471
514
  issue: 'required - issue to delete (e.g. Bug, Issue, Story, or Epic ID)'
472
515
  )
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.461'
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.461
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.