freemyipod r397 - Code Review

Jump to: navigation, search
Repository:freemyipod
Revision:r396‎ | r397 | r398 >
Date:02:17, 30 December 2010
Author:farthen
Status:new
Tags:
Comment:
libipodcrypto.py: Remove timeout changes as they are all already in libembios.py
Modified paths:
  • /embios/trunk/tools/libipodcrypto.py (modified) (history)

Diff [purge]

Index: embios/trunk/tools/libipodcrypto.py
@@ -37,7 +37,6 @@
3838 header = "87011.0\0\0\x08\0\0" + struct.pack("<I", len(data))
3939 embios = libembios.Embios()
4040 embios.write(0x08000000, header.ljust(0x800, "\0") + data)
41 - embios.lib.dev.timeout = 20000
4241 embios.hmac_sha1(0x08000800, len(data), 0x08000010)
4342 embios.hmac_sha1(0x08000000, 0x40, 0x08000040)
4443 embios.aesencrypt(0x08000000, len(data) + 0x800, 1)
@@ -47,7 +46,6 @@
4847 def s5l8701decryptdfu(data):
4948 embios = libembios.Embios()
5049 embios.write(0x08000000, data)
51 - embios.lib.dev.timeout = 20000
5250 embios.aesdecrypt(0x08000000, len(data), 1)
5351 return embios.read(0x08000800, len(data) - 0x800)
5452
@@ -57,7 +55,6 @@
5856 header = "\0\0\0\0\x02\0\0\0\x01\0\0\0\x40\0\0\0\0\0\0\0" + struct.pack("<I", len(data))
5957 embios = libembios.Embios()
6058 embios.write(0x08000000, header.ljust(0x800, "\0") + data)
61 - embios.lib.dev.timeout = 20000
6259 embios.hmac_sha1(0x08000800, len(data), 0x0800001c)
6360 embios.hmac_sha1(0x08000000, 0x200, 0x080001d4)
6461 embios.aesencrypt(0x08000800, len(data), 1)
@@ -67,7 +64,6 @@
6865 def s5l8701decryptfirmware(data):
6966 embios = libembios.Embios()
7067 embios.write(0x08000000, data)
71 - embios.lib.dev.timeout = 20000
7268 embios.aesdecrypt(0x08000800, len(data) - 0x800, 1)
7369 return embios.read(0x08000800, len(data) - 0x800)
7470
@@ -77,7 +73,6 @@
7874 header = "87021.0\x01\0\0\0\0" + struct.pack("<I", len(data)) + hashlib.sha1(data).digest()[:0x10]
7975 embios = libembios.Embios()
8076 embios.write(0x08000000, header.ljust(0x800, "\0") + data)
81 - embios.lib.dev.timeout = 20000
8277 embios.aesencrypt(0x08000800, len(data), 2)
8378 embios.aesencrypt(0x08000010, 0x10, 2)
8479 embios.write(0x08000040, hashlib.sha1(embios.read(0x08000000, 0x40)).digest()[:0x10])
@@ -88,7 +83,6 @@
8984 def s5l8702decryptnor(data):
9085 embios = libembios.Embios()
9186 embios.write(0x08000000, data[0x800:])
92 - embios.lib.dev.timeout = 20000
9387 embios.aesdecrypt(0x08000000, len(data) - 0x800, 1)
9488 return embios.read(0x08000000, len(data) - 0x800)
9589
@@ -99,7 +93,6 @@
10094 header = ("87021.0\x03\0\0\0\0" + struct.pack("<IIII", len(data) - 0x830, len(data) - 0x4f6, len(data) - 0x7b0, 0x2ba)).ljust(0x40, "\0")
10195 embios = libembios.Embios()
10296 embios.write(0x08000000, header + hashlib.sha1(header).digest()[:0x10])
103 - embios.lib.dev.timeout = 5000
10497 embios.aesencrypt(0x08000040, 0x10, 1)
10598 return embios.read(0x08000000, 0x50) + data + cert.ljust((len(cert) + 0xf) & ~0xf, "\0")
10699