示例#1
0
def main(args, sf):
    if args.file or args.bytes:
        file_contents = []
        try:
            if args.bytes:
                if unsecure:
                    print("[DEBUG] Opening bytes file '{}'...".format(sf))
                with open(sf, "rb") as file:
                    file_contents.append(str(file.read()))
                rawfile = "".join(file_contents)
            elif args.file:
                if unsecure: print("[DEBUG] Opening file '{}'...".format(sf))
                with open(sf, "r") as file:
                    rawfile = str(file.read())
            sf = rawfile
        except Exception as err:
            if conf.errors: print("[ERROR] {}".format(err))
            else:
                print("There was a problem opening the file.")
            exit()

    pone = phaseone(sf)
    ponepointfive = appapi.split_in_four(pone)
    ptwo = phasetwo(ponepointfive)
    result, salt = phasethree(ptwo, ponepointfive)
    if unsecure: print("{0} : {1}".format(result, salt))
    else: print(result)
示例#2
0
def main():
	pone = phaseone()
	ponepointfive = appapi.split_in_four(pone)
	ptwo = phasetwo(ponepointfive)
	result, salt = phasethree(ptwo, ponepointfive)
	if conf.unsecure: print("{0} : {1}".format(result, salt))
	else: print(result)