Skip to content

Commit

Permalink
Permitied Password inpyt to only numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
tassosmak committed Dec 2, 2022
1 parent 1dbfb48 commit 3bbae5e
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 8 deletions.
14 changes: 9 additions & 5 deletions UserHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
ask_Password = ""
Dresult = ""
continue_normal = False

correct_pswd_input = False
correct_credentials = False

def _reverse_key(text=''):
Expand Down Expand Up @@ -126,6 +126,8 @@ def _ask(print_ask=False):


def _FTU_init():
correct_pswd_input = False

cmd.CommandSay(answer="Welcome To PyTerminal By Tassos Makrostergios\nDon't Wory it an one time only message ;)\n")
cmd.CommandQuest(type='1', Button1='Personal', Button2='Server', ask_admin_msg='How Do You want to use this instanche?')
#ask_type = input("\n\nHow Do You want to use this instanche?\nPersonal Or Server")
Expand All @@ -140,9 +142,12 @@ def _FTU_init():
cmd.CommandQuest(type='3', quest_msg='What is your name')
ask_first_name = cmd.Quest_result

cmd.CommandQuest(type='3', quest_msg='Type a Password')
_d_encrypt(type='1', input_text=cmd.Quest_result)
ask_first_Password = Dresult
while not correct_pswd_input:
cmd.CommandQuest(type='3', quest_msg='Type a Password Only Numbers Can Be Entered, No Spaces Or Charachters')
if cmd.Quest_result.isdigit():
_d_encrypt(type='1', input_text=cmd.Quest_result)
correct_pswd_input = True



cmd.CommandQuest(type='1' ,ask_admin_msg='there are 2 Modes on this terminal', Button1='The Advanced Mode', Button2='The Basic Mode')
Expand All @@ -159,7 +164,6 @@ def _FTU_init():


edit_json(loc1="user_credentials", loc2="Name", content=ask_first_name)
edit_json(loc1="user_credentials", loc2="Password", content=ask_first_Password)
edit_json(loc1="user_credentials", loc2="Mode", content=ask_first_Mode)
if settings.pl == "1" or settings.pl == "3":
os.system("clear")
Expand Down
3 changes: 2 additions & 1 deletion launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ def boot():
from os import system
system("killall python")
else:
logger.log_error() # <-- temp delete it
if settings.EnableIntSoft:
logger.log_error("IntSoft Enabled")
cmd.CommandSay("There Was An Error", "FAIL")
from os import system
system("killall python")
3 changes: 1 addition & 2 deletions src/Password_Gen.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import string
from random import random, shuffle, choice
import settings
from src import settings

def gen():
print(settings.MODE, "pswd")
characters = list(string.ascii_letters + string.digits + "!@#$%^&*()")
length = int(input("How long do you want your password to be:"))
shuffle(characters)
Expand Down
Binary file modified src/__pycache__/Password_Gen.cpython-39.pyc
Binary file not shown.
Binary file modified src/__pycache__/Server.cpython-39.pyc
Binary file not shown.
Binary file modified src/__pycache__/client.cpython-39.pyc
Binary file not shown.

0 comments on commit 3bbae5e

Please sign in to comment.