You Are Here:

Community: Developer Discussion Boards

#1 Old decompiled pyc text ? - 2008-03-28, 20:01

Join Date: Mar 2008
Posts: 7
gormmark
Offline
Registered User
hia guys iv only been learning python for a few months but i was just wondering if anyone knows what format nomal text is changed into after a file has been compiled to pyc then decompiled again using the decompyle method?

Im trying to translate an application at the moment from russian to english but after iv decompiled the pyc file i can see the python code fine its just where the russian text should be in a query for example it comes out something like this

(ru('xd0\x92\xd1\x8b\xd0\xb9\xd1\x82\xd0\xb8')

iv tried just adding d092d18bd0b9d182d0b8 from that string into MDCrack but it says its not md5 or recognisable hashes and iv tried the whole string as hex with no luck either. Does anyone know what type of hashes this is or how to make python print this again as readable so i can try and start translating the application by copy and pasting the russian text into a translator.

cheers for your time guys.
Reply With Quote

#2 Old Re: decompiled pyc text ? - 2008-03-30, 23:24

Join Date: Jan 2004
Posts: 368
Location: Helsinki
Send a message via Skype™ to miohtama
miohtama's Avatar
miohtama
Offline
Regular Contributor
Quote:
Originally Posted by gormmark View Post
(ru('xd0\x92\xd1\x8b\xd0\xb9\xd1\x82\xd0\xb8')

iv tried just adding d092d18bd0b9d182d0b8 from that string into MDCrack but it says its not md5 or recognisable hashes and iv tried the whole string as hex with no luck either. Does anyone know what type of hashes this is or how to make python print this again as readable so i can try and start translating the application by copy and pasting the russian text into a translator.

cheers for your time guys.
Looks like normal string escape codes me me. Just print it in your Python console.

>>> print "\xd0\x92\xd1\x8b\xd0\xb9\xd1\x82\xd0\xb8"
ÐÑйÑи

You might need to set charmap first somehow. I don't know how it works, so don't ask from me.


Mikko Ohtamaa
Twinapex Research
http://www.twinapex.com
Reply With Quote

#3 Old Re: decompiled pyc text ? - 2008-03-31, 17:20

Join Date: Feb 2007
Posts: 80
Location: Kyiv (Ukraine)
Send a message via MSN to Maxim6630
Maxim6630
Offline
Regular Contributor
Quote:
Originally Posted by gormmark View Post
hia guys iv only been learning python for a few months but i was just wondering if anyone knows what format nomal text is changed into after a file has been compiled to pyc then decompiled again using the decompyle method?

Im trying to translate an application at the moment from russian to english but after iv decompiled the pyc file i can see the python code fine its just where the russian text should be in a query for example it comes out something like this

(ru('xd0\x92\xd1\x8b\xd0\xb9\xd1\x82\xd0\xb8')
Hi gormmark!

It's verry simple, all russian text after decompiled looks so.

Code:
>>> a='\xd0\x92\xd1\x8b\xd0\xb9\xd1\x82\xd0\xb8'
>>> print unicode(a,'utf-8')
Выйти
>>>
Reply With Quote

#4 Old Re: decompiled pyc text ? - 2008-04-01, 03:03

Join Date: Mar 2008
Posts: 7
gormmark
Offline
Registered User
Quote:
Originally Posted by Maxim6630 View Post
Hi gormmark!

It's verry simple, all russian text after decompiled looks so.

Code:
>>> a='\xd0\x92\xd1\x8b\xd0\xb9\xd1\x82\xd0\xb8'
>>> print unicode(a,'utf-8')
Выйти
>>>
Thanks very much, i had been stuck on that for a while an now it looks so simple lol thanks again mate your a life saver.
Reply With Quote

#5 Old Re: decompiled pyc text ? - 2008-04-02, 21:43

Join Date: Mar 2008
Posts: 7
gormmark
Offline
Registered User
Is it possable to use this code with the raw_input command:

a='\xd0\x92\xd1\x8b\xd0\xb9\xd1\x82\xd0\xb8'
print unicode(a,'utf-8')
Выйти

when i looked around on google i noticed posts saying that unicode cant be used with raw_input, is this true and i can only use this in idle?
Reply With Quote

#6 Old Re: decompiled pyc text ? - 2008-04-03, 05:37

Join Date: Dec 2007
Posts: 134
Location: India
kandyfloss's Avatar
kandyfloss
Offline
Regular Contributor
I am not sure but I remember sometime when I have tried this, Unicode input does,nt work with raw input. But I don't use the raw input nowadays specially in PyS60,


Kandyfloss

V 7.0642.0
18-10-06
RH-51
Nokia 7610
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
TextWrapper example class miohtama Python 6 2008-03-08 12:46
Exit form from edit mode tqchcm Symbian User Interface 13 2007-10-31 07:06
Writing chinese text on emulator TheLittleBird Symbian 1 2007-06-15 12:41
Rendering text in multiple languages TheLittleBird General Symbian C++ 0 2007-06-05 13:52
Persist text value of user defined option in Enumerated Text Settings List leethomso Symbian User Interface 0 2004-11-24 19:49

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia