[Tutor] Converting From Unicode to ASCII!!

Steven D'Aprano steve at pearwood.info
Tue Feb 8 12:48:34 CET 2011


Nevins Duret wrote:

> A good friend of mine locked herself out of her computer and forgot her
> password.  I pretty much scoured the internet as 
> a resource only to hit a brick wall.  I tried using ophcrack version 2.3.1
> in order to obtain the password and felt completely at home 
> being that it was Linux,  but then towards the end it failed and the output
> of this file which seems to contain the Users and passwords
> but in Unicode format:
> 
>  
> 
> Administrator:500::31d6cfe0d16ae931b73c59d7e0c089c 0:::
> Guest:501::31d6cfe0d16ae931b73c59d7e0c089c0:::
> SUPPORT_388945a0:1002::881037e0b6909b04b6900f7c806 dca6e:::
> HelpAssistant:1004:b209ce7e3ff7aea1131906e9f5df481
> 9:d83f663c50bcd5815ccb94f9e38a9a4b:::
> Beverly:1005:00006395b1acd69aaad3b435b51404ee:992a
> c78ffb08204c592c6e47b916f85d:::

I see no Unicode there. It looks like plain ASCII. Are you sure you 
understand how to use ophcrack? Perhaps you should be asking on a 
ophcrack mailing list (if they have one).


> And it didn't complete as a result of this error message:
> 
> Tables found:
> /mnt/hdc/tables/xp_free_small
> 
> Found one partition that contains hashes:
> /mnt/hda1/WINDOWS/system32/config
> 
> Starting Ophcrack
> QIconvCodec::convertFromUnicode: using ASCII for conversion, iconv_open
> failed
> QIconvCodec::convertToUnicode: using ASCII for conversion, iconv_open failed
> /home/tux/launch.sh: line 100: 1044 Killed
> ABLES_INLINE -w $FOUND/ -n $numcpu -o /tmp/ophcrack.txt $opts
> Press a key to exit::

Looks to me like a bug in ophcrack, although I could be wrong.


> Now , I remember reading somewhere that Python is very good for converting
> Unicode
> data into ASCII and admittedly know nothing about this:  

Before asking any more questions about converting Unicode to ASCII, I 
think you need to read this article:

http://www.joelonsoftware.com/articles/Unicode.html

You can't just "convert" Unicode to ASCII -- what would you expect to 
get if you convert (say) "πΣՋوຜ₦ℵ↷"? For starters, you need to know what 
encoding(s) are being used.


> Is there a work around in Python where I can simply import the file like and
> convert it to readable string using 
> A for loop.

Import *which* file?

What does ophcrack consider "readable"?

How do you know that you're not making the problem worse?

No, don't go down this track. You'll probably end up making your 
friend's computer completely unusable without a complete re-build. My 
advice is to start with Microsoft's instructions:

http://support.microsoft.com/kb/321305

and if they aren't helpful, then try using a Linux live cd to reset the 
password. You can find instructions on the internet, such as:

http://www.ehow.com/how_6532691_change-xp-password-linux.html
http://www.psychocats.net/ubuntucat/resetwindowspassword/


-- 
Steven



More information about the Tutor mailing list