cisagov / gophish-tools

Helpful tools for interacting with a GoPhish phishing instance
Creative Commons Zero v1.0 Universal
42 stars 6 forks source link

Update gophish complete #4

Closed bjb28 closed 4 years ago

bjb28 commented 4 years ago

Modified gophish-complete to have improved command line interaction and use the campaign name as an argument.

🗣 Description

To make the command line interaction easier this PR removes the use of the flag auto for passing a campaign identifier to the script. The new method takes the command name as an optional argument which triggers the script to complete the campaign with that name.

Additionally, this PR changes from using the campaign id to campaign name for automatic actions.

💭 Motivation and Context

This change cleans up the command line interface making it easier to understand. It also alters to the use of campaign name which will be a known element at any point in the assessment. If the campaign id was still used, the process requires knowing an identifier that is automatically set by GoPhish.

This PR would resolve #2.

🧪 Testing

A Pytest was created for the get_campaign_id that tests a successful and unsuccessful lookup.

Conducted the following manual tests using gophish-complete and a GoPhish server:

📷 Screenshots (if appropriate)

🚥 Types of Changes

✅ Checklist