Files
Anthropic-Cybersecurity-Skills/skills/performing-red-team-phishing-with-gophish/references/api-reference.md
T
mukul975 27c6414ca5 Add folder anatomy (scripts/agent.py + references/api-reference.md) for 648 cybersecurity skills
Complete skill folder anatomy across all cybersecurity skills:
- scripts/agent.py: 80-150 line Python agents using real libraries (impacket,
  boto3, azure-mgmt-*, kubernetes, pefile, yara, scapy, shodan, stix2, etc.)
- references/api-reference.md: real API documentation with method signatures
- LICENSE: MIT license for all skill folders
2026-03-10 21:02:12 +01:00

1.8 KiB

API Reference: GoPhish Phishing Simulation

Python gophish Library

Constructor

from gophish import Gophish
api = Gophish(api_key, host="https://localhost:3333", verify=False)

Campaigns

api.campaigns.get()                    # List all campaigns
api.campaigns.get(campaign_id=1)       # Get specific campaign
api.campaigns.post(campaign)           # Create and launch campaign
api.campaigns.summary(campaign_id=1)   # Get campaign summary
api.campaigns.delete(campaign_id=1)    # Delete campaign

Templates

api.templates.get()                    # List templates
api.templates.post(template)           # Create template
Template(name="...", subject="...", html="<html>...</html>", text="...")

Groups

api.groups.get()                       # List groups
api.groups.post(group)                 # Create group
Group(name="...", targets=[User(first_name="", last_name="", email="")])

SMTP Profiles

api.smtp.get()
api.smtp.post(smtp)
SMTP(name="...", from_address="...", host="smtp:587", username="", password="")

Landing Pages

api.pages.get()
api.pages.post(page)
Page(name="...", html="...", capture_credentials=True, redirect_url="")

Campaign Model

Campaign(
    name="Q1 Test",
    template=Template(name="Existing Template"),
    page=Page(name="Existing Page"),
    smtp=SMTP(name="Existing Profile"),
    groups=[Group(name="Existing Group")],
    url="https://phish.example.com",
    launch_date="2024-01-15T09:00:00+00:00"  # ISO8601
)

Result Statuses

Status Meaning
Email Sent Email delivered
Email Opened Tracking pixel loaded
Clicked Link Phishing URL clicked
Submitted Data Credentials entered
Reported User reported phishing