Example #1
0
 def shell(self):
     args = None
     # Get all modules
     self.modules_get_list()
     self.print_startup(len(self.o_modules))
     complete(array+self.o_modules)
     
     while True:
         args = raw_input("framework >>> ") or "help"
         args = args.split()
         if args[0] == "list":
             print("\t-----------\n"
                   "\t| modules |\n"
                   "\t-----------\n"
                   "\t-----------------------------------\n"
                   "\t| ID  | Name | Version | Information |")
             for mod in self.o_modules:
                 try:
                     self.c_modules += 1
                     m = importlib.import_module("modules.%s" %(mod))
                 except ImportError:
                     print("\t>> %s - [ERROR ON LOAD]" %(mod))
                 else:
                     print("\t", end="")
                     line = "\t| %d]. %s (%s) - %s\t|" %(self.c_modules, 
                         mod, m.MODULE_VERSION, m.MODULE_DE)
                     _ = len(line)
                     print("-" * _)
                     print(line)
             print("\t", end="")
             print("-" * _)
         elif args[0] == "run":
             try:
                 _ = args[1]
             except IndexError:
                 print("Usage: run [module] [args] ...")
             else:
                 self.module_execute(args)
         elif args[0] == "back" or args[0] == "quit":
             break
         elif args[0] == "info":
             try:
                 _ = args[1]
             except IndexError:
                 print("Usage: info [module]")
             else:
                 self.module_read(_)
         elif args[0] == "help":
             self.help()
         else:
             printt(2, "%s - unknown command" % (args[0]))
Example #2
0
File: shell.py Project: ad3n/weeman
def shell():
    global url
    global port
    global action_url
    global user_agent
    global html_file

    print_startup()
    complete(array)

    if os.path.exists("history.log"):
        if  os.stat("history.log").st_size == 0:
            history = open("history.log", "w")
        else:
            history = open("history.log", "a")
    else:
        history = open("history.log", "w")

    while True:
        try:
            an = raw_input(" (weeman ) : ")
            prompt = an.split()
            if not prompt:
                print("Error: What? try help.")
            elif prompt[0] == ";" or prompt[0] == "clear":
                print("\033[H\033[J")
            elif prompt[0] == "q" or prompt[0] == "quit":
                printt(2,"bye bye!")
                break;
            elif prompt[0] == "help" or prompt[0] == "?":
                if prompt[1]:
                    print_help_option(str(prompt[1]))
                else:
                    print_help()
            elif prompt[0] == "show":
                l = 11 + len(url)
                sys.stdout.write("\033[01;32m\t")
                print("-" * l)
                print("\turl        : %s " %url)
                print("\tport       : %d " %(port))
                print("\taction_url : %s " %(action_url))
                print("\tuser_agent : %s " %(user_agent))
                print("\thtml_file  : %s " %(html_file))
                sys.stdout.write("\t\033[00m")
                print("-" * l)
            elif prompt[0] == "set":
                if prompt[1] == "port":
                    port = int(prompt[2])
                    ## Check if port == 80 and not running as root
                    if port == 80 and os.getuid() != 0:
                        printt(2, "Permission denied, to bind port 80, you need to run weeman as root.");
                    history.write("port = %s\n" %port)
                if prompt[1] == "url":
                    url = str(prompt[2])
                    history.write("url = %s\n" %url)
                if prompt[1] == "action_url":
                    action_url = str(prompt[2])
                    history.write("action_url = %s\n" %action_url)
                if prompt[1] == "user_agent":
                    prompt.pop(0)
                    u = str()
                    for x in prompt:
                        u+=" "+x
                    user_agent = str(u.replace("user_agent", ""))
                    history.write("user_agent = %s\n" %user_agent)
                if prompt[1] == "html_file":
                    html_file = str(prompt[2])
            elif prompt[0] == "run" or prompt[0] == "r":
                s = weeman(url,port)
                s.clone()
                s.serve()
            elif prompt[0] == "banner" or prompt[0] == "b":
                print_startup()
            else:
                print("Error: \'%s\' What? try help." %prompt[0])

        except KeyboardInterrupt:
            s = weeman(url,port)
            s.cleanup()
            print("\nInterrupt ...")
        except IndexError:
            if prompt[0] == "help" or prompt[0] == "?":
                print_help()
            else:
                printt(3, "Error: please provide value for \'%s\'." %prompt[0])
        except Exception as e:
            printt(3, "Error: (%s)" %(str(e)))
Example #3
0
def shell(quiet_mode):
    """
        The shell, parse command line args,
        and set variables.
    """
    global url
    global port
    global action_url
    global user_agent
    global html_file

    if not quiet_mode:
        print_startup()
    complete(array)

    if os.path.exists("history.log"):
        if  os.stat("history.log").st_size == 0:
            history = open("history.log", "w")
        else:
            history = open("history.log", "a")
    else:
        history = open("history.log", "w")

    while True:
        try:
            an = raw_input(PROMPT_P)
            prompt = an.split()
            if not prompt:
                print("Error: What? try help.")
            elif prompt[0] == ";" or prompt[0] == "clear":
                print("\033[H\033[J")
            elif prompt[0] == "q" or prompt[0] == "quit":
                printt(2,"bye bye!")
                break;
            elif prompt[0] == "help" or prompt[0] == "?":
                if prompt[1]:
                    print_help_option(str(prompt[1]))
                else:
                    print_help()
            elif prompt[0] == "show":
                l = 20
                sys.stdout.write("\033[01;37m\t")
                print("-" * l)
                print("\turl        : %s " %url)
                print("\tport       : %d " %(port))
                print("\taction_url : %s " %(action_url))
                print("\tuser_agent : %s " %(user_agent))
                print("\thtml_file  : %s " %(html_file))
                sys.stdout.write("\t")
                print("-" * l)
                sys.stdout.write("\033[01;00m")
            elif prompt[0] == "set":
                if prompt[1] == "port":
                    port = int(prompt[2])
                    ## Check if port == 80 and not running as root
                    if port == 80 and os.getuid() != 0:
                        printt(2, "Permission denied, to bind port 80, you need to run weeman as root.");
                    history.write("port = %s\n" %port)
                if prompt[1] == "url":
                    url = str(prompt[2])
                    history.write("url = %s\n" %url)
                if prompt[1] == "action_url":
                    action_url = str(prompt[2])
                    history.write("action_url = %s\n" %action_url)
                if prompt[1] == "user_agent":
                    prompt.pop(0)
                    u = str()
                    for x in prompt:
                        u+=" "+x
                    user_agent = str(u.replace("user_agent", ""))
                    history.write("user_agent = %s\n" %user_agent)
                if prompt[1] == "html_file":
                    html_file = str(prompt[2])
            elif prompt[0] == "run" or prompt[0] == "r":
                if not url:
                    printt(3, "Error: \'url\' Can't be \'None\', please use \'set\'.")
                elif not action_url:
                    printt(3, "Error: \'action_url\' Can't be \'None\', please use \'set\'.")
                else:
                    # Here we start the server (:
                    s = weeman(url,port)
                    s.clone()
                    s.serve()
            elif prompt[0] == "banner" or prompt[0] == "b":
                print_startup()
            else:
                print("Error: \'%s\' What? try help." %prompt[0])

        except KeyboardInterrupt:
            s = weeman(url,port)
            s.cleanup()
            print("\nInterrupt ...")
        except IndexError:
            if prompt[0] == "help" or prompt[0] == "?":
                print_help()
            else:
                printt(3, "Error: please provide option for \'%s\'." %prompt[0])
        except Exception as e:
            printt(3, "Error: (%s)" %(str(e)))
Example #4
0
def shell():
    """
        The shell, parse command line args,
        and set variables.
    """
    global url
    global port
    global action_url
    global user_agent
    global html_file
    global external_js

    print_startup()

    if os.path.exists("history.log"):
        if os.stat("history.log").st_size == 0:
            history = open("history.log", "w")
        else:
            history = open("history.log", "a")
    else:
        history = open("history.log", "w")

    while True:
        try:
            # for Re-complete
            complete(array)
            an = raw_input("weeman > ") or "help"
            prompt = an.split()
            if not prompt:
                continue
            elif prompt[0] == ";" or prompt[0] == "clear":
                print("\033[H\033[J")
            elif prompt[0] == "q" or prompt[0] == "quit":
                printt(2, "bye bye!")
                break
            elif prompt[0] == "help" or prompt[0] == "?":
                if prompt[1]:
                    print_help_option(str(prompt[1]))
                else:
                    print_help()
            elif prompt[0] == "show":
                sys.stdout.write("\033[01;37m\t")
                print("-" * 20)
                print("\turl          : %s " % url)
                print("\tport         : %d " % (port))
                print("\taction_url   : %s " % (action_url))
                print("\tuser_agent   : %s " % (user_agent))
                print("\thtml_file    : %s " % (html_file))
                print("\texternal_js  : %s " % (external_js))
                sys.stdout.write("\t")
                print("-" * 20)
                sys.stdout.write("\033[01;00m")
            elif prompt[0] == "set":
                if prompt[1] == "port":
                    port = int(prompt[2])
                    ## Check if port == 80 and not running as root
                    if port == 80 and os.getuid() != 0:
                        printt(
                            2,
                            "Permission denied, to bind port 80, you need to run weeman as root."
                        )
                    history.write("port = %s\n" % port)
                if prompt[1] == "url":
                    url = str(prompt[2])
                    history.write("url = %s\n" % url)
                if prompt[1] == "action_url":
                    action_url = str(prompt[2])
                    history.write("action_url = %s\n" % action_url)
                if prompt[1] == "user_agent":
                    prompt.pop(0)
                    u = str()
                    for x in prompt:
                        u += " " + x
                    user_agent = str(u.replace("user_agent", ""))
                    history.write("user_agent = %s\n" % user_agent)
                if prompt[1] == "html_file":
                    html_file = str(prompt[2])
                if prompt[1] == "external_js":
                    external_js = str(prompt[2])
                    history.write("external_js = %s\n" % external_js)
            elif prompt[0] == "run" or prompt[0] == "r":
                if not url:
                    printt(3, "Error: please set \"url\".")
                elif not action_url:
                    printt(3, "Error: please set \"action_url\".")
                else:
                    # Here we start the server (:
                    s = weeman(url, port)
                    s.clone()
                    s.serve()
            elif prompt[0] == "banner" or prompt[0] == "b":
                print_startup()
            else:
                print("Error: No such command \'%s\'." % prompt[0])

        except KeyboardInterrupt:
            s = weeman(url, port)
            s.cleanup()
            print("\n%s" % say)
        except IndexError:
            if prompt[0] == "help" or prompt[0] == "?":
                print_help()
            else:
                printt(3,
                       "Error: please provide option for \'%s\'." % prompt[0])
        except Exception as e:
            printt(3, "Error: (%s)" % (str(e)))
Example #5
0
def shell():

    global url
    global ngrok
    global port
    global files
    global userAgent
    global html
    global exjs

    logoo()
    if os.path.exists("memory.log"):
        if os.stat("memory.log").st_size == 0:
            memory = open("memory.log", "w")
        else:
            memory = open("memory.log", "a")
    else:
        memory = open("memory.log", "w")

    while True:
        try:
            complete(array)
            sw = raw_input("passmepass >>>") or "help"
            prompt = sw.split()
            if not prompt:
                continue
            elif prompt[0] == "clear":
                logoo()
            elif prompt[0] == "quit" or prompt[0] == "q":
                printf(1, ".........")
                time.sleep(0.5)
                printf(1, "passmepass.....sleep")
                break
            elif prompt[0] == "help" or prompt[0] == "?":
                helpp()
            elif prompt[0] == "show":
                sys.stdout.write("\033[37m\t")
                print("-" * 18)
                print("\turl          : %s " % url)
                print("\tport         : %d " % (port))
                print("\tngrok url    : %s " % (ngrok))
                print("\tuser_agent   : %s " % (userAgent))
                print("\thtml_file    : %s " % (html))
                print("\texternal_js  : %s " % (exjs))
                sys.stdout.write("\t")
                print("-" * 18)
                sys.stdout.write("\033[00m")
            elif prompt[0] == "url":
                url = str(prompt[1])
                memory.write("url = %s\n" % url)
            elif prompt[0] == "ngrok":
                ngrok = str(prompt[1])
                memory.write("ngrok = %s\n" % ngrok)
            elif prompt[0] == "port":
                port = int(prompt[1])
                if port == 80 and os.getuid() != 0:
                    printf(1, "if you want use port 80. please run root")
                memory.write("port = %s\n" % port)
##your file code Phishing   fail fail fail....................
#elif prompt[0] == "file" or prompt[0] == "f":
#    files = str(prompt[1])
#    if os.path.exists(files):
#        f = open(files)
#        html = f.read()
#        f.close()
#        printf(1,'file saved in html')
#    else:
#        printf(1,'filename not found')

            elif prompt[0] == "run":
                if not url and not html:
                    printf(1, "3rror:please set \"url\".")
                elif not ngrok:
                    printf(1, "3rror:please set \"ngrok\".")
                else:
                    s = passmepass(url, port)
                    s.clone()
                    s.serve()
            elif prompt[0] == "logo" or prompt[0] == "banner":
                logoo()
            else:
                printf(1, "3rror: not found command\'%s\'." % prompt[0])

        except KeyboardInterrupt:
            s = passmepass(url, port)
            s.cleanup()
            print("\n%s" % fish)
        except IndexError:
            if prompt[0] == "help" or prompt[0] == "?":
                helpp()
            else:
                printf(1,
                       "Error: please provide option for \'%s\'." % prompt[0])
        except Exception as e:
            printf(1, "Error: (%s)" % (str(e)))
Example #6
0
def shell():
    global url
    global port
    global action_url
    global user_agent

    print_startup()
    complete(array)

    if os.path.exists("history.log"):
        if  os.stat("history.log").st_size == 0:
            history = open("history.log", "w")
        else:
            history = open("history.log", "a")
    else:
        history = open("history.log", "w")

    while True:
        try:
            an = raw_input("\033[1;37m\033[1;31mroot@lteezy:\033[1;37m ")
            prompt = an.split()
            if not prompt:
                print("Error: Try command help for more details.")
            elif prompt[0] == ";" or prompt[0] == "clear":
                print("\033[H\033[J")
            elif prompt[0] == "q" or prompt[0] == "quit":
                printt(2,"have a great day")
                break;
            elif prompt[0] == "help" or prompt[0] == "?":
                print_help()
            elif prompt[0] == "show":
                l = 11 + len(url)
                sys.stdout.write("\033[01;34m\t")
                print("-" * l)
                print("\turl        : %s " %url)
                print("\tport       : %d " %(port))
                print("\taction_url : %s " %(action_url))
                print("\tuser_agent : %s " %(user_agent))
                sys.stdout.write("\t\033[00m")
                print("-" * l)
            elif prompt[0] == "set":
                if prompt[1] == "port":
                    port = int(prompt[2])
                    history.write("port = %s\n" %port)
                if prompt[1] == "url":
                    url = str(prompt[2])
                    history.write("url = %s\n" %url)
                if prompt[1] == "action_url":
                    action_url = str(prompt[2])
                    history.write("action_url = %s\n" %action_url)
                if prompt[1] == "user_agent":
                    prompt.pop(0)
                    u = str()
                    for x in prompt:
                        u+=" "+x
                    user_agent = str(u.replace("user_agent", ""))
                    history.write("user_agent = %s\n" %user_agent)
            elif prompt[0] == "run" or prompt[0] == "r":
                s = cybercloner(url,port)
                s.clone()
                s.serve()
            elif prompt[0] == "banner" or prompt[0] == "b":
                print_startup()
            else:
                print("Error: \'%s\' Try command help for more details." %prompt[0])

        except KeyboardInterrupt:
            s = cybercloner(url,port)
            s.cleanup()
            print("\nInterrupt ...")
        except Exception as e:
            printt(3, "Error: CYBER CLONER saw an error! (%s)" %(str(e)))
Example #7
0
def shell(quiet_mode):
    """
        The shell, parse command line args,
        and set variables.
    """
    global url
    global port
    global action_url
    global user_agent
    global html_file

    if not quiet_mode:
        print_startup()
    complete(array)

    if os.path.exists("history.log"):
        if os.stat("history.log").st_size == 0:
            history = open("history.log", "w")
        else:
            history = open("history.log", "a")
    else:
        history = open("history.log", "w")

    while True:
        try:
            an = raw_input(PROMPT_P)
            prompt = an.split()
            if not prompt:
                print("Error: What? try help.")
            elif prompt[0] == ";" or prompt[0] == "clear":
                print("\033[H\033[J")
            elif prompt[0] == "q" or prompt[0] == "quit":
                printt(2, "bye bye!")
                break
            elif prompt[0] == "help" or prompt[0] == "?":
                if prompt[1]:
                    print_help_option(str(prompt[1]))
                else:
                    print_help()
            elif prompt[0] == "show":
                l = 20
                sys.stdout.write("\033[01;37m\t")
                print("-" * l)
                print("\turl        : %s " % url)
                print("\tport       : %d " % (port))
                print("\taction_url : %s " % (action_url))
                print("\tuser_agent : %s " % (user_agent))
                print("\thtml_file  : %s " % (html_file))
                sys.stdout.write("\t")
                print("-" * l)
                sys.stdout.write("\033[01;00m")
            elif prompt[0] == "set":
                if prompt[1] == "port":
                    port = int(prompt[2])
                    ## Check if port == 80 and not running as root
                    if port == 80 and os.getuid() != 0:
                        printt(2, "Permission denied, to bind port 80, you need to run weeman as root.")
                    history.write("port = %s\n" % port)
                if prompt[1] == "url":
                    url = str(prompt[2])
                    history.write("url = %s\n" % url)
                if prompt[1] == "action_url":
                    action_url = str(prompt[2])
                    history.write("action_url = %s\n" % action_url)
                if prompt[1] == "user_agent":
                    prompt.pop(0)
                    u = str()
                    for x in prompt:
                        u += " " + x
                    user_agent = str(u.replace("user_agent", ""))
                    history.write("user_agent = %s\n" % user_agent)
                if prompt[1] == "html_file":
                    html_file = str(prompt[2])
            elif prompt[0] == "run" or prompt[0] == "r":
                if not url:
                    printt(3, "Error: 'url' Can't be 'None', please use 'set'.")
                elif not action_url:
                    printt(3, "Error: 'action_url' Can't be 'None', please use 'set'.")
                else:
                    # Here we start the server (:
                    s = weeman(url, port)
                    s.clone()
                    s.serve()
            elif prompt[0] == "banner" or prompt[0] == "b":
                print_startup()
            else:
                print("Error: '%s' What? try help." % prompt[0])

        except KeyboardInterrupt:
            s = weeman(url, port)
            s.cleanup()
            print("\nInterrupt ...")
        except IndexError:
            if prompt[0] == "help" or prompt[0] == "?":
                print_help()
            else:
                printt(3, "Error: please provide option for '%s'." % prompt[0])
        except Exception as e:
            printt(3, "Error: (%s)" % (str(e)))
Example #8
0
def shell():
    global url
    global port
    global action_url
    global user_agent

    print_startup()
    complete(array)

    if os.path.exists("history.log"):
        if  os.stat("history.log").st_size == 0:
            history = open("history.log", "w")
        else:
            history = open("history.log", "a")
    else:
        history = open("history.log", "w")

    while True:
        try:
            an = raw_input(" (STD9-Phishing ) : ")
            prompt = an.split()
            if not prompt:
                print("Error: ? try help.")
            elif prompt[0] == ";" or prompt[0] == "clear":
                print("\033[H\033[J")
            elif prompt[0] == "q" or prompt[0] == "quit":
                printt(2,"au revoir !")
                break;
            elif prompt[0] == "help" or prompt[0] == "?":
                print_help()
            elif prompt[0] == "show":
                l = 11 + len(url)
                sys.stdout.write("\033[01;32m\t")
                print("-" * l)
                print("\turl        : %s " %url)
                print("\tport       : %d " %(port))
                print("\taction_url : %s " %(action_url))
                print("\tuser_agent : %s " %(user_agent))
                sys.stdout.write("\t\033[00m")
                print("-" * l)
            elif prompt[0] == "set":
                if prompt[1] == "port":
                    port = int(prompt[2])
                    history.write("port = %s\n" %port)
                if prompt[1] == "url":
                    url = str(prompt[2])
                    history.write("url = %s\n" %url)
                if prompt[1] == "action_url":
                    action_url = str(prompt[2])
                    history.write("action_url = %s\n" %action_url)
                if prompt[1] == "user_agent":
                    prompt.pop(0)
                    u = str()
                    for x in prompt:
                        u+=" "+x
                    user_agent = str(u.replace("user_agent", ""))
                    history.write("user_agent = %s\n" %user_agent)
            elif prompt[0] == "run" or prompt[0] == "r":
                s = STD9-Phishing(url,port)
                s.clone()
                s.serve()
            elif prompt[0] == "banner" or prompt[0] == "b":
                print_startup()
            else:
                print("Error: \'%s\' What? try help." %prompt[0])

        except KeyboardInterrupt:
            s = weeman(url,port)
            s.cleanup()
            print("\nInterrupt ...")
        except Exception as e:
            printt(3, "Error: STD9-Phishing recived error! (%s)" %(str(e)))
Example #9
0
def shell():
    global url
    global port
    global action_url
    global user_agent

    print_startup()
    complete(array)

    if os.path.exists("history.log"):
        if  os.stat("history.log").st_size == 0:
            history = open("history.log", "w")
        else:
            history = open("history.log", "a")
    else:
        history = open("history.log", "w")

    while True:
        try:
            an = raw_input(" (weeman ) : ")
            prompt = an.split()
            if not prompt:
                print("Error: What? try help.")
            elif prompt[0] == ";" or prompt[0] == "clear":
                print("\033[H\033[J")
            elif prompt[0] == "q" or prompt[0] == "quit":
                printt(2,"bye bye!")
                break;
            elif prompt[0] == "help" or prompt[0] == "?":
                print_help()
            elif prompt[0] == "show":
                l = 11 + len(url)
                sys.stdout.write("\033[01;32m\t")
                print("-" * l)
                print("\turl        : %s " %url)
                print("\tport       : %d " %(port))
                print("\taction_url : %s " %(action_url))
                print("\tuser_agent : %s " %(user_agent))
                sys.stdout.write("\t\033[00m")
                print("-" * l)
            elif prompt[0] == "set":
                if prompt[1] == "port":
                    port = int(prompt[2])
                    history.write("port = %s\n" %port)
                if prompt[1] == "url":
                    url = str(prompt[2])
                    history.write("url = %s\n" %url)
                if prompt[1] == "action_url":
                    action_url = str(prompt[2])
                    history.write("action_url = %s\n" %action_url)
                if prompt[1] == "user_agent":
                    prompt.pop(0)
                    u = str()
                    for x in prompt:
                        u+=" "+x
                    user_agent = str(u.replace("user_agent", ""))
                    history.write("user_agent = %s\n" %user_agent)
            elif prompt[0] == "run" or prompt[0] == "r":
                s = weeman(url,port)
                s.clone()
                s.serve()
            elif prompt[0] == "banner" or prompt[0] == "b":
                print_startup()
            else:
                print("Error: \'%s\' What? try help." %prompt[0])

        except KeyboardInterrupt:
            s = weeman(url,port)
            s.cleanup()
            print("\nInterrupt ...")
        except Exception as e:
            printt(3, "Error: Weeman recived error! (%s)" %(str(e)))
Example #10
0
def shell():
    """
        The shell, parse command line args,
        and set variables.
    """
    global url
    global port
    global action_url
    global user_agent
    global html_file
    global external_js

    print_startup()

    if os.path.exists("history.log"):
        if  os.stat("history.log").st_size == 0:
            history = open("history.log", "w")
        else:
            history = open("history.log", "a")
    else:
        history = open("history.log", "w")

    while True:
        try:
            # for Re-complete
            complete(array)
            an = raw_input("weeman > ") or "help"
            prompt = an.split()
            if not prompt:
              continue
            elif prompt[0] == ";" or prompt[0] == "clear":
                print("\033[H\033[J")
            elif prompt[0] == "q" or prompt[0] == "quit":
                printt(2,"bye bye!")
                break;
            elif prompt[0] == "help" or prompt[0] == "?":
                if prompt[1]:
                    print_help_option(str(prompt[1]))
                else:
                    print_help()
            elif prompt[0] == "show":
                sys.stdout.write("\033[01;37m\t")
                print("-" * 20)
                print("\turl          : %s " %url)
                print("\tport         : %d " %(port))
                print("\taction_url   : %s " %(action_url))
                print("\tuser_agent   : %s " %(user_agent))
                print("\thtml_file    : %s " %(html_file))
                print("\texternal_js  : %s " %(external_js))
                sys.stdout.write("\t")
                print("-" * 20)
                sys.stdout.write("\033[01;00m")
            elif prompt[0] == "set":
                if prompt[1] == "port":
                    port = int(prompt[2])
                    ## Check if port == 80 and not running as root
                    if port == 80 and os.getuid() != 0:
                        printt(2, "Permission denied, to bind port 80, you need to run weeman as root.");
                    history.write("port = %s\n" %port)
                if prompt[1] == "url":
                    url = str(prompt[2])
                    history.write("url = %s\n" %url)
                if prompt[1] == "action_url":
                    action_url = str(prompt[2])
                    history.write("action_url = %s\n" %action_url)
                if prompt[1] == "user_agent":
                    prompt.pop(0)
                    u = str()
                    for x in prompt:
                        u+=" "+x
                    user_agent = str(u.replace("user_agent", ""))
                    history.write("user_agent = %s\n" %user_agent)
                if prompt[1] == "html_file":
                    html_file = str(prompt[2])
                if prompt[1] == "external_js":
                    external_js = str(prompt[2])
                    history.write("external_js = %s\n" %external_js)
            elif prompt[0] == "run" or prompt[0] == "r":
                if not url:
                    printt(3, "Error: please set \"url\".")
                elif not action_url:
                    printt(3, "Error: please set \"action_url\".")
                else:
                    # Here we start the server (:
                    s = weeman(url,port)
                    s.clone()
                    s.serve()
            elif prompt[0] == "banner" or prompt[0] == "b":
                print_startup()
            else:
                print("Error: No such command \'%s\'." %prompt[0])

        except KeyboardInterrupt:
            s = weeman(url,port)
            s.cleanup()
            print("\n%s" %say)
        except IndexError:
            if prompt[0] == "help" or prompt[0] == "?":
                print_help()
            else:
                printt(3, "Error: please provide option for \'%s\'." %prompt[0])
        except Exception as e:
            printt(3, "Error: (%s)" %(str(e)))