Exemple #1
0
def writeOther(path, data, dohex=False):
	chunks = findEncryptedChunks(data)
	with open(path, "wb") as f:
		hexlinelen = HEXLINELENGTH // 2
		for isEncrypted, chunk in chunks:
			if isEncrypted:
				code = 2
			else:
				code = 1
			if code == 2 and dohex:
				while chunk:
					f.write(eexec.hexString(chunk[:hexlinelen]))
					f.write(b'\r')
					chunk = chunk[hexlinelen:]
			else:
				f.write(chunk)
Exemple #2
0
def writeOther(path, data, dohex=False):
    chunks = findEncryptedChunks(data)
    with open(path, "wb") as f:
        hexlinelen = HEXLINELENGTH // 2
        for isEncrypted, chunk in chunks:
            if isEncrypted:
                code = 2
            else:
                code = 1
            if code == 2 and dohex:
                while chunk:
                    f.write(eexec.hexString(chunk[:hexlinelen]))
                    f.write(b'\r')
                    chunk = chunk[hexlinelen:]
            else:
                f.write(chunk)
Exemple #3
0
def writeOther(path, data, dohex=0):
    chunks = findEncryptedChunks(data)
    f = open(path, "wb")
    try:
        hexlinelen = HEXLINELENGTH / 2
        for isEncrypted, chunk in chunks:
            if isEncrypted:
                code = 2
            else:
                code = 1
            if code == 2 and dohex:
                while chunk:
                    f.write(eexec.hexString(chunk[:hexlinelen]))
                    f.write('\r')
                    chunk = chunk[hexlinelen:]
            else:
                f.write(chunk)
    finally:
        f.close()
Exemple #4
0
def writeOther(path, data, dohex = 0):
	chunks = findEncryptedChunks(data)
	f = open(path, "wb")
	try:
		hexlinelen = HEXLINELENGTH / 2
		for isEncrypted, chunk in chunks:
			if isEncrypted:
				code = 2
			else:
				code = 1
			if code == 2 and dohex:
				while chunk:
					f.write(eexec.hexString(chunk[:hexlinelen]))
					f.write('\r')
					chunk = chunk[hexlinelen:]
			else:
				f.write(chunk)
	finally:
		f.close()