Esempio n. 1
0
def fun():
    global a
    ids = m1.get()
    passw = m2.get()

    if b.execute("select * from emp where id={} and pass='******'".format(
            ids, passw)):
        Label(a, text="Access Granted..").grid(row=6, column=1)

        res = b.fetchall()
        for row in res:
            ename = row[0]
            eid = row[1]
            epass = row[2]
            erole = row[3]
            ebal = row[4]
        if (erole == 'user'):
            a.withdraw()
            user(eid, epass, a)
        elif (erole == 'admin'):
            a.withdraw()
            admin(eid, epass, a)
        elif (erole == 'librarian'):
            a.withdraw()
            librarian(eid, epass, a)
    else:
        Label(a, text="Wrong Details!!! Try Again...").grid(row=6, column=2)
    x = datetime.datetime.now()
    x = str(x)
    x = x.split()
    b.execute(
        "delete from transdata where date1 < DATE_SUB('{}',INTERVAL 6 MONTH)".
        format(x[0]))
    a1.commit()
    a1.close()
Esempio n. 2
0
def login():
    cur.execute("select * from users where username = ? and password = ?",
                (user.get(), password.get()))
    if cur.fetchone() is None:
        Error_404()
    else:
        cur.execute("select * from users where username = ? and password = ?",
                    (user.get(), password.get()))
        for i in cur:
            if i.role == "admin":
                root.destroy()
                admin(con, cur)
            elif i.role == "student":
                root.destroy()
                prostd(i.username, i.role, con, cur)
            elif i.role == "prof":
                root.destroy()
                prostd(i.username, i.role, con, cur)
            elif i.role == "lib":
                root.destroy()
                Lib(con, cur)
Esempio n. 3
0
def Controller():
    mode = initialization()

    userID = 0
    userName = ""
    userSession = -1

    while 1:
        if mode == "NORMAL":
            mode = normal()

        elif mode == "AUTH":
            userList = auth(
            )  # auth() returns a list of the form [ID, Name, Session - True/False, Mode - Read/Set]
            userID = userList[0]
            userName = userList[1]
            userSession = userList[2]
            mode = userList[3]

        elif mode == "READ":
            readList = read(
                userID, userSession
            )  # read(userID, userSession) returns a list of the form [Session, Mode]
            userSession = readList[0]
            if userSession == False:
                userID = 0
                userName = ""
                mode = readList[1]

            else:
                mode = "READ"

        elif mode == "SET":
            setList = set(
                userID, userSession
            )  # set(userID, userSession) returns a list of the form [Session, Mode]
            userSession = setList[0]
            if userSession == False:
                userID = 0
                userName = ""
                mode = setList[1]

            else:
                mode = "SET"

        elif mode == "TEACHER":
            mode = teacher()

        elif mode == "ADMIN":
            mode = admin()
Esempio n. 4
0
def Controller:
	mode = initialization()
	
	userID = 0
	userName = ""
	userSession
	
	while 1:
		if mode == "NORMAL":
			mode = normal()
		
		elif mode == "AUTH":
			userList = auth() # auth() returns a list of the form [ID, Name, Session - True/False, Mode - Read/Set]
			userID = userList[0]
			userName = userList[1]
			userSession = userList[2]
			mode = userList[3]
			
		elif mode == "READ":
			readList = read(userID, userSession)# read(userID, userSession) returns a list of the form [Session, Mode]
			userSession = readList[0]
			if userSession == False:
				userID = 0
				userName = ""				
				mode = readList[1]
				
			else:
				mode = "READ"
		
		elif mode == "SET":
			setList = set(userID, userSession)			# set(userID, userSession) returns a list of the form [Session, Mode]
			userSession = setList[0]
			if userSession == False:
				userID = 0
				userName = ""				
				mode = setList[1]
				
			else:
				mode = "SET"
		
		
		elif mode == "TEACHER":
			mode = teacher()
			
		elif mode == "ADMIN":
			mode = admin()
Esempio n. 5
0
    def loginOnClick(self):
        username = self.nameEntry.get()
        password = self.pwordEntry.get()
            
        if (username == "admin" and password == "admin"):
            self.destroy()
            newScreen = admin()
            return

        flag = False
        dataBase = sql()
        for row in dataBase.findAccount(username, password):
            self.destroy()
            newScreen = customer(username)
            flag = True
        
        # if (flag):
        #     resultLabel = Label(self, text="Login Succesfully", font=("Calibri", 11), bg="skyblue", fg="red", padx=5, pady=5).grid(row=6, column=2)

        if (flag == False):
            resultLabel = Label(self, text="Invalid username or password", font=("Calibri", 11), bg=BACKGROUND, fg="red", padx=5, pady=5).grid(row=6, column=2)
Esempio n. 6
0
from sync_database import *
from admin import *
from user import *


if __name__ == '__main__':
    sync_from_user()
    sync_from_main()
    sync_from_age()
    while True:
        print("\n\n******* WELCOME ********\n1.USER\n2.ADMIN\n3.EXIT")
        choice = check_input("enter the option :", 1)
        if choice == 1:
            user()
        elif choice == 2:
            admin()
            sync_to_main()
        elif choice == 3:
            print("***Thank You***")
            exit(0)
        else:
            print("---re_enter the choice_____")
            continue
Esempio n. 7
0
def tritymain():
    while True:
        try:
            main = raw_input('' + G + '' + color.BOLD + color.UNDERLINE +
                             'Tri>' + color.END)
            if main in swear:
                print("" + R + "[!] " + color.UNDERLINE + "\033[91m" +
                      "Watch your language!" + color.END)
            elif main in spell:
                print("" + R + "[!] " + color.UNDERLINE + "\033[91m" +
                      "Do you know how to spell?!" + color.END)
            elif main == "joke":
                joke()
            elif main == "info":
                info()
            elif main == "help":
                print "" + W + "+----------------------------+"
                print "" + C + "help " + W + "- displays this help message"
                print "" + C + "clear " + W + "- clears the screen"
                print "" + C + "exit " + W + "- exits tool"
                print "" + C + "tool " + W + "- displays info about the tool"
                print "" + C + "info " + W + "- displays computer and network info"
                print "" + C + "cd " + W + "- change working directories"
                print "" + W + "+----------------------------+"
                print "" + P + "speak " + W + "- text to speech"
                print "" + P + "ping " + W + "- ping a host"
                print "" + P + "banner " + W + "- print a new banner"
                print "" + P + "joke " + W + "- tell a joke"
                print "" + P + "quote " + W + "- print a quote"
                print "" + P + "contact " + W + "- contact me"
                print "" + W + "+----------------------------+"
                print "" + R + "website " + W + "- enter a website and get its ip"
                print "" + R + "clone" + W + " - clone a websites source "
                print "" + R + "whois" + W + " - whois a website"
                print "" + R + "web" + W + " - extract info from a website"
                print "" + R + "siteexists" + W + " - check if a site exists"
                print "" + R + "google" + W + " - find google results for a query"
                print "" + W + "+----------------------------+"
                print "" + G + "ip " + W + "- geolocate an ip"
                print "" + W + "+----------------------------+"
                print "" + O + "xss " + W + "- simple check for a xss vulnerability"
                print "" + O + "sql " + W + "- basic check for a sql vulnerability"
                print "" + O + "admin " + W + "- scan a website for its admin panel"
                print "" + W + "+----------------------------+"
                print "" + T + "email " + W + "- bomb an email address"
                print "" + T + "spoof email " + W + "- spoof an email address"
                print "" + T + "anonymous " + W + "- send an anonymous email"
                print "" + T + "sms" + W + " - spam text messages "
                print "" + T + "twitter" + W + " - check the details of a twitter account"
                print "" + W + "+----------------------------+"
                print color.CYAN + "craft" + W + " - generate useful scripts "
                print color.CYAN + "qr" + W + " - generate a qr code"
                print color.CYAN + "zip" + W + " - crack a password-protected zip file"
                print "" + W + "+----------------------------+"
                print color.BLUE + "encode base64" + W + " - text to base64"
                print color.BLUE + "decode base64" + W + " - base64 to text"
                print color.BLUE + "encode hex" + W + " - text to hex"
                print color.BLUE + "decode hex" + W + " - hex to text"
                print "" + W + "+----------------------------+"
            elif main == "sms":
                sms()
            elif main == "xss":
                xss()
            elif main == "sql":
                sql()
            elif main == "anonymous":
                anon()
            elif main == "encode base64":
                encode()
            elif main == "decode base64":
                decode()
            elif main == "email":
                smtp()
            elif main == "quote":
                quote()
            elif main == "spoof email":
                spoofemail()
            elif main == "zip":
                zipfile()
            elif main == "decode hex":
                decode1()
            elif main == "encode hex":
                encode1()
            elif main == "google":
                googleSearch()
            elif main == "web":
                web()
            elif main == "siteexists":
                siteexists()
            elif main == "qr":
                gen_qrcode()
            elif main == "twitter":
                twitter()
            elif main == "anonymous":
                anon()
            elif main == "contact":
                print('' + T + '' + color.UNDERLINE + 'Skype:' + W + '' +
                      color.BOLD + ' [email protected]' + color.END)
                print('' + T + '' + color.UNDERLINE + 'Instagram:' + W + '' +
                      color.BOLD + ' @_t0x1c - www.instagram.com/_t0x1c' +
                      color.END)
                print('' + T + '' + color.UNDERLINE + 'Email me:' + W + '' +
                      color.BOLD + ' [email protected]' + color.END)
                print('' + T + '' + color.UNDERLINE + 'XMPP:' + W + '' +
                      color.BOLD + ' [email protected]' + color.END)
                print('' + T + '' + color.UNDERLINE + 'Twitter:' + W + '' +
                      color.BOLD + ' @toxicnull' + color.END)
            elif main == "ping":
                while True:
                    hostname = raw_input('' + T + '' + color.UNDERLINE +
                                         'Host>' + color.END)
                    os.system("ping " + hostname)
            elif main == "craft":
                while True:
                    table()
            elif main == "whois":
                whoisweb()
            elif main == "admin":
                admin()
            elif main == "banner":
                os.system('clear')
                banner()
                banner1()
            elif main == "speak":
                while True:
                    speak = raw_input('' + T + '' + color.UNDERLINE +
                                      'What to say>' + color.END)
                    os.system('espeak "' + speak + '"')
            elif main == "clone":
                clone()
            elif main == "cd":
                try:
                    path = raw_input('' + T + '' + color.UNDERLINE +
                                     'Directory>' + color.END)
                    os.chdir(path)
                except OSError:
                    print("" + R + "[!] " + color.UNDERLINE + "\033[91m" +
                          "That is not a directory!" + color.END)
            elif main == "tool":
                print(color.UNDERLINE + '' + C + 'Version: ' + (VersionNum) +
                      color.END)
                print(color.UNDERLINE + '' + C + '34 options to choose from!' +
                      color.END)
                print(color.UNDERLINE + '' + C +
                      'Time spent on it: 76 hours - 14 minutes' + color.END)
                print(color.UNDERLINE + '' + C + 'toxic is a sp00ky h4ck3r' +
                      color.END)
            elif main == "website":
                while True:
                    a = raw_input('' + T + '' + color.UNDERLINE + 'Website>' +
                                  color.END)
                    try:
                        print socket.gethostbyname(a)
                    except socket.gaierror:
                        print("" + R + "[!] " + color.UNDERLINE + "\033[91m" +
                              "Apparently host is unknown! :/" + color.END)
            elif main == "ip":
                ip = raw_input('' + T + '' + color.UNDERLINE + 'IP>' +
                               color.END)
                if ip is None or ip == "":
                    sys.exit("" + R + "[!] " + color.UNDERLINE + "\033[91m" +
                             "Please enter an IP!" + color.END)
                reversed_dns = socket.getfqdn(ip)
                geoip = urllib.urlopen(
                    'http://api.hackertarget.com/geoip/?q=' +
                    ip).read().rstrip()
                print("" + G + "[*] " + color.UNDERLINE + "\033[91m" +
                      "IP Info" + color.END)
                print geoip
            elif main == "clear":
                os.system('clear')
            elif main == "exit":
                print("" + G + "[*] " + color.UNDERLINE + "\033[91m" +
                      "Exiting..." + color.END)
                print("" + G + "[*] " + color.UNDERLINE + "\033[92m" +
                      "GoodBye!" + color.END)
                time.sleep(0.2)
                sys.exit()
            elif main == "":
                print("" + R + "[!] " + color.UNDERLINE + "\033[91m" +
                      "Please enter an option!" + color.END)
            else:
                print("" + R + "[!] " + color.UNDERLINE + "\033[91m" +
                      "That is not an option!" + color.END)
        except KeyboardInterrupt:
            print("" + R + "[!] " + color.UNDERLINE + "\033[91m" +
                  "\nCtrl-C Pressed! Use 'exit' to close the tool!" +
                  color.END)
            tritymain()
Esempio n. 8
0
def tritymain():
    while True:
        try:
            main = raw_input('' + G + '' + color.BOLD + color.UNDERLINE +
                             'Tri>' + color.END)
            if main in swear:
                print("" + R + "[!] " + color.UNDERLINE + "\033[91m" +
                      "Watch your language!" + color.END)
            elif main in spell:
                print("" + R + "[!] " + color.UNDERLINE + "\033[91m" +
                      "Do you know how to spell?!" + color.END)
            elif main == "joke":
                joke()
            elif main == "info":
                info()
            elif main == "help":
                print "" + W + "+----------------------------+"
                print "" + C + "help " + W + "- displays this help message"
                print "" + C + "clear " + W + "- clears the screen"
                print "" + C + "exit " + W + "- exits tool"
                print "" + C + "tool " + W + "- displays info about the tool"
                print "" + C + "info " + W + "- displays computer and network info"
                print "" + C + "cd " + W + "- change working directories"
                print "" + C + "ls " + W + "- see files in working directory"
                print "" + W + "+----------------------------+"
                print "" + P + "echo " + W + "- echo given words"
                print "" + P + "speak " + W + "- text to speech"
                print "" + P + "ping " + W + "- ping a host"
                print "" + P + "banner " + W + "- print a new banner"
                print "" + P + "joke " + W + "- tell a joke"
                print "" + P + "quote " + W + "- print a quote"
                print "" + P + "contact " + W + "- contact me"
                print "" + W + "+----------------------------+"
                print "" + R + "website " + W + "- enter a website and get its ip"
                print "" + R + "clone" + W + " - clone a websites source "
                print "" + R + "whois" + W + " - whois a website"
                print "" + R + "web" + W + " - extract info from a website"
                print "" + R + "siteexists" + W + " - check if a site exists"
                print "" + R + "google" + W + " - find google results for a query"
                print "" + R + "clickjacking" + W + " - test websites for clickjacking vulnerability"
                print "" + W + "+----------------------------+"
                print "" + G + "ip " + W + "- geolocate an ip"
                print "" + W + "+----------------------------+"
                print "" + O + "spoof mac" + W + " - spoof mac address"
                print "" + W + "+----------------------------+"
                print "" + T + "email " + W + "- bomb an email address"
                print "" + T + "spoof email " + W + "- spoof an email address"
                print "" + T + "sms" + W + " - spam text messages "
                print "" + T + "crack" + W + " - bruteforce an email"
                print "" + T + "anonymous" + W + " - send an anonymous email"
                print "" + T + "facebook" + W + " - bruteforce a facebook account"
                print "" + T + "twitter" + W + " - check the details of a twitter account"
                print "" + W + "+----------------------------+"
                print color.CYAN + "craft" + W + " - generate useful scripts "
                print color.CYAN + "qr" + W + " - generate a qr code"
                print color.CYAN + "zip" + W + " - crack a password-protected zip file"
                print "" + W + "+----------------------------+"
                print color.BLUE + "encode base64" + W + " - text to base64"
                print color.BLUE + "decode base64" + W + " - base64 to text"
                print color.BLUE + "encode hex" + W + " - text to hex"
                print color.BLUE + "decode hex" + W + " - hex to text"
                print "" + W + "+----------------------------+"
            elif main == "spoof mac":
                print "" + C + "1 - Random MAC address"
                print "" + C + "2 - Set MAC address"
                print "" + C + "3 - See available addresses"
                while True:
                    spoofmac = raw_input('' + G + '' + color.UNDERLINE +
                                         'Tri>Spoof>' + color.END)
                    if spoofmac == "1":
                        try:
                            inter = raw_input('' + T + '' + color.UNDERLINE +
                                              'Interface>' + color.END)
                            os.system('spoof-mac.py randomize ' + inter)
                            print "" + G + "[*] Done! " + C + "To change you MAC Address back to your original, restart your computer\n or set your MAC address to your original"
                        except:
                            print("" + R + "[!] " + color.UNDERLINE +
                                  "\033[91m" +
                                  "Oops.... Something went wrong!" + color.END)
                    elif spoofmac == "2":
                        try:
                            inter = raw_input('' + T + '' + color.UNDERLINE +
                                              'Interface>' + color.END)
                            setmac = raw_input('' + T + '' + color.UNDERLINE +
                                               'New MAC>' + color.END)
                            os.system('spoof-mac.py set ' + setmac + ' ' +
                                      inter)
                            print "" + C + "Keep in mind you won't have internet during the time of your spoofed MAC!"
                            print "" + G + "[*] Done!" + C + " To change you MAC Address back to your original, restart your computer\n or set your MAC address to your original"
                        except:
                            print("" + R + "[!] " + color.UNDERLINE +
                                  "\033[91m" +
                                  "Oops... Something went wrong!" + color.END)
                    elif spoofmac == "3":
                        os.system('spoof-mac.py list')
                    else:
                        print("" + R + "[!] " + color.UNDERLINE + "\033[91m" +
                              "That is not an option!" + color.END)

            elif main == "sms":
                sms()
            elif main == "encode base64":
                encode()
            elif main == "decode base64":
                decode()
            elif main == "email":
                smtp()
            elif main == "quote":
                quote()
            elif main == "spoof email":
                spoofemail()
            elif main == "zip":
                zipfile()
            elif main == "decode hex":
                decode1()
            elif main == "encode hex":
                encode1()
            elif main == "google":
                googleSearch()
            elif main == "web":
                web()
            elif main == "clickjacking":
                clickjacking()
            elif main == "siteexists":
                siteexists()
            elif main == "qr":
                gen_qrcode()
            elif main == "twitter":
                twitter()
            elif main == "crack":
                gmail()
            elif main == "anonymous":
                anon()
            elif main == "contact":
                print('' + T + '' + color.UNDERLINE + 'Skype:' + W + '' +
                      color.BOLD + ' infamouzgaming' + color.END)
                print('' + T + '' + color.UNDERLINE + 'Instagram:' + W + '' +
                      color.BOLD + ' @_t0x1c - www.instagram.com/_t0x1c' +
                      color.END)
                print('' + T + '' + color.UNDERLINE + 'Email me:' + W + '' +
                      color.BOLD + ' [email protected]' + color.END)
                print('' + T + '' + color.UNDERLINE + 'XMPP:' + W + '' +
                      color.BOLD + ' [email protected]' + color.END)
            elif main == "ping":
                while True:
                    hostname = raw_input('' + T + '' + color.UNDERLINE +
                                         'Host>' + color.END)
                    os.system("ping " + hostname)
            elif main == "craft":
                while True:
                    table()
            elif main == "facebook":
                facebook()
            elif main == "whois":
                whoisweb()
            elif main == "admin":
                admin()
            elif main == "banner":
                os.system('clear')
                banner()
                banner1()
            elif main == "speak":
                while True:
                    speak = raw_input('' + T + '' + color.UNDERLINE +
                                      'What to say>' + color.END)
                    os.system('espeak "' + speak + '"')
            elif main == "echo":
                while True:
                    echo = raw_input('' + T + '' + color.UNDERLINE +
                                     'What to echo>' + color.END)
                    os.system('echo ' + echo)
            elif main == "clone":
                clone()
            elif main == "cd":
                try:
                    path = raw_input('' + T + '' + color.UNDERLINE +
                                     'Directory>' + color.END)
                    os.chdir(path)
                except OSError:
                    print("" + R + "[!] " + color.UNDERLINE + "\033[91m" +
                          "That is not a directory!" + color.END)
            elif main == "ls":
                os.system('ls')
            elif main == "tool":
                print(color.UNDERLINE + '' + C + 'Version: 3.0.1' + color.END)
                print(color.UNDERLINE + '' + C +
                      'Time spent on it: 74 hours - 21 minutes' + color.END)
                print(color.UNDERLINE + '' + C + 'toxic is a sp00ky h4ck3r' +
                      color.END)
            elif main == "website":
                while True:
                    a = raw_input('' + T + '' + color.UNDERLINE + 'Website>' +
                                  color.END)
                    try:
                        print socket.gethostbyname(a)
                    except socket.gaierror:
                        print("" + R + "[!] " + color.UNDERLINE + "\033[91m" +
                              "Apparently host is unknown! :/" + color.END)
            elif main == "ip":
                ip = raw_input('' + T + '' + color.UNDERLINE + 'IP>' +
                               color.END)
                if ip is None or ip == "":
                    sys.exit("" + R + "[!] " + color.UNDERLINE + "\033[91m" +
                             "Please enter an IP!" + color.END)
                reversed_dns = socket.getfqdn(ip)
                geoip = urllib.urlopen(
                    'http://api.hackertarget.com/geoip/?q=' +
                    ip).read().rstrip()
                print("" + G + "[*] " + color.UNDERLINE + "\033[91m" +
                      "IP Info" + color.END)
                print geoip
            elif main == "clear":
                os.system('clear')
            elif main == "exit":
                print("" + G + "[*] " + color.UNDERLINE + "\033[91m" +
                      "Exiting..." + color.END)
                print("" + G + "[*] " + color.UNDERLINE + "\033[92m" +
                      "GoodBye!" + color.END)
                time.sleep(0.2)
                sys.exit()
            elif main == "":
                print("" + R + "[!] " + color.UNDERLINE + "\033[91m" +
                      "Please enter an option!" + color.END)
            else:
                print("" + R + "[!] " + color.UNDERLINE + "\033[91m" +
                      "That is not an option!" + color.END)
        except KeyboardInterrupt:
            print "\n"
            tritymain()
Esempio n. 9
0
 if (name == "admin" and password == "pass"):
     tg = False
     while tg != True:
         print(
             "1.Press 1 for displaying inventory for all medicines and their availability."
         )
         print("2.Press 2 to check all user details.")
         print("3.Press 3 to check the order queue right now.")
         print("4.Press 4 to check expiry dates of medicines.")
         print(
             "5.Press 5 to check medicines sold between a certain timeframe."
         )
         print("6.Press 6 to order stock.")
         print("7.Press 7 to logout.")
         choice2 = int(input("Enter choice:"))
         obj = admin()
         if choice2 == 1:
             obj.checkInventory()
         elif choice2 == 2:
             obj.printUserDetails()
         elif choice2 == 3:
             obj.printorderqueue()
         elif choice2 == 4:
             obj.checkexpirydates()
         elif choice2 == 5:
             obj.checkmedicinessold()
         elif choice2 == 6:
             obj.stockOrder()
         elif choice2 == 7:
             tg = True
         else:
Esempio n. 10
0
from multinational import *
from directeur import *
from admin import *
from ingeJunior import *
from ingeSenior import *

ENT = multinational("RCAT", "France")
F1 = filiale("RCTA-Belgique", "Belgique", 2000)
F2 = filiale("RCTA-Maroc", "Maroc", 2010)
F3 = filiale("RCTA-Tunisie", "Tunisie", 1950)
F4 = filiale("RCTA-Angleterre", "Angleterre", 2005)
ENT.addFiliale(F1)
ENT.addFiliale(F2)
ENT.addFiliale(F3)
ENT.addFiliale(F4)
D1 = directeur(1960, "Jambon", "Beur", 8, 210)
F3.addSalarie(D1)
A1 = admin("RH", 2003, 562, "Jean", "Michel", 2, 300)
IJ1 = ingeJunior(4, 50, 64, 2005, 809, "Will", "Fred", 7, 230)
F1.addSalarie(A1)
F1.addSalarie(IJ1)
IS1 = ingeSenior("responsable prod", 800, 6050, 2000, 9004, "Jean", "Hugue", 9,
                 126)
F2.addSalarie(IS1)

ENT.afficher()
Esempio n. 11
0
 def fire1(self):
     admin()
Esempio n. 12
0
def tritymain():
    while True:
        try:
            main = raw_input(''+G+'' + color.BOLD + color.UNDERLINE + 'Tri>' + color.END)
            if main in swear:
                print(""+R+"[!] " + color.UNDERLINE + "\033[91m" + "Watch your language!" + color.END)
	    elif main in spell:
                print(""+R+"[!] " + color.UNDERLINE + "\033[91m" + "Do you know how to spell?!" + color.END)
            elif main == "joke":
                joke()
            elif main == "info":
                info()
            elif main == "help":
                print ""+W+"+----------------------------+"
                print ""+C+"help "+W+"- displays this help message"
                print ""+C+"clear "+W+"- clears the screen"
                print ""+C+"exit "+W+"- exits tool"
                print ""+C+"tool "+W+"- displays info about the tool"
                print ""+C+"info "+W+"- displays computer and network info"
                print ""+C+"cd "+W+"- change working directories"
                print ""+C+"ls "+W+"- see files in working directory"
                print ""+W+"+----------------------------+"
                print ""+P+"speak "+W+"- text to speech"
                print ""+P+"ping "+W+"- ping a host"
                print ""+P+"banner "+W+"- print a new banner"
                print ""+P+"joke "+W+"- tell a joke"
                print ""+P+"quote "+W+"- print a quote"
                print ""+P+"contact "+W+"- contact me"
                print ""+W+"+----------------------------+"
                print ""+R+"website "+W+"- enter a website and get its ip"
	        print ""+R+"clone"+W+" - clone a websites source "
	        print ""+R+"whois"+W+" - whois a website"
	        print ""+R+"web"+W+" - extract info from a website"
	        print ""+R+"siteexists"+W+" - check if a site exists"
	        print ""+R+"google"+W+" - find google results for a query"
	        print ""+R+"clickjacking"+W+" - test websites for clickjacking vulnerability"
                print ""+W+"+----------------------------+"
	        print ""+G+"ip "+W+"- geolocate an ip"
                print ""+W+"+----------------------------+"
	        print ""+T+"email "+W+"- bomb an email address"
	        print ""+T+"spoof email "+W+"- spoof an email address"
	        print ""+T+"sms"+W+" - spam text messages "
	        print ""+T+"crack"+W+" - bruteforce an email"
	        print ""+T+"anonymous"+W+" - send an anonymous email"
                print ""+T+"facebook"+W+" - bruteforce a facebook account"
                print ""+T+"twitter"+W+" - check the details of a twitter account"
                print ""+W+"+----------------------------+"
	        print color.CYAN + "craft"+W+" - generate useful scripts "
	        print color.CYAN + "qr"+W+" - generate a qr code"
	        print color.CYAN + "zip"+W+" - crack a password-protected zip file"
                print ""+W+"+----------------------------+"
	        print color.BLUE + "encode base64"+W+" - text to base64"
	        print color.BLUE + "decode base64"+W+" - base64 to text"
	        print color.BLUE + "encode hex"+W+" - text to hex"
	        print color.BLUE + "decode hex"+W+" - hex to text"
                print ""+W+"+----------------------------+"
	    elif main == "sms":
	        sms()
	    elif main == "encode base64":
	        encode()
	    elif main == "decode base64":
	        decode()
	    elif main == "email":
	        smtp()
	    elif main == "quote":
	        quote()
	    elif main == "spoof email":
	        os.system("python emaill.py")
	    elif main == "zip":
	        zipfile()
	    elif main == "decode hex":
	        decode1()
	    elif main == "encode hex":
	        encode1()
	    elif main == "google":
	        googleSearch()
	    elif main == "web":
	        web()
	    elif main == "clickjacking":
	        clickjacking()
	    elif main == "siteexists":
	        siteexists()
	    elif main == "qr":
	        gen_qrcode()
	    elif main == "twitter":
	        twitter()
	    elif main == "crack":
	        gmail()
	    elif main == "anonymous":
	        anon()
	    elif main == "contact":
	        print(''+T+'' + color.UNDERLINE + 'Facebook:'+W+'' + color.BOLD + ' https://www.facebook.com/Cyber.S3C.Professional' + color.END)
	        print(''+T+'' + color.UNDERLINE + 'GitHub:'+W+'' + color.BOLD + ' https://CybernetiX-S3C.github.io/' + color.END)
	    elif main == "ping":
		while True:
	            hostname = raw_input(''+T+'' + color.UNDERLINE + 'Host>' + color.END)
	            os.system("ping " + hostname)
	    elif main == "craft":
		while True:
	            table()
	    elif main == "facebook":
	        facebook()
	    elif main == "whois":
	        whoisweb()
	    elif main == "admin":
	        admin()
	    elif main == "banner":
	        os.system('clear')
	        banner()
	        banner1()
	    elif main == "speak":
		while True:
	            speak = raw_input(''+T+'' + color.UNDERLINE + 'What to say>' + color.END)
	            os.system('espeak "' + speak + '"')
	    elif main == "echo":
		while True:
	            echo = raw_input(''+T+'' + color.UNDERLINE + 'What to echo>' + color.END)
	            os.system('echo ' + echo)
	    elif main == "clone":
	        clone()
	    elif main == "cd":
	        try:
	            path = raw_input(''+T+'' + color.UNDERLINE + 'Directory>' + color.END)
	            os.chdir(path)
	        except OSError:
	            print (""+R+"[!] " + color.UNDERLINE + "\033[91m" + "That is not a directory!" + color.END)
	    elif main == "ls":
	        os.system('ls')
	    elif main == "tool":
	        print(color.UNDERLINE + ''+C+'Version: 4.2.1' + color.END)
	        print(color.UNDERLINE + ''+C+'Time spent on it: 98 hours - 54 minutes' + color.END)
	        print(color.UNDERLINE + ''+C+'John Modica @ CybernetiX S3C' + color.END)
	    elif main == "website":
		while True:
	            a = raw_input(''+T+'' + color.UNDERLINE + 'Website>' + color.END)
	            try:
	                print socket.gethostbyname(a)
	            except socket.gaierror:
	                print (""+R+"[!] " + color.UNDERLINE + "\033[91m" + "Apparently host is unknown! :/" + color.END)
	    elif main == "ip":
	        ip = raw_input(''+T+'' + color.UNDERLINE + 'IP>' + color.END)
	        if ip is None or ip == "":
	            sys.exit(""+R+"[!] " + color.UNDERLINE + "\033[91m" + "Please enter an IP!" + color.END)
	        reversed_dns = socket.getfqdn(ip)
	        geoip = urllib.urlopen('api.hackertarget.com/geoip/?q='
                               + ip).read().rstrip()
	        print (""+G+"[*] " + color.UNDERLINE + "\033[91m" + "IP Info" + color.END)
	        print geoip
	    elif main == "clear":
	        os.system('clear')
            elif main == "exit":
	        print (""+G+"[*] " + color.UNDERLINE + "\033[91m" + "Exiting..." + color.END)
	        print (""+G+"[*] " + color.UNDERLINE + "\033[92m" + "GoodBye!" + color.END)
	        time.sleep(0.2)
	        sys.exit()
	    elif main == "":
	        print (""+R+"[!] " + color.UNDERLINE + "\033[91m" + "Please enter an option!" + color.END)
            else:
	        print (""+R+"[!] " + color.UNDERLINE + "\033[91m" + "That is not an option!" + color.END)
        except KeyboardInterrupt:
		print "\n"
		tritymain()
Esempio n. 13
0
def tritymain():

    while True:

        try:

            main = raw_input(''+G+'' + color.BOLD + color.UNDERLINE + 'Tri>' + color.END)

            if main in swear:

                print(""+R+"[!] " + color.UNDERLINE + "\033[91m" + "Watch your language!" + color.END)

	    elif main in spell:

                print(""+R+"[!] " + color.UNDERLINE + "\033[91m" + "Do you know how to spell?!" + color.END)

            elif main == "joke":

                joke()

            elif main == "info":

                info()

            elif main == "help":

                print ""+W+"+----------------------------+"

                print ""+C+"help "+W+"- displays this help message"

                print ""+C+"clear "+W+"- clears the screen"

                print ""+C+"exit "+W+"- exits tool"

                print ""+C+"tool "+W+"- displays info about the tool"

                print ""+C+"info "+W+"- displays computer and network info"

                print ""+C+"cd "+W+"- change working directories"

                print ""+W+"+----------------------------+"

                print ""+P+"speak "+W+"- text to speech"

                print ""+P+"ping "+W+"- ping a host"

                print ""+P+"banner "+W+"- print a new banner"

                print ""+P+"joke "+W+"- tell a joke"

                print ""+P+"quote "+W+"- print a quote"

                print ""+P+"contact "+W+"- contact me"

                print ""+W+"+----------------------------+"

                print ""+R+"website "+W+"- enter a website and get its ip"

	        print ""+R+"clone"+W+" - clone a websites source "

	        print ""+R+"whois"+W+" - whois a website"

	        print ""+R+"web"+W+" - extract info from a website"

	        print ""+R+"siteexists"+W+" - check if a site exists"

	        print ""+R+"google"+W+" - find google results for a query"

                print ""+W+"+----------------------------+"

	        print ""+G+"ip "+W+"- geolocate an ip"

                print ""+W+"+----------------------------+"

	        print ""+O+"xss "+W+"- simple check for a xss vulnerability"

	        print ""+O+"sql "+W+"- basic check for a sql vulnerability"

	        print ""+O+"admin "+W+"- scan a website for its admin panel"

                print ""+W+"+----------------------------+"

	        print ""+T+"email "+W+"- bomb an email address"

	        print ""+T+"spoof email "+W+"- spoof an email address"

	        print ""+T+"anonymous "+W+"- send an anonymous email"

	        print ""+T+"sms"+W+" - spam text messages "

                print ""+T+"twitter"+W+" - check the details of a twitter account"

                print ""+W+"+----------------------------+"

	        print color.CYAN + "craft"+W+" - generate useful scripts "

	        print color.CYAN + "qr"+W+" - generate a qr code"

	        print color.CYAN + "zip"+W+" - crack a password-protected zip file"

                print ""+W+"+----------------------------+"

	        print color.BLUE + "encode base64"+W+" - text to base64"

	        print color.BLUE + "decode base64"+W+" - base64 to text"

	        print color.BLUE + "encode hex"+W+" - text to hex"

	        print color.BLUE + "decode hex"+W+" - hex to text"

                print ""+W+"+----------------------------+"

    	    elif main == "sms":

	        sms()

	    elif main == "xss":

	        xss()

	    elif main == "sql":

	        sql()

	    elif main == "anonymous":

	        anon()

	    elif main == "encode base64":

	        encode()

	    elif main == "decode base64":

	        decode()

	    elif main == "email":

	        smtp()

	    elif main == "quote":

	        quote()

	    elif main == "spoof email":

	        spoofemail()

	    elif main == "zip":

	        zipfile()

	    elif main == "decode hex":

	        decode1()

	    elif main == "encode hex":

	        encode1()

	    elif main == "google":

	        googleSearch()

	    elif main == "web":

	        web()

	    elif main == "siteexists":

	        siteexists()

	    elif main == "qr":

	        gen_qrcode()

	    elif main == "twitter":

	        twitter()

	    elif main == "anonymous":

	        anon()

	    elif main == "contact":

	        print(''+T+'' + color.UNDERLINE + 'Skype:'+W+'' + color.BOLD + ' [email protected]' + color.END)

	        print(''+T+'' + color.UNDERLINE + 'Instagram:'+W+'' + color.BOLD + ' @_t0x1c - www.instagram.com/_t0x1c' + color.END)

	        print(''+T+'' + color.UNDERLINE + 'Email me:'+W+'' + color.BOLD + ' [email protected]' + color.END)

	        print(''+T+'' + color.UNDERLINE + 'XMPP:'+W+'' + color.BOLD + ' [email protected]' + color.END)

		print(''+T+'' + color.UNDERLINE + 'Twitter:'+W+'' + color.BOLD + ' @toxicnull' + color.END)

	    elif main == "ping":

		while True:

	            hostname = raw_input(''+T+'' + color.UNDERLINE + 'Host>' + color.END)

	            os.system("ping " + hostname)

	    elif main == "craft":

		while True:

	            table()

	    elif main == "whois":

	        whoisweb()

	    elif main == "admin":

	        admin()

	    elif main == "banner":

	        os.system('clear')

	        banner()

	        banner1()

	    elif main == "speak":

		while True:

	            speak = raw_input(''+T+'' + color.UNDERLINE + 'What to say>' + color.END)

	            os.system('espeak "' + speak + '"')

	    elif main == "clone":

	        clone()

	    elif main == "cd":

	        try:

	            path = raw_input(''+T+'' + color.UNDERLINE + 'Directory>' + color.END)

	            os.chdir(path)

	        except OSError:

	            print (""+R+"[!] " + color.UNDERLINE + "\033[91m" + "That is not a directory!" + color.END)

	    elif main == "tool":

	        print(color.UNDERLINE + ''+C+'Version: ' + (VersionNum) + color.END)

		print(color.UNDERLINE + ''+C+'34 options to choose from!' + color.END)

	        print(color.UNDERLINE + ''+C+'Time spent on it: 76 hours - 14 minutes' + color.END)

	        print(color.UNDERLINE + ''+C+'hackingurwifi is a hacker' + color.END)

	    elif main == "website":

		while True:

	            a = raw_input(''+T+'' + color.UNDERLINE + 'Website>' + color.END)

	            try:

	                print socket.gethostbyname(a)

	            except socket.gaierror:

	                print (""+R+"[!] " + color.UNDERLINE + "\033[91m" + "Apparently host is unknown! :/" + color.END)

	    elif main == "ip":

	        ip = raw_input(''+T+'' + color.UNDERLINE + 'IP>' + color.END)

	        if ip is None or ip == "":

	            sys.exit(""+R+"[!] " + color.UNDERLINE + "\033[91m" + "Please enter an IP!" + color.END)

	        reversed_dns = socket.getfqdn(ip)

	        geoip = urllib.urlopen('http://api.hackertarget.com/geoip/?q='

                               + ip).read().rstrip()

	        print (""+G+"[*] " + color.UNDERLINE + "\033[91m" + "IP Info" + color.END)

	        print geoip

	    elif main == "clear":

	        os.system('clear')

            elif main == "exit":

	        print (""+G+"[*] " + color.UNDERLINE + "\033[91m" + "Exiting..." + color.END)

	        print (""+G+"[*] " + color.UNDERLINE + "\033[92m" + "GoodBye!" + color.END)

	        time.sleep(0.2)

	        sys.exit()

	    elif main == "":

	        print (""+R+"[!] " + color.UNDERLINE + "\033[91m" + "Please enter an option!" + color.END)

            else:

	        print (""+R+"[!] " + color.UNDERLINE + "\033[91m" + "That is not an option!" + color.END)

        except KeyboardInterrupt:

		print (""+R+"[!] " + color.UNDERLINE + "\033[91m" + "\nCtrl-C Pressed! Use 'exit' to close the tool!" + color.END)

		wyattmain()