atopos0627 / iphone-dataprotection

Automatically exported from code.google.com/p/iphone-dataprotection
0 stars 0 forks source link

keychain_tool fails to draw ascii tables #79

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Dump keychain from an iPhone 4, IOS 5 ipsw used to create the ram disk
2.Keychain_tool unlocks the keybag
3.error on creating ascii table

What is the expected output? What do you see instead?

Python dumps the following error:

Keybag unlocked with passcode key
Traceback (most recent call last):
  File "python_scripts/keychain_tool.py", line 72, in <module>
    main()
  File "python_scripts/keychain_tool.py", line 52, in main
    k.print_all(options.sanitize)
  File "/opt/pentest/iphone-dataprotection/python_scripts/keychain/keychain.py", line 142, in print_all
    print_table("Passwords", headers, rows)
  File "/opt/pentest/iphone-dataprotection/python_scripts/util/asciitables.py", line 6, in print_table
    z = map(len, [row[i] for row in rows])
AttributeError: Data instance has no attribute '__len__'

I can sucessfully decrypt an iPhone 3Gs, I suspect the asciitables.py is 
getting something it doesnt like!

What version of the product are you using? On what operating system?
OS X version : 10.8
XCode version : 4.5.1
Tools revision : 5bcac22b4bc8 tip

Please provide any additional information below.

Original issue reported on code.google.com by n...@0x00.me.uk on 16 Oct 2012 at 10:34

GoogleCodeExporter commented 9 years ago
So I added some debug breaks into the script, its failing at the following row:

[Data('Spotify.base'), "Data('deviceId')", 'numbers', 
'numbers.com.spotify.client', 'AfterFirstUnlockThisDeviceOnly']

Original comment by n...@0x00.me.uk on 16 Oct 2012 at 10:59

GoogleCodeExporter commented 9 years ago
The attached file at least prints out the contents of the keychain.

It does a check to see if Data( is within the row and then completely drops it, 
it does mess up the table formatting tho.

Original comment by n...@0x00.me.uk on 16 Oct 2012 at 11:21

Attachments:

GoogleCodeExporter commented 9 years ago
Found that just by adding str() onto the rows it fixes the issue

Original comment by n...@0x00.me.uk on 18 Oct 2012 at 8:55

Attachments:

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 7ae0e9ebbb57.

Original comment by jean.sig...@gmail.com on 21 Oct 2012 at 12:26

GoogleCodeExporter commented 9 years ago
Just pushed the fix, thanks a lot !

Original comment by jean.sig...@gmail.com on 21 Oct 2012 at 12:26