1.1.5.1. campaign_import

This module provides the window through which the user can import King Phisher campaigns from xml files previously exported with the export module.

1.1.5.1.1. Classes

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

Bases: king_phisher.client.gui_utilities.GladeGObject

Display a dialog which allows a new campaign to be created or an existing campaign to be opened.

__init__(*args, **kwargs)[source]
Parameters:application (Gtk.Application) – The parent application for this object.
preprep_xml_data()[source]

This function provides the actions required to see if required IDs are already in the database. If they are not it will clear them out and set subelement.attrib[‘type’] to null. If the element is required it will set it to a default value. This will normalize the data and ready it for import into the database.

remove_import_campaign()[source]

Used to delete the imported campaign on failure or early exit of the import window, if the user selects to have it removed.

select_xml_campaign()[source]

Prompts the user with a file dialog window to select the King Phisher Campaign XML file to import. Validates the file to make sure it is a Campaign exported from King Phisher and is the correct version to import.

signal_entry_change(_)[source]

When there is a change in the campaign entry field it will check to see if the name is already in use. If it is not in use it will change the sensitivity of the button_import_campaign to allow the user to start the import process.

signal_import_button(_)[source]

This will check to see if the campaign information is present. If campaign information is present it will launch an py:class:ImportThread to import the campaign in the background, freeing up the GUI for the user to conduct other functions.

signal_window_delete_event(_, event)[source]

Checks to make sure the import campaign thread is closed before closing the window.