Example #1
0
def banner():
    cprint("Crackq client %s" % MYVER, "green")
    cprint("[email protected]\n", "green")
Example #2
0
    for o, a in optlist:
        if o in ("-h", "--help"):
            usage(sys.argv[0])
            sys.exit(0)
        if o in ("-u", "--update"):
            os.system("git pull")
            sys.exit(0)
        if o in ("-t", "--type"):
            _type = a

    try:
        # check for updates
        sys.stdout.write("[+] Checking the current client version...\n")
        if urlopen(SERVER + ENDPOINTS["client_ver"]).read() != MYVER:
            cprint("[-] WARNING: NEW CLIENT VERSION IS AVAILABLE. PLEASE UPDATE.", "red")
            sys.exit(-1)

        if len(args) != 1:
            usage(sys.argv[0])
            sys.exit(-1)

        _content = args[0]

        if not _type or _type not in HASH_TYPES:
            sys.stdout.write("[-] ERROR: INVALID HASH TYPE\n")
            sys.exit(-1)

        if (_type != "wpa" and _type != "pdf") and not validate_hash(_content, _type):
            sys.stdout.write("[-] ERROR: INVALID HASH FORMAT\n")
            sys.exit(-1)