freemyipod r180 - Code Review

Jump to: navigation, search
Repository:freemyipod
Revision:r179‎ | r180 | r181 >
Date:00:49, 27 August 2010
Author:theseven
Status:new
Tags:
Comment:
Prevent timeout during installer encryption
Modified paths:
  • /embios/trunk/tools/libipodcrypto.py (modified) (history)

Diff [purge]

Index: embios/trunk/tools/libipodcrypto.py
@@ -35,7 +35,7 @@
3636 header = "87011.0\0\0\x08\0\0" + struct.pack("<I", len(data))
3737 embios = libembios.Embios()
3838 embios.write(0x08000000, header.ljust(0x800, "\0") + data)
39 - embios.timeout = 20000
 39+ embios.lib.dev.timeout = 20000
4040 embios.hmac_sha1(0x08000800, len(data), 0x08000010)
4141 embios.hmac_sha1(0x08000000, 0x40, 0x08000040)
4242 embios.aesencrypt(0x08000000, len(data) + 0x800, 1)
@@ -45,7 +45,7 @@
4646 def nano2gdecryptdfu(data):
4747 embios = libembios.Embios()
4848 embios.write(0x08000000, data)
49 - embios.timeout = 20000
 49+ embios.lib.dev.timeout = 20000
5050 embios.aesdecrypt(0x08000000, len(data), 1)
5151 return embios.read(0x08000800, len(data) - 0x800)
5252
@@ -55,7 +55,7 @@
5656 header = "\0\0\0\0\0x02\0\0\0\0x01\0\0\0\0x40\0\0\0\0\0\0\0" + struct.pack("<I", len(data))
5757 embios = libembios.Embios()
5858 embios.write(0x08000000, header.ljust(0x800, "\0") + data)
59 - embios.timeout = 20000
 59+ embios.lib.dev.timeout = 20000
6060 embios.hmac_sha1(0x08000800, len(data), 0x0800001c)
6161 embios.hmac_sha1(0x08000000, 0x200, 0x080001d4)
6262 embios.aesencrypt(0x08000800, len(data), 1)
@@ -65,7 +65,7 @@
6666 def nano2gdecryptfirmware(data):
6767 embios = libembios.Embios()
6868 embios.write(0x08000000, data)
69 - embios.timeout = 20000
 69+ embios.lib.dev.timeout = 20000
7070 embios.aesdecrypt(0x08000800, len(data) - 0x800, 1)
7171 return embios.read(0x08000800, len(data) - 0x800)
7272