Exemplo n.º 1
0

# help_EOF = help_q

if __name__ == '__main__':
    os.system('clear')
    if str(platform.system()) != "Linux":
        sys.exit(
            R + " [!] " + color.UNDERLINE + "\033[1m" +
            "You are not using a Linux Based OS! Linux is a must-have for "
            "this script!" + color.END)
    if not os.geteuid() == 0:
        sys.exit(R + " [!] " + "\033[0m" + color.UNDERLINE + "\033[1m" +
                 "Must be run as root." + B + " :)" + color.END)
    if 'no' in open('core/doc/choice').read():
        prnt.disclaimer()

        a1 = input(B + ' [?] Do you agree to these terms and conditions? :> ' +
                   C)
        if a1.lower().startswith('y'):
            print(B + ' [+] That\'s awesome! Move on...')
            time.sleep(3)
            FILE = open("core/doc/choice", "w")
            FILE.write('yes')
            FILE.close()

        else:
            print(R + ' [!] ' + B + 'You have to agree!')
            time.sleep(1)
            sys.exit(0)
Exemplo n.º 2
0
def main():
    parser = build_parser()
    opt = vars(parser.parse_args())
    args = parser.parse_args()
    os.system('clear')
    if str(platform.system()) != "Linux":
        sys.exit(
            R + " [!] " + color.UNDERLINE + "\033[1m" +
            "You are not using a Linux Based OS! Linux is a must-have for "
            "this script!" + color.END)
    if not os.geteuid() == 0:
        sys.exit(R + " [!] " + "\033[0m" + color.UNDERLINE + "\033[1m" +
                 "Must be run as root." + B + " :)" + color.END)
    if 'no' in open('core/doc/choice').read():
        prnt.disclaimer()

        a1 = input(B + ' [?] Do you agree to these terms and conditions? :> ' +
                   C)
        if a1.lower().startswith('y'):
            print(B + ' [+] That\'s awesome! Move on...')
            time.sleep(3)
            FILE = open("core/doc/choice", "w")
            FILE.write('yes')
            FILE.close()

        else:
            print(R + ' [!] ' + "\033[0m" + color.UNDERLINE + "\033[1m" +
                  'You have to agree!' + color.END)
            time.sleep(1)
            sys.exit(0)

    if opt["load"] and opt["victim"] and not opt["help"] and not opt["list"]:
        s = VainShell()
        if not opt["quiet"]:
            prnt.banner()
            prnt.bannerbelownew()
        if not opt["session"]:
            s.do_vicadd(args.victim)
        else:
            s.do_sessions("load {}".format(args.victim))
        s.do_load(args.load)
        if opt["tor"]:
            s.do_tor("on")
            if varis.tor:
                s.do_attack("")
        else:
            s.do_attack("")
    elif opt["help"]:
        if not opt["quiet"]:
            prnt.banner()
        #prnt.bannerbelownew()
        parser.print_help()
    elif opt["list"]:
        s = VainShell()
        if not opt["quiet"]:
            prnt.banner()
        s.do_list(args.list)
    elif opt["fetch"]:
        s = VainShell()
        s.do_fetch("")
    elif opt["victim"] and not opt["load"] or opt["load"] and not opt["victim"]:
        parser.error("'-v' and '-l' are required for CLI attack.")
    else:
        if not opt["quiet"]:
            prnt.loadstyle()
            prnt.banner()
            prnt.bannerbelownew()
        VainShell().cmdloop()
        #print(R + "[Vaile] " + "\033[0m" + color.UNDERLINE + "\033[1m" + "Alvida, my friend!" + color.END)
        print(R + "[Vaile] " + "\033[0m" + color.END + "Alvida, my chosen")
Exemplo n.º 3
0
def main():
    #parse arguments
    parser = build_parser()
    opt = vars(parser.parse_args())
    args = parser.parse_args()
    os.system(varis.CMD_CLEAR)
    #currently, only Linux is supported - TODO support other OSes as well
    if str(platform.system()) != "Linux":
        sys.exit(
            R + " [!] " + color.UNDERLINE + "\033[1m" +
            "You are not using a Linux Based OS! Linux is a must-have for "
            "this script!" + color.END)
    #some modules require root permissions to work
    if not os.geteuid() == 0:
        sys.exit(R + " [!] " + "\033[0m" + color.UNDERLINE + "\033[1m" +
                 "Must be run as root." + B + " :)" + color.END)
    #prompt the user with the terms&conditions if not already accepted
    if 'no' in open('core/doc/choice').read():
        prnt.disclaimer()

        a1 = input(B + ' [?] Do you agree to these terms and conditions? :> ' +
                   C)
        if a1.lower().startswith('y'):
            print(B + ' [+] That\'s awesome! Move on...')
            time.sleep(3)
            FILE = open("core/doc/choice", "w")
            FILE.write('yes')
            FILE.close()

        else:
            print(R + ' [!] ' + "\033[0m" + color.UNDERLINE + "\033[1m" +
                  'You have to agree!' + color.END)
            time.sleep(1)
            sys.exit(0)

    if varis.username == "":
        user = input(
            "Enter your (unprivileged) user name [necessary for GUI] :> ")
        with open("core/doc/local", "w") as localfile:
            localfile.write(user)

    if varis.vailyndir == "":
        vailyn = input(
            "Enter Vailyn installation directory (absolute path; required for pathtrav module) :> "
        )
        with open("core/doc/vailyn", "w") as vailynfile:
            vailynfile.write(vailyn)
    """
    handle arguments. Note that the --app argument for the GUI is handled in
    tmp/tidos (which will be executed after global installation)
    """
    if opt["load"] and opt["victim"] and not opt["help"] and not opt["list"]:
        s = TIDcon()
        if not opt["quiet"]:
            prnt.banner()
            #prnt.bannerbelownew()
        prnt.upinfo()
        if not opt["session"]:
            s.do_vicadd(args.victim)
        else:
            s.do_sessions("load {}".format(args.victim))
        s.do_load(args.load)
        if opt["tor"]:
            s.do_tor("on")
            if varis.tor:
                s.do_attack("")
                s.do_tor("off")
        else:
            s.do_attack("")
    elif opt["file"]:
        if not opt["quiet"]:
            prnt.banner()
            #prnt.bannerbelownew()
        prnt.upinfo()
        s = TIDcon()
        if opt["tor"]:
            s.do_tor("on")
            if varis.tor:
                s.automator(args.file)
                s.do_tor("off")
        else:
            s.automator(args.file)
        print("Done.")
    elif opt["help"]:
        if not opt["quiet"]:
            prnt.banner()
            #prnt.bannerbelownew()
        prnt.upinfo()
        parser.print_help()
    elif opt["list"]:
        s = TIDcon()
        if not opt["quiet"]:
            prnt.banner()
        prnt.upinfo()
        s.do_list(args.list)
    elif opt["fetch"]:
        s = TIDcon()
        s.do_fetch("")
    elif opt["victim"] and not opt["load"] or opt["load"] and not opt["victim"]:
        parser.error("'-v' and '-l' are required for CLI attack.")
    else:
        if not opt["quiet"]:
            prnt.loadstyle()
            prnt.banner()
            #prnt.bannerbelownew()
            prnt.upinfo()
        TIDcon().cmdloop()
        print(R + "[TIDoS] " + "\033[0m" + color.END + "Alvida, my chosen")