1.1.3.2. mail¶
This module provides the contents of the tab used to create and send messages as part of a campaign.
1.1.3.2.1. Functions¶
1.1.3.2.2. Classes¶
-
class
MailSenderConfigurationTab(*args, **kwargs)[source]¶ Bases:
king_phisher.client.gui_utilities.GladeGObjectThis is the tab which allows the user to configure and set parameters for sending messages as part of a campaign.
-
class
MailSenderEditTab(*args, **kwargs)[source]¶ Bases:
king_phisher.client.gui_utilities.GladeGObjectThis is the tab which adds basic text edition for changing an email template.
-
save_html_file(force_prompt=False)[source]¶ Save the contents from the editor into an HTML file if one is configured otherwise prompt to user to select a file to save as. The user may abort the operation by declining to select a file to save as if they are prompted to do so.
Parameters: force_prompt – Force prompting the user to select the file to save as. Return type: bool Returns: Whether the contents were saved or not.
-
textbuffer= None[source]¶ The
Gtk.TextBufferused by the :py:attr:textview` attribute.
-
textview= None[source]¶ The
Gtk.TextViewobject of the editor.
-
-
class
MailSenderPreviewTab(application)[source]¶ Bases:
objectThis tab uses the WebKit engine to render the HTML of an email so it can be previewed before it is sent.
-
__init__(application)[source]¶ Parameters: application ( KingPhisherClientApplication) – The application instance.
-
load_html_file()[source]¶ Load the configured HTML file into the WebKit engine so the contents can be previewed.
-
webview= None[source]¶ The
WebKitHTMLViewobject used to render the message HTML.
-
-
class
MailSenderSendTab(*args, **kwargs)[source]¶ Bases:
king_phisher.client.gui_utilities.GladeGObjectThis allows the
MailSenderThreadobject to be managed by the user through the GUI. These two classes are very interdependent-
notify_sent(emails_done, emails_total)[source]¶ A call back use by
MailSenderThreadto notify when an email has been successfully sent to the SMTP server.Parameters:
-
notify_status(message)[source]¶ A call back use by
MailSenderThreadto update general status information.Parameters: message (str) – The status message.
-
notify_stopped()[source]¶ A callback used by
MailSenderThreadto notify when the thread has stopped.
-
precheck_routines= ('settings', 'attachment', 'required-files', 'campaign', 'url', 'source', 'spf')[source]¶ The built-in precheck routines that are executed before sending messages.
-
progressbar= None[source]¶ The
Gtk.ProgressBarinstance which is used to display progress of sending messages.
-
sender_start_failure(message=None, text=None, retry=False)[source]¶ Handle a failure in starting the message sender thread and perform any necessary clean up.
Parameters: - message (text) – A message to shown in an error popup dialog.
- message – A message to be inserted into the text buffer.
- retry (bool) – The operation will be attempted again.
-
sender_thread= None[source]¶ The
MailSenderThreadinstance that is being used to send messages.
-
text_insert(message)[source]¶ Insert text into the
textbuffer.Parameters: message (str) – The text to insert.
-
textbuffer= None[source]¶ The
Gtk.TextBufferinstance associated withtextview.
-
textview= None[source]¶ The
Gtk.TextViewobject that renders text status messages.
-
-
class
MailSenderTab(parent, application)[source]¶ Bases:
GObject.GObjectThe King Phisher client top-level ‘Send Messages’ tab. This object manages the sub-tabs which display useful information for configuring, previewing and sending messages as part of a campaign.
GObject Signals: Mail Tab Signals -
__init__(parent, application)[source]¶ Parameters: - parent (
Gtk.Window) – The parent window for this object. - application (
Gtk.Application) – The main client application instance.
- parent (
-
export_message_data(path=None)[source]¶ Gather and prepare the components of the mailer tab to be exported into a King Phisher message (KPM) archive file suitable for restoring at a later point in time. If path is not specified, the user will be prompted to select one and failure to do so will prevent the message data from being exported. This function wraps the emission of the
message-data-exportsignal.Parameters: path (str) – An optional path of where to save the archive file to. Returns: Whether or not the message archive file was written to disk. Return type: bool
-
import_message_data()[source]¶ Process a previously exported message archive file and restore the message data, settings, and applicable files from it. This function wraps the emission of the
message-data-importsignal.Returns: Whether or not the message archive file was loaded from disk. Return type: bool
-
notebook= None[source]¶ The
Gtk.Notebookfor holding sub-tabs.
-