PDA

View Full Version : need a bit of help in decompiling a pyo file please



ian
04-11-2012, 11:02 AM
can anyone help me decompile a pyo file to py ?

i need to edit the default language in a movie streamer plugin,at the moment it connects to the host sites German section and i wish it to use the English section.

very simple changes,only need to edit the index php lang lines from de to eng ,but of course before this can be done it needs to be decompiled to the original source.

i can then post the plugin on here for everyone to use.

Ian.

peebee
04-11-2012, 11:27 AM
Have you tried any of these? :-

decompyle - sourceforge
alex/python-decompiler - github
warb/Python-Decompiler - github
wibiti/uncompyle2 - github
unpyc3 - ? (google)

I can't comment on any of them as I have not used them.

zeros
04-11-2012, 04:59 PM
I think that it is not easy! From py to get pyo would be easy to get pyo itself. The reverse is not possible easyly. But of course I am not expert and I only do my first steps in this field.

oldfart
05-11-2012, 12:12 AM
most of the programs quoted above work with .pyc files
There is one that does python v2.7 decoding, but the .pyo file Ian has is v2.6

peebee
05-11-2012, 01:00 AM
So .pyc files are intermediate code - not like source. I did not know - sorry to waste time.

ian
05-11-2012, 06:37 AM
yes i looked at the above programs and they are not suitable,but thanks anyway.

oldfart has also tried to decompile this file for me but to no avail.

it seems there is very little out there to do this sort of thing and even less in the way of tutorials so we can learn how to do this.
where and how do people learn on this subject ? where to programmers,image writers and plugin writers gain their knowledge ?

the really annoying thing here is that the original plugin for the dreambox is in the py form and so can easily be edited,its just the muppet who has hacked the plugin to make it work on the VU who has compiled it in the pyo form and it wasnt even his work to begin with.

its the knowledge to do the above that i wish to gain,but until we can figure out how to decomplie these files,i and others cannot even begin to learn.
the programs and the tutorials on how to do this must be out there as years ago i had a decomplied gbox 2.25 version and with that i was able to make all sorts of cool changes to how it shared and worked in my dreambox.

Ian.

peebee
05-11-2012, 08:41 PM
Hi Ian,

I've had another attempt at finding a Python decompiler for you - it can be found here --

hxxp://code.google.com/p/pyretic

and used the following article to help me use it --

hxxp://www.kelvinlomboy.com/a-walk-through-on-decompiling-a-malware-packed-with-py2exe

I took the plugin.pyo from the file in this post --

hxxp://www.satpimps.co.uk/showthread.php?159055-M2K-series-plugin

and produced the attached plugin.txt (.pyc) -- its not perfect.

I hope this helps.

Detlef
05-11-2012, 08:58 PM
I suppose you have already tried the simple method of inspecting the file with a hex editor. Quite often links are in plain text somewhere within the file. If the new link is the same length as the existing one - job done (but you may need to update the checksum).