Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 3
0
Archivo: t1Lib.py Proyecto: wondie/stdm
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()
Ejemplo n.º 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()