1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- # GPL3 or later
- # Program to have manual input from the computer
- import os
- import json
- import time
- from ui import *
- import youtube
- from getpass import getpass
- import commands
- signed = ""
-
- while True:
-
-
- c = input(clr["tbgr"]+signed+": "+clr["norm"])
- username = signed
-
- with open('stuff.json') as json_file:
- stuff = json.load(json_file)
- if not c and not username:
- continue
-
- if not username and c and "@" not in c:
- print(" Login first!")
- continue
- # Login
- elif c.startswith("@"):
- if c in stuff.get("users", {}):
- if stuff.get("users", {}).get(c, {}).get("password"):
- password = getpass("Password: ")
- if password != stuff.get("users", {}).get(c, {}).get("password"):
- print("Wrong Password!")
- continue
-
- signed = c
-
-
- elif signed and not c:
- signed = ""
- else:
- answer = commands.execute(username, c)
- print(" [ "+clr["tbbu"]+"SENDING"+clr["norm"]+" ] "+answer.replace("\n", "\n "))
-
-
|