def requestSenderThread():
     if self.ui.username.text() and self.ui.email.text():
         try:
             requestRecovery(self.ui.username.text(), self.ui.email.text())
             self.requestSendingCompleted.emit()
         except SecureMessagingException as error:
             self.showMessageBox.emit(strings["errorText"] + responseTranslations[str(error)])
     else:
         self.showMessageBox.emit(strings["missingFieldsErrorText"])
 def forgot(self):
     if self.ui.username.text() and self.ui.email.text():
         try:
             requestRecovery(self.ui.username.text(), self.ui.email.text())
             self.ui.forgot.setText("Request sent")
         except HTTPError as error:
             messageBox = QtGui.QMessageBox(parent=self, text="An error occurred " + str(error))
             messageBox.show()
     else:
         messageBox = QtGui.QMessageBox(parent=self, text="Fill all fields")
         messageBox.show()
Beispiel #3
0
            break
    if found:
        print("OK - Message found in second user")
    else:
        print("FAIL - Message deleted from second user")
        exit()


delRandom(1, 2, messageList12, MESSAGES_1TO2, MESSAGES_2TO1, s1, s2, USER1, USER2)
delRandom(1, 3, messageList13, MESSAGES_1TO3, MESSAGES_3TO1, s1, s3, USER1, USER3)
delRandom(2, 3, messageList23, MESSAGES_2TO3, MESSAGES_3TO2, s2, s3, USER2, USER3)
print("OK")

print("Trying password recovery")
print("Requesting")
requestRecovery(USER1, MAIL1)
requestRecovery(USER2, MAIL2)
requestRecovery(USER3, MAIL3)
print("Ok")
recovered = False
while not recovered:
    try:
        token1 = input("Insert token you received for "+USER1+": ")
        setNewPassword(token1, USER1, "tpass1")
        recovered = True
    except HTTPError as error:
        print("FAIL -", error)
        recovered = False
recovered = False
while not recovered:
    try: