cezarica Posted June 23, 2015 Share Posted June 23, 2015 Hi, could someone tell me how to decompile attached file for the sake of learning Python? movingforecaster.zip 2 @ Quote Link to comment Short link Share on other sites More sharing options...
ahwa Posted June 23, 2015 Share Posted June 23, 2015 (edited) ....................... Edited June 24, 2015 by ahwa 1 @ Quote Link to comment Short link Share on other sites More sharing options...
cezarica Posted June 23, 2015 Author Share Posted June 23, 2015 (edited) Attached is the entire inspect with no error, but I want it back to normal py code. How is this encoded? Edited June 24, 2015 by cezarica @ Quote Link to comment Short link Share on other sites More sharing options...
ahwa Posted June 23, 2015 Share Posted June 23, 2015 (edited) ........................ Edited June 24, 2015 by ahwa @ Quote Link to comment Short link Share on other sites More sharing options...
StranikS_Scan Posted June 23, 2015 Share Posted June 23, 2015 (edited) # File: movingforecaster.pyc (Python 2.7) from debug_utils import * from AvatarInputHandler.aims import Aim import AvatarInputHandler.aims as AvatarInputHandler import BigWorld import os import GUI import Math import tutorial.control.battle.functional as tutorial import TriggersManager import ResMgr import constants oldupdateMarkerPos = Aim.updateMarkerPos marker = None showtime = 0 targetid = None descr = None def newupdateMarkerPos(self, pos, relaxTime): global targetid, marker, showtime, targetid, descr, marker, targetid, marker oldupdateMarkerPos(self, pos, relaxTime) if not constants.IS_CHINA: if self.mode != 'strategic': if marker is not None: targetid = None marker.clear() marker = None return None now = None.time() newtarget = AvatarInputHandler.aims._g_aimState['target'] if newtarget['id'] is not None and not newtarget['isFriend']: showtime = now targetid = newtarget['id'] if now - showtime < 30 and targetid is not None: if descr is None: player = BigWorld.player() descr = player.vehicleTypeDescriptor veh = BigWorld.entity(targetid) if veh is None: if marker is not None: marker.clear() marker = None return None flyTime = None() / descr.shot['speed'] mm = Math.Matrix(veh.matrix) pos = mm.translation + flyTime * veh.filter.speedInfo.value[0] * mm.applyToAxis(2) if marker is None or marker._StaticObjectMarker3D__model is None: marker = tutorial.control.battle.functional._StaticObjectMarker3D({ 'action': '', 'path': 'content/Interface/CheckPoint/CheckPoint_green.model', 'offset': (0, 3, 0) }, pos) else: marker._StaticObjectMarker3D__model.position = Math.Vector3(pos[:]) + (0, 3, 0) elif marker is not None and now - showtime > 30: targetid = None marker.clear() marker = None def getAimDistance(): (x, y, z) = BigWorld.player().gunRotator.markerInfo[0] v = BigWorld.player().getOwnVehiclePosition() - Math.Vector3(x, y, z) return int(v.length) Aim.updateMarkerPos = newupdateMarkerPos Edited June 23, 2015 by StranikS_Scan 1 @ Quote Link to comment Short link Share on other sites More sharing options...
ahwa Posted June 23, 2015 Share Posted June 23, 2015 (edited) ................... Edited June 24, 2015 by ahwa @ Quote Link to comment Short link Share on other sites More sharing options...
cezarica Posted June 23, 2015 Author Share Posted June 23, 2015 (edited) How did you decode the file? Как вы расшифровать файл? Edited June 23, 2015 by cezarica @ Quote Link to comment Short link Share on other sites More sharing options...
adri1 Posted June 24, 2015 Share Posted June 24, 2015 How did you decode the file? Как вы расшифровать файл? It's a custom opcode. Just skip the custom code. # File: movingforecaster.pyc (Python 2.7) I don't think to decompile the obfuscated code is a good idea. Even though the obfuscate skill is poor. It's show the attitude that I don't what anybody modify it. The cheat mods were used to sell in China. I don't want it become a part of money tools. So I disabled the mod in China. I sincerely hope that you delete the reply. PS: I tried to decompile the obfuscated code by Pjorion or mercger. But I failed. @ Quote Link to comment Short link Share on other sites More sharing options...
cezarica Posted June 24, 2015 Author Share Posted June 24, 2015 (edited) And how to skip that? Could you elaborate? Oh sorry. StranikS_Scan please edit and hide the decoded code. А как, чтобы пропустить? Не могли бы вы пояснить? Ой извините. StranikS_Scan пожалуйста редактировать и скрыть декодированного кода. Edited June 24, 2015 by cezarica @ Quote Link to comment Short link Share on other sites More sharing options...
ahwa Posted June 24, 2015 Share Posted June 24, 2015 (edited) 你看看 作者都出来了 唉 adri1对不起 我说出你的秘密了 adri1 我已经删除我的回复啦 真对不起了 And how to skip that? Could you elaborate? Oh sorry. StranikS_Scan please edit and hide the decoded code. А как, чтобы пропустить? Не могли бы вы пояснить? Ой извините. StranikS_Scan пожалуйста редактировать и скрыть декодированного кода. cezarica: Some things can not really say itYou always want to study itI am also here to learn decompilePeople here will not tell you Edited June 24, 2015 by ahwa @ Quote Link to comment Short link Share on other sites More sharing options...
cezarica Posted June 24, 2015 Author Share Posted June 24, 2015 (edited) Send me a PM then. :) Отправить мне в ПМ то. :) PS: I use Google Translate. Edited June 24, 2015 by cezarica @ Quote Link to comment Short link Share on other sites More sharing options...
StranikS_Scan Posted June 24, 2015 Share Posted June 24, 2015 (edited) I don't think to decompile the obfuscated code is a good idea. Even though the obfuscate skill is poor. It's show the attitude that I don't what anybody modify it. The cheat mods were used to sell in China. I don't want it become a part of money tools. So I disabled the mod in China. I sincerely hope that you delete the reply. This mod is not protected. Changing one or two bytecode on the fake code - it is not a defense. To real obfuscating and protecting mods use functions in PjOrion. Edited June 24, 2015 by StranikS_Scan @ Quote Link to comment Short link Share on other sites More sharing options...
adri1 Posted June 25, 2015 Share Posted June 25, 2015 This mod is not protected. Changing one or two bytecode on the fake code - it is not a defense. To real obfuscating and protecting mods use functions in PjOrion. Yes, it's not in a good protected. Until the day before yesterday, I just found PjOrion and your post about python code obfuscation. I make the mod at the version 0.9.4. Before I put it on 4cheat, I was looking for how to obfuscate it. At last, I make a new opcode to disable the simple decompile program. May I ask three question? 1. How you obfuscate the pyc. I fount it combine a lot of jump and except jump. Do you add new code to the original code and modify the untouched byte. Or you just modify byte to implement obfuscate. 2. Can you decompile the pyc under PjOrion's obfuscation. 3. Do you have any idea about WOWS's pyc. How does they compile the python? Do they use a special version python. 你看看 作者都出来了 唉 adri1对不起 我说出你的秘密了 adri1 我已经删除我的回复啦 真对不起了 我没什么秘密,如果是本着研究和学习的态度,我愿意公开我的源码,实际上也没什么高难度的内容,我只是不想看到我的插件跑到国内的作弊插件软件上。 我也知道这些作弊插件软件的作者有一定的技术实力。比如用了base64和marshal加密代码然后从服务器端动态获取代码。所以不加密或者简单的加密没什么用,像修改opcode这种已经是有一些资料而且涉及一些比较难的内容的办法了,当然这种办法肯定是无法阻挡StranikS这种牛人的。但是我本来也并不是想把代码藏的多深。 其实我挺害怕在外服论坛看到国人,因为国人有一些技术实力的大都认识。不认识的人,我不确定他们是否是外挂插件的传播者。 @ Quote Link to comment Short link Share on other sites More sharing options...
StranikS_Scan Posted June 25, 2015 Share Posted June 25, 2015 1. How you obfuscate the pyc. Use obfuscated+protected in PjOrion. It's all that I can write to you. 2. Can you decompile the pyc under PjOrion's obfuscation. I can not 3. Do you have any idea about WOWS's pyc. This is a game for the closed test, so the game files are encrypted of the game engine. When the test is finished the files will be decrypted. @ Quote Link to comment Short link Share on other sites More sharing options...
cezarica Posted June 25, 2015 Author Share Posted June 25, 2015 StranikS_Scan could you elaborate on how you decompiled the above code? @ Quote Link to comment Short link Share on other sites More sharing options...
StranikS_Scan Posted June 25, 2015 Share Posted June 25, 2015 StranikS_Scan could you elaborate on how you decompiled the above code? No @ Quote Link to comment Short link Share on other sites More sharing options...
cezarica Posted June 25, 2015 Author Share Posted June 25, 2015 (edited) I honestly want to learn new stuff, see how someone implemented various features and not to decode other people hard work, take credit for it and sell that on whatever site to whomever offers the most. There are a lot of assholes doing that already.. Wanted to see how (the method) one would decode that pyc file, the process of getting the code, not necesarly adri1's code. I managed to decode some of the scrips I found around, and based on a few examples managed to make my own things that kept for myself. Thank you anyway. Edited June 25, 2015 by cezarica @ Quote Link to comment Short link Share on other sites More sharing options...
vizhu Posted December 20, 2015 Share Posted December 20, 2015 Расскажите плз. http://www.koreanrandom.com/forum/topic/26841-%D0%BD%D1%83%D0%B6%D0%BD%D0%B0-%D0%BF%D0%BE%D0%BC%D0%BE%D1%89%D1%8C/page-2?do=findComment&comment=306063 @ Quote Link to comment Short link Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.