-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
54 lines (40 loc) · 1.41 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
from PyQt5.QtWidgets import QLabel, QPushButton, QLineEdit, QFormLayout, QWidget, QApplication
from PyQt5 import QtGui
from PyQt5.QtCore import QSize
from pass_lib import passme_password
import sys
import ctypes
import resources
ID = u'dev.guillerpsanchez.HashCheck-GUI'
ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID(ID)
class App(QWidget):
def __init__(self, parent=None):
super().__init__(parent)
self.setFixedSize(500, 130)
self.setWindowTitle("HasCheck-GUI")
self.response = QLabel(self)
self.response.setText("")
self.send_pass = QPushButton(self)
self.send_pass.setText("Send")
self.send_pass.clicked.connect(self.check_password)
self.inputBox = QLineEdit(self)
layout = QFormLayout()
layout.addWidget(self.response)
layout.addWidget(self.inputBox)
layout.addWidget(self.send_pass)
self.setLayout(layout)
self.show()
def check_password(self):
password = self.inputBox.text()
if passme_password(password) == "F":
self.response.setText("Your password has been filtered.")
else:
self.response.setText("Your password has not been filtered yet.")
def main():
app = QApplication(sys.argv)
a = App()
app.setWindowIcon(QtGui.QIcon(':/icons/icon.png'))
a.show()
sys.exit(app.exec())
if __name__ == "__main__":
main()