1.1.3.1. campaign

This module provides the contents of the tab representing the campaign information in client’s graphical interface.

1.1.3.1.1. Classes

class CampaignViewCredentialsTab(*args, **kwargs)[source]

Bases: king_phisher.client.tabs.campaign.CampaignViewGenericTableTab

Display campaign information regarding submitted credentials.

format_node_data(node)[source]

This method is overridden by subclasses to format the raw node data returned from the server. The length of the list must equal the number of columns in the table. This method is called for each node in the remote table by the loader thread.

Parameters:node (dict) – The node from a GraphQL query representing data for this table.
Returns:The formatted row data.
Return type:list
class CampaignViewDashboardTab(*args, **kwargs)[source]

Bases: king_phisher.client.tabs.campaign.CampaignViewGenericTab

Display campaign information on a graphical dash board.

graphs = None[source]

The CampaignGraph classes represented on the dash board.

label_text = 'Dashboard'[source]

The tabs label for display in the GUI.

load_campaign_information(force=True)[source]

Load the necessary campaign information from the remote server. Unless force is True, the last_load_time is compared with the refresh_frequency to check if the information is stale. If the local data is not stale, this function will return without updating the table.

Parameters:force (bool) – Ignore the load life time and force loading the remote data.
loader_idle_routine()[source]

The routine which refreshes the campaign data at a regular interval.

loader_thread_routine()[source]

The loading routine to be executed within a thread.

class CampaignViewDeaddropTab(*args, **kwargs)[source]

Bases: king_phisher.client.tabs.campaign.CampaignViewGenericTableTab

Display campaign information regarding dead drop connections.

format_node_data(connection)[source]

This method is overridden by subclasses to format the raw node data returned from the server. The length of the list must equal the number of columns in the table. This method is called for each node in the remote table by the loader thread.

Parameters:node (dict) – The node from a GraphQL query representing data for this table.
Returns:The formatted row data.
Return type:list
class CampaignViewGenericTab(*args, **kwargs)[source]

Bases: king_phisher.client.gui_utilities.GladeGObject

This object is meant to be subclassed by all of the tabs which load and display information about the current campaign.

label = None[source]

The Gtk.Label representing this tab with text from label_text.

label_text = 'Unknown'[source]

The label of the tab for display in the GUI.

last_load_time = None[source]

The last time the data was loaded from the server.

loader_thread = None[source]

The thread object which loads the data from the server.

loader_thread_lock = None[source]

The threading.Lock object used for synchronization between the loader and main threads.

loader_thread_stop = None[source]

The threading.Event object used to request that the loader thread stop before completion.

refresh_frequency = None[source]

The lifetime in seconds to wait before refreshing the data from the server.

class CampaignViewGenericTableTab(*args, **kwargs)[source]

Bases: king_phisher.client.tabs.campaign.CampaignViewGenericTab

This object is meant to be subclassed by tabs which will display campaign information of different types from specific database tables. The data in this object is refreshed when multiple events occur and it uses an internal timer to represent the last time the data was refreshed.

export_table_to_csv(filtered=False)[source]

Export the data represented by the view to a CSV file.

export_table_to_xlsx_worksheet(worksheet, title_format)[source]

Export the data represented by the view to an XLSX worksheet.

Parameters:
  • worksheet (xlsxwriter.worksheet.Worksheet) – The destination sheet for the store’s data.
  • title_format (xlsxwriter.format.Format) – The formatting to use for the title row.
format_node_data(node)[source]

This method is overridden by subclasses to format the raw node data returned from the server. The length of the list must equal the number of columns in the table. This method is called for each node in the remote table by the loader thread.

Parameters:node (dict) – The node from a GraphQL query representing data for this table.
Returns:The formatted row data.
Return type:list
load_campaign_information(force=True)[source]

Load the necessary campaign information from the remote server. Unless force is True, the last_load_time is compared with the refresh_frequency to check if the information is stale. If the local data is not stale, this function will return without updating the table.

Parameters:force (bool) – Ignore the load life time and force loading the remote data.
loader_thread_routine(store)[source]

The loading routine to be executed within a thread.

Parameters:store (Gtk.ListStore) – The store object to place the new data.
node_query = None[source]

The GraphQL query used to load a particular node from the remote table. This query is provided with a single parameter of the node’s id.

popup_menu = None[source]

The Gtk.Menu object which is displayed when right-clicking in the view area.

table_name = ''[source]

The database table represented by this tab.

table_query = None[source]

The GraphQL query used to load the desired information from the remote table. This query is provided with the following three parameters: campaign, count and cursor.

class CampaignViewMessagesTab(*args, **kwargs)[source]

Bases: king_phisher.client.tabs.campaign.CampaignViewGenericTableTab

Display campaign information regarding sent messages.

format_node_data(node)[source]

This method is overridden by subclasses to format the raw node data returned from the server. The length of the list must equal the number of columns in the table. This method is called for each node in the remote table by the loader thread.

Parameters:node (dict) – The node from a GraphQL query representing data for this table.
Returns:The formatted row data.
Return type:list
class CampaignViewTab(parent, application)[source]

Bases: object

The King Phisher client top-level ‘View Campaign’ tab. This object manages the sub-tabs which display all the information regarding the current campaign.

__init__(parent, application)[source]
Parameters:
  • parent (Gtk.Window) – The parent window for this object.
  • application (Gtk.Application) – The main client application instance.
label = None[source]

The Gtk.Label representing this tabs name.

notebook = None[source]

The Gtk.Notebook for holding sub-tabs.

tabs = None[source]

A dict object holding the sub tabs managed by this object.

class CampaignViewVisitsTab(*args, **kwargs)[source]

Bases: king_phisher.client.tabs.campaign.CampaignViewGenericTableTab

Display campaign information regarding incoming visitors.

format_node_data(node)[source]

This method is overridden by subclasses to format the raw node data returned from the server. The length of the list must equal the number of columns in the table. This method is called for each node in the remote table by the loader thread.

Parameters:node (dict) – The node from a GraphQL query representing data for this table.
Returns:The formatted row data.
Return type:list