Ejemplo n.º 1
0
def CloakifyFile():
    print ""
    print "====  Cloakify a File  ===="
    print ""
    sourceFile = raw_input(
        "Enter filename to cloak (e.g. ImADolphin.exe or /foo/bar.zip): ")
    print ""
    cloakedFile = raw_input(
        "Save cloaked data to filename (default: 'tempList.txt'): ")

    if cloakedFile == "":
        cloakedFile = "tempList.txt"

    cipherNum = SelectCipher()

    noiseNum = -1
    choice = raw_input("Add noise to cloaked file? (y/n): ")
    if choice == "y":
        noiseNum = SelectNoise()

    print ""
    print "Creating cloaked file using cipher:", gCipherFiles[cipherNum]

    try:
        cloakify.Cloakify(sourceFile, "ciphers/" + gCipherFiles[cipherNum],
                          cloakedFile)
    except:
        print ""
        print "!!! Well that didn't go well. Verify that your cipher is in the 'ciphers/' subdirectory."
        print ""

    if noiseNum >= 0:
        print "Adding noise to cloaked file using noise generator:", gNoiseScripts[
            noiseNum]
        try:
            os.system("noiseTools/%s %s" %
                      (gNoiseScripts[noiseNum], cloakedFile))
        except:
            print ""
            print "!!! Well that didn't go well. Verify that '", cloakedFile, "'"
            print "!!! is in the current working directory or try again giving full filepath."
            print ""

    print ""
    print "Cloaked file saved to:", cloakedFile
    print ""

    choice = raw_input("Preview cloaked file? (y/n): ")
    if choice == "y":
        print ""
        with open(cloakedFile) as file:
            cloakedPreview = file.readlines()
            i = 0
            while (i < 20):
                print cloakedPreview[i],
                i = i + 1
        print ""

    choice = raw_input("Press return to continue... ")
Ejemplo n.º 2
0
def CloakifyFile():
	print("")
	print("====  Cloakify a File  ====")
	print("")
	sourceFile = input("Enter filename to cloak (e.g. ImADolphin.exe or /foo/bar.zip): ")
	print("")
	cloakedFile = input("Save cloaked data to filename (default: 'tempList.txt'): ")

	if cloakedFile == "":
		cloakedFile = "tempList.txt"

	cipherPath = SelectFile(gCipherFiles, CIPHER)

	choice = input("Add noise to cloaked file? (y/n): ")
	if choice == "y":
		noisePath = SelectFile(gNoiseScripts, NOISE_GENERATOR)
	else:
		noisePath = None
	
	choice = input("Protect cloaked file with a password: (y/n): ")
	password = None
	if choice == "y":
		password = getPassword(True)

	print("")
	print(f"Creating cloaked file using cipher: {cipherPath}")

	try:
		cloakify.Cloakify(sourceFile, os.path.join(".", "ciphers", cipherPath), cloakedFile, password)
	except:
		print("")
		print("!!! Well that didn't go well. Verify that your cipher is in the 'ciphers/' subdirectory.")
		print("")

	if noisePath:
		print(f"Adding noise to cloaked file using noise generator: {noisePath}")
		try:
			noiseFuncs[noisePath](cloakedFile)
		except:
			print("")
			print("!!! Well that didn't go well. Verify that '", cloakedFile, "'")
			print("!!! is in the current working directory or try again giving full filepath.") 
			print("")

	print("")
	print("Cloaked file saved to:", cloakedFile)
	print("")

	choice = input( "Preview cloaked file? (y/n): " )
	if choice == "y":
		print("")
		with open(cloakedFile, encoding="utf-8") as file:
			for _ in range(20):
				print(file.readline())
		print("")

	choice = input( "Press return to continue... " )
Ejemplo n.º 3
0
def CloakifyPayload( sourceFile, cloakedFile, cipherFilePath ):

	print ""
	print "Creating cloaked file using cipher:", cipherFilePath

	try:
		cloakify.Cloakify( sourceFile, cipherFilePath, cloakedFile )

	except:
		print ""
		print "!!! Well that didn't go well. Verify that your cipher is in the 'ciphers/' subdirectory."
		print ""

	print ""
	print "Cloaked file saved to:", cloakedFile
	print ""

	return