×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Mar 2008
    Posts
    7

    decompiled pyc text ?

    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.

  2. #2
    Regular Contributor
    Join Date
    Jan 2004
    Location
    Helsinki
    Posts
    376

    Re: decompiled pyc text ?

    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

    http://mfabrik.com
    http://blog.mfabrik.com

  3. #3
    Registered User
    Join Date
    Feb 2007
    Location
    Kyiv (Ukraine)
    Posts
    83

    Re: decompiled pyc text ?

    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')
    Выйти
    >>>

  4. #4
    Registered User
    Join Date
    Mar 2008
    Posts
    7

    Re: decompiled pyc text ?

    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.

  5. #5
    Registered User
    Join Date
    Mar 2008
    Posts
    7

    Re: decompiled pyc text ?

    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?

  6. #6
    Regular Contributor
    Join Date
    Dec 2007
    Location
    India
    Posts
    133

    Re: decompiled pyc text ?

    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

Similar Threads

  1. TextWrapper example class
    By miohtama in forum Symbian
    Replies: 6
    Last Post: 2008-03-08, 11:46
  2. Exit form from edit mode
    By tqchcm in forum Symbian User Interface
    Replies: 13
    Last Post: 2007-10-31, 06:06
  3. Rendering text in multiple languages
    By TheLittleBird in forum Symbian
    Replies: 0
    Last Post: 2007-06-05, 12:52
  4. Replies: 0
    Last Post: 2004-11-24, 18:49

Posting Permissions

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