Esempio n. 1
0
 def getCommand(self):
     text = JARVIS.getCommand()
     #print(text)
     #threading.Timer(3.0, self.checkCommand).start()
     thread2 = threading.Thread(target=self.checkCommand)
     thread2.setDaemon(True)
     thread2.start()
     return text
Esempio n. 2
0
from JARVIS import JARVIS

jarvis = JARVIS()

while True:

    jarvis.takeCommand()
Esempio n. 3
0
    def saveUrl(self, name, url):
        urlFile = open(r"database/urls.txt", "a+")
        urlFile.write("\n" + name + ' = \"' + url + '\"')
        urlFile.close()

        JARVIS.checkUrls()
Esempio n. 4
0
 def checkCommand(self):
     response = JARVIS.checkCommand()
Esempio n. 5
0
    def saveSel(self, name, usernameSel, passwdSel):
        selFile = open(r"database/urlSelector.txt", "a+")
        selFile.write("\n" + name + ' = ' + usernameSel + ';' + passwdSel)
        selFile.close()

        JARVIS.checkSelectors()
Esempio n. 6
0
    def saveAcc(self, name, username, passwd):
        accFile = open(r"database/accounts.txt", "a+")
        accFile.write("\n" + name + ' = ' + username + ';' + passwd)
        accFile.close()

        JARVIS.checkAccounts()
Esempio n. 7
0
    def saveDir(self, name, dirr):
        dirFile = open(r"database/directories.txt", "a+")
        dirFile.write("\n" + name + ' = \"' + dirr + '\"')
        dirFile.close()

        JARVIS.checkDirectories()
Esempio n. 8
0
import threading
import time
import sys
import random
import webview
from JARVIS import JARVIS
import json

# from webview.platforms.cef import settings
# settings.update({
#     'persist_session_cookies': True
# })

JARVIS = JARVIS()


class Api:
    def checkCreds(self, user, passwd):
        if (user == "r") and (passwd == "r"):
            response = {
                "message": "Redirecting to JARVIS Dashboard.",
                "valid": "yes"
            }

            threading.Timer(0.1, JARVIS.speak, [response["message"]]).start()
            threading.Timer(
                3.0, changeWindow,
                ["templates/index.html", "JARVIS | Dashboard"]).start()

            return response