Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge new version #7

Merged
merged 2 commits into from
Dec 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified Encryptext (DEBUG).exe
Binary file not shown.
16 changes: 7 additions & 9 deletions Encryptext.pyw
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import traceback
import webbrowser
from cryptography.fernet import Fernet


# Used for getting files when using one-file mode .exe format
def getTrueFilename(filename):
try:
Expand Down Expand Up @@ -46,10 +45,10 @@ font_type = "Arial"
max_font_size = 96
min_font_size = 8

# Uses random 30 character strings to determine where formatting starts and stops
format_item_separator = "15df8933cab3df434da7d0f13ad54a"
format_separator = "97391e7d85dc6407899136965491b5"
format_string = "e2af2ac41b58bf99587e5a078e4ba3"
# Uses random random-length strings of characters to determine where formatting starts and stops# FORMAT ITEM SEPARATOR HERE
format_item_separator = ''# FORMAT ITEM SEPARATOR HERE# FORMAT SEPARATOR HERE
format_separator = ''# FORMAT SEPARATOR HERE# FORMAT STRING HERE
format_string = ''# FORMAT STRING HERE

supported_file_types = [
("Encryptext", "*.etx"),
Expand All @@ -65,10 +64,9 @@ supported_file_types = [
("Log File", "*.log"),
("All Files", "*.*"),
]

# ENCRYPTION KEY HERE
encrypt_key = b''
# ENCRYPTION KEY HERE
encrypt_key = b''# ENCRYPTION KEY HERE

if debug:
encrypt_key = Fernet.generate_key()
fernet = Fernet(encrypt_key)
Expand Down Expand Up @@ -168,7 +166,7 @@ def openFile(Event=None, current=False):
else:
file = file.decode()

# Look through the text and get all the formatting
# Split the formatting and the visible text
file = file.split(format_string)

# Go through the formats and remove duplicates
Expand Down
Binary file modified installer.exe
Binary file not shown.
54 changes: 52 additions & 2 deletions installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
from time import sleep
from subprocess import check_call
from cryptography.fernet import Fernet as F
from random import choice, randint
from string import ascii_letters, digits
import threading as t

print("\nStarting installer...")
Expand Down Expand Up @@ -34,14 +36,62 @@ def getTrueFilename(filename):
key_line = "'".join(key_line)
file[1] = key_line

text = "\n".join(file)
text = "".join(file)

print("Encryption key created!")

possible_characters = ascii_letters + digits

# Find where the format item separator string is stored in the file
file = text.split("# FORMAT ITEM SEPARATOR HERE")

# Create a format item separator string
format_item_separator = "".join([choice(possible_characters) for i in range(randint(15, 45))])
# Add the format item separator string to the file
key_line = file[1]
key_line = key_line.split("'")
key_line[1] = format_item_separator
key_line = "'".join(key_line)
file[1] = key_line

text = "".join(file)

# Find where the format separator string is stored in the file
file = text.split("# FORMAT SEPARATOR HERE")

# Create a format separator string
format_separator = "".join([choice(possible_characters) for i in range(randint(15, 45))])

# Add the format separator string to the file
key_line = file[1]
key_line = key_line.split("'")
key_line[1] = format_separator
key_line = "'".join(key_line)
file[1] = key_line

text = "".join(file)

# Find where the format string is stored in the file
file = text.split("# FORMAT STRING HERE")

# Create a format string
format_string = "".join([choice(possible_characters) for i in range(randint(15, 45))])

# Add the format string to the file
key_line = file[1]
key_line = key_line.split("'")
key_line[1] = format_string
key_line = "'".join(key_line)
file[1] = key_line

text = "".join(file)

# Write the file back to the Encryptext.py file
file = open(getTrueFilename("Encryptext-User.pyw"), "w", encoding="utf8")
file.write(text)
file.close()

print("Encryption key created!")
print("Format strings created!")
print("Creating custom program...\n\n")

# Creates an executable file
Expand Down