Landing Pages
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
Quick Example
This example shows how to retrieve the name of every page in Gophish.
Models
gophish.models.Page
A page contains one or more models.User
objects. The page name must be unique.
Attributes
id
(int) The page IDhtml
(str) The page HTMLname
(str) The page namemodified_date
(optional: datetime.datetime) The scheduled time for page launchcapture_credentials
(bool default:False) Whether or not the landing page should capture credentialscapture_passwords
(bool default:False) Whether or not the landing page should capture passwordsredirect_url
(str) The URL to redirect targets to after they submit data
Methods
__init__(self, **kwargs)
- Returns a new Landing Page
Example:
Methods
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
isNone
: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.
Examples
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
Last updated