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:
used both --summary and --complete to ensure the user was prompted for an assessment id followed by the user selecting a campaign from a list.
used CAMPAIN_NAME with --summary and --complete to ensure the desired campaign was completed or summarized.
Both tests above were conducted with non-existent assessments and campaigns to ensure the expected errors were produced.
📷 Screenshots (if appropriate)
🚥 Types of Changes
[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[X] Breaking change (causes existing functionality to change)
✅ Checklist
[x] My code follows the code style of this project.
[x] My change requires a change to the documentation.
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:--summary
and--complete
to ensure the user was prompted for an assessment id followed by the user selecting a campaign from a list.CAMPAIN_NAME
with--summary
and--complete
to ensure the desired campaign was completed or summarized.📷 Screenshots (if appropriate)
🚥 Types of Changes
✅ Checklist