From c64fae9c829aa615d24c8baedbc055353b5a7c29 Mon Sep 17 00:00:00 2001 From: sTiKyt Date: Thu, 13 Aug 2020 13:28:29 +0300 Subject: [PATCH] Added way to confirm EULA let's you confirm eula and replace values in eula.txt --- controllers/EULA_controller.py | 22 ++++++++++++++++++++++ views/EULA_view.py | 1 + 2 files changed, 23 insertions(+) diff --git a/controllers/EULA_controller.py b/controllers/EULA_controller.py index 59c6297..d624236 100644 --- a/controllers/EULA_controller.py +++ b/controllers/EULA_controller.py @@ -36,3 +36,25 @@ class EULAController: else: print(EULAView().EULA_messages["eula_is_not_confirmed"]) return False + + def confirm_eula(self): + # FIXME replace those strings with View entries + print(f'{self.license.read()}\nGreat Power Comes With Great Responsibility') + print('\nThe use of the HiddenEye & its resources/phishing-pages is COMPLETE RESPONSIBILITY of the END-USER.') + print('\nDevelopers assume NO liability and are NOT responsible for any damage caused by this program.') + print('\nAlso we want to inform you that some of your actions may be ILLEGAL and you CAN NOT use this ') + print('\nsoftware to test device, company or any other type of target without WRITTEN PERMISSION from them.') + print('\nDo you accept EULA? \nEnter: "I accept EULA" to continue') + answer = input("HiddenEye EULA>> ").lower().replace(" ", "") + if answer == "iaccepteula": + eula_temp_input = open(self.eula, "rt") + eula_temp_data = eula_temp_input.read().replace(EULAView().EULA_messages["eula_start_of_file_unconfirmed"], EULAView().EULA_messages["eula_start_of_file_confirmed"]) + eula_temp_input.close() + eula_temp_input = open(self.eula, "wt") + eula_temp_input.write(eula_temp_data) + eula_temp_input.close() + pass + # TODO add "thanks for confirmation" View entry + else: + exit() + # TODO add "you are not allowed to use HiddenEye" View entry diff --git a/views/EULA_view.py b/views/EULA_view.py index bfb716e..e4864a5 100644 --- a/views/EULA_view.py +++ b/views/EULA_view.py @@ -10,4 +10,5 @@ class EULAView: "eula_not_found": _("EULA isn't found\n Generated new EULA"), "eula_is_invalid": _("EULA is not valid"), "eula_start_of_file_unconfirmed": _("# Please read and accept EULA below\n eula = False"), + "eula_start_of_file_confirmed": _("# Please read and accept EULA below\n eula = True") }