Landing pages contain the HTML that is rendered when a target clicks on a Gophish phishing link.
The pages endpoint allows you to create, view, and manage Gophish landing pages.
Table of Contents
This example shows how to retrieve the name of every page in Gophish.
from gophish import Gophish
api_key = 'API_KEY'
api = Gophish(api_key)
for page in api.pages.get():
print page.name
gophish.models.Page
A page contains one or more models.User objects. The page name must be unique.
Attributes
modified_date (optional: datetime.datetime) The scheduled time for page launch
capture_credentials (bool default:False) Whether or not the landing page should capture credentials
capture_passwords (bool default:False) Whether or not the landing page should capture passwords
redirect_url (str) The URL to redirect targets to after they submit data
Methods
__init__(self, **kwargs) - Returns a new Landing Page
Example:
gophish.api.pages.get(page_id=None)
Gets the details for one or more landing pages. To get a particular page, set the ID to the page ID.
If the page_id is not set, all landing pages owned by the current user will be returned.
Returns
If the page is set: models.Page
If page_id is None: list(models.Page)
gophish.api.pages.post(page)
Creates a new landing page. This endpoint requires you to submit a gophish.models.Page object.
Returns
The gophish.models.Page object that was created.
gophish.api.pages.put(page)
Edits an existing landing page. This endpoint requires you to submit an existing gophish.models.Page object with its id attribute set correctly.
Returns
The gophish.models.Page object that was edited.
gophish.api.pages.delete(page_id)
Deletes the page specified by page_id.
Returns
A gophish.models.Status message.
Here are some examples to show how to use the API.
All of these examples assume the following setup:
Get All Landing Pages
Get Single Landing Page
Create New Landing Page