本文整理汇总了Python中commands.Commands.gathermd5s方法的典型用法代码示例。如果您正苦于以下问题:Python Commands.gathermd5s方法的具体用法?Python Commands.gathermd5s怎么用?Python Commands.gathermd5s使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类commands.Commands
的用法示例。
在下文中一共展示了Commands.gathermd5s方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: main
# 需要导入模块: from commands import Commands [as 别名]
# 或者: from commands.Commands import gathermd5s [as 别名]
def main(conffile=None, reobf_all=False):
commands = Commands(conffile)
commands.logger.info("== Reobfuscating client ==")
if commands.checkbins(0):
commands.cleanreobfdir(0)
commands.logger.info("> Gathering md5 checksums")
commands.gathermd5s(0, True)
commands.logger.info("> Compacting client bin directory")
commands.packbin(0)
commands.logger.info("> Reobfuscating client jar")
commands.reobfuscate(0)
commands.logger.info("> Extracting modified classes")
commands.unpackreobfclasses(0, reobf_all)
commands.logger.info("== Reobfuscating server ==")
if commands.checkbins(1):
commands.cleanreobfdir(1)
commands.logger.info("> Gathering md5 checksums")
commands.gathermd5s(1, True)
commands.logger.info("> Compacting server bin directory")
commands.packbin(1)
commands.logger.info("> Reobfuscating server jar")
commands.reobfuscate(1)
commands.logger.info("> Extracting modified classes")
commands.unpackreobfclasses(1, reobf_all)
示例2: main
# 需要导入模块: from commands import Commands [as 别名]
# 或者: from commands.Commands import gathermd5s [as 别名]
def main(conffile):
commands = Commands(conffile)
commands.logger.info ('== Reobfuscating client ==')
if commands.checkbins(0):
commands.cleanreobfdir(0)
commands.logger.info ('> Gathering md5 checksums')
commands.gathermd5s(0,True)
commands.logger.info ('> Compacting client bin directory')
commands.packbin(0)
commands.logger.info ('> Reobfuscating client jar')
commands.reobfuscate(0)
commands.logger.info ('> Extracting modified classes')
commands.unpackreobfclasses(0)
commands.logger.info ('== Reobfuscating server ==')
if commands.checkbins(1):
commands.cleanreobfdir(1)
commands.logger.info ('> Gathering md5 checksums')
commands.gathermd5s(1,True)
commands.logger.info ('> Compacting server bin directory')
commands.packbin(1)
commands.logger.info ('> Reobfuscating server jar')
commands.reobfuscate(1)
commands.logger.info ('> Extracting modified classes')
commands.unpackreobfclasses(1)
示例3: reobfuscate
# 需要导入模块: from commands import Commands [as 别名]
# 或者: from commands.Commands import gathermd5s [as 别名]
def reobfuscate(conffile=None, reobf_all=False):
commands = Commands(conffile)
try:
commands.logger.info('== Reobfuscating client ==')
if commands.checkbins(CLIENT):
commands.cleanreobfdir(CLIENT)
commands.logger.info('> Gathering md5 checksums')
commands.gathermd5s(CLIENT, True)
commands.logger.info('> Compacting client bin directory')
commands.packbin(CLIENT)
commands.logger.info('> Reobfuscating client jar')
commands.applyrg(CLIENT, True)
commands.logger.info('> Extracting modified classes')
commands.unpackreobfclasses(CLIENT, reobf_all)
commands.logger.info('== Reobfuscating server ==')
if commands.checkbins(SERVER):
commands.cleanreobfdir(SERVER)
commands.logger.info('> Gathering md5 checksums')
commands.gathermd5s(SERVER, True)
commands.logger.info('> Compacting server bin directory')
commands.packbin(SERVER)
commands.logger.info('> Reobfuscating server jar')
commands.applyrg(SERVER, True)
commands.logger.info('> Extracting modified classes')
commands.unpackreobfclasses(SERVER, reobf_all)
except Exception: # pylint: disable-msg=W0703
commands.logger.exception('FATAL ERROR')
sys.exit(1)
示例4: main
# 需要导入模块: from commands import Commands [as 别名]
# 或者: from commands.Commands import gathermd5s [as 别名]
def main(conffile=None):
commands = Commands(conffile)
commands.logger.info ('> Recompiling')
recompile.main(conffile)
commands.logger.info ('> Generating the md5 (client)')
commands.gathermd5s(0)
commands.logger.info ('> Generating the md5 (server)')
commands.gathermd5s(1)
示例5: main
# 需要导入模块: from commands import Commands [as 别名]
# 或者: from commands.Commands import gathermd5s [as 别名]
def main(conffile=None):
commands = Commands(conffile)
commands.logger.info ('> Getting modified client source')
if commands.checksources(0):
commands.gathermd5s(0, True)
commands.unpackmodifiedclasses(0)
commands.logger.info ('> Getting modified server source')
if commands.checksources(1):
commands.gathermd5s(1, True)
commands.unpackmodifiedclasses(1)
示例6: updatemd5
# 需要导入模块: from commands import Commands [as 别名]
# 或者: from commands.Commands import gathermd5s [as 别名]
def updatemd5(conffile=None):
commands = Commands(conffile)
try:
commands.logger.info('> Recompiling')
recompile(conffile)
commands.logger.info('> Generating the md5 (client)')
commands.gathermd5s(CLIENT)
commands.logger.info('> Generating the md5 (server)')
commands.gathermd5s(SERVER)
except Exception: # pylint: disable-msg=W0703
commands.logger.exception('FATAL ERROR')
sys.exit(1)
示例7: getmodsource
# 需要导入模块: from commands import Commands [as 别名]
# 或者: from commands.Commands import gathermd5s [as 别名]
def getmodsource(conffile=None):
commands = Commands(conffile)
try:
commands.logger.info('> Getting modified client source')
if commands.checksources(CLIENT):
commands.gathermd5s(CLIENT, True)
commands.unpackmodifiedclasses(CLIENT)
commands.logger.info('> Getting modified server source')
if commands.checksources(SERVER):
commands.gathermd5s(SERVER, True)
commands.unpackmodifiedclasses(SERVER)
except Exception: # pylint: disable-msg=W0703
commands.logger.exception('FATAL ERROR')
sys.exit(1)
示例8: main
# 需要导入模块: from commands import Commands [as 别名]
# 或者: from commands.Commands import gathermd5s [as 别名]
def main(conffile=None, force_jad=False):
commands = Commands(conffile)
commands.checkupdates()
cltdone = False
srvdone = False
use_ff = os.path.exists(commands.fernflower) and not force_jad
commands.logger.info ('> Creating Retroguard config files')
commands.creatergcfg()
srcdir = os.path.join(commands.srcclient, commands.ffsource).replace('/',os.sep).replace('\\',os.sep)
if not os.path.exists(srcdir):
commands.logger.info ('== Decompiling Client ==')
if commands.checkjars(0):
clienttime = time.time()
commands.logger.info ('> Creating SRGS for client')
commands.createsrgs(0)
commands.logger.info ('> Applying Retroguard to client')
commands.applyrg(0)
commands.logger.info ('> Applying Exceptor to client')
commands.applyexceptor(0)
if use_ff:
commands.logger.info ('> Decompiling...')
commands.applyff(0)
commands.logger.info ('> Unzipping the client sources')
commands.extractsrc(0)
commands.logger.info ('> Unzipping the client jar')
commands.extractjar(0)
if not use_ff:
commands.logger.info ('> Applying jadretro')
commands.applyjadretro(0)
commands.logger.info ('> Decompiling...')
commands.applyjad(0)
commands.logger.info ('> Applying patches')
if not use_ff:
commands.applypatches(0)
else:
commands.applyffpatches(0)
commands.logger.info ('> Renaming sources')
commands.rename(0)
commands.logger.info ('> Creating reobfuscation tables')
commands.renamereobsrg(0)
commands.logger.info ('> Done in %.2f seconds'%(time.time()-clienttime))
else:
commands.logger.warn ('!! Client already decompiled. Run cleanup before decompiling again !!')
cltdone = True
srcdir = os.path.join(commands.srcserver, commands.ffsource).replace('/',os.sep).replace('\\',os.sep)
if not os.path.exists(srcdir):
commands.logger.info ('== Decompiling Server ==')
if commands.checkjars(1):
servertime = time.time()
commands.logger.info ('> Creating SRGS for server')
commands.createsrgs(1)
commands.logger.info ('> Applying Retroguard to server')
commands.applyrg(1)
commands.logger.info ('> Applying Exceptor to server')
commands.applyexceptor(1)
if use_ff:
commands.logger.info ('> Decompiling...')
commands.applyff(1)
commands.logger.info ('> Unzipping the server sources')
commands.extractsrc(1)
commands.logger.info ('> Unzipping the server jar')
commands.extractjar(1)
if not use_ff:
commands.logger.info ('> Applying jadretro')
commands.applyjadretro(1)
commands.logger.info ('> Decompiling...')
commands.applyjad(1)
commands.logger.info ('> Applying patches')
if not use_ff:
commands.applypatches(1)
else:
commands.applyffpatches(1)
commands.logger.info ('> Renaming sources')
commands.rename(1)
commands.logger.info ('> Creating reobfuscation tables')
commands.renamereobsrg(1)
commands.logger.info ('> Done in %.2f seconds'%(time.time()-servertime))
else:
commands.logger.warn ('!! Server already decompiled. Run cleanup before decompiling again !!')
srvdone = True
commands.logger.info ('== Post decompiling operations ==')
if not cltdone or not srvdone:
commands.logger.info ('> Recompiling')
recompile.main(conffile)
if not cltdone:
commands.logger.info ('> Generating the md5 (client)')
commands.gathermd5s(0)
if not srvdone:
commands.logger.info ('> Generating the md5 (server)')
commands.gathermd5s(1)
示例9: decompile
# 需要导入模块: from commands import Commands [as 别名]
# 或者: from commands.Commands import gathermd5s [as 别名]
#.........这里部分代码省略.........
srcdir = os.path.join(commands.srcclient, os.path.normpath(commands.ffsource))
if not os.path.exists(srcdir):
commands.logger.info('== Decompiling Client ==')
if commands.checkjars(CLIENT):
clienttime = time.time()
commands.logger.info('> Creating SRGS for client')
commands.createsrgs(CLIENT)
commands.logger.info('> Applying Retroguard to client')
commands.applyrg(CLIENT)
commands.logger.info('> Applying Exceptor to client')
commands.applyexceptor(CLIENT)
if use_ff:
commands.logger.info('> Decompiling...')
commands.applyff(CLIENT)
commands.logger.info('> Unzipping the client sources')
commands.extractsrc(CLIENT)
commands.logger.info('> Unzipping the client jar')
commands.extractjar(CLIENT)
if not use_ff:
commands.logger.info('> Applying jadretro')
commands.applyjadretro(CLIENT)
commands.logger.info('> Decompiling...')
commands.applyjad(CLIENT)
commands.logger.info('> Copying the client sources')
commands.copysrc(CLIENT)
commands.logger.info('> Applying patches')
if commands.osname == 'osx' and not use_ff:
commands.applypatches(CLIENT, False, True)
commands.applypatches(CLIENT, use_ff)
commands.logger.info('> Removing comments')
commands.process_comments(CLIENT)
commands.logger.info('> Renaming sources')
commands.process_rename(CLIENT)
commands.logger.info('> Reformating sources')
commands.applyastyle(CLIENT)
commands.logger.info('> Commenting OpenGL constants')
commands.process_annotate(CLIENT)
commands.logger.info('> Creating reobfuscation tables')
commands.renamereobsrg(CLIENT)
commands.logger.info('> Done in %.2f seconds' % (time.time() - clienttime))
else:
commands.logger.warn('!! Client already decompiled. Run cleanup before decompiling again !!')
cltdone = True
srcdir = os.path.join(commands.srcserver, os.path.normpath(commands.ffsource))
if not os.path.exists(srcdir):
commands.logger.info('== Decompiling Server ==')
if commands.checkjars(SERVER):
servertime = time.time()
commands.logger.info('> Creating SRGS for server')
commands.createsrgs(SERVER)
commands.logger.info('> Applying Retroguard to server')
commands.applyrg(SERVER)
commands.logger.info('> Applying Exceptor to server')
commands.applyexceptor(SERVER)
if use_ff:
commands.logger.info('> Decompiling...')
commands.applyff(SERVER)
commands.logger.info('> Unzipping the server sources')
commands.extractsrc(SERVER)
commands.logger.info('> Unzipping the server jar')
commands.extractjar(SERVER)
if not use_ff:
commands.logger.info('> Applying jadretro')
commands.applyjadretro(SERVER)
commands.logger.info('> Decompiling...')
commands.applyjad(SERVER)
commands.logger.info('> Copying the server sources')
commands.copysrc(SERVER)
commands.logger.info('> Applying patches')
if commands.osname == 'osx' and not use_ff:
commands.applypatches(SERVER, False, True)
commands.applypatches(SERVER, use_ff)
commands.logger.info('> Removing comments')
commands.process_comments(SERVER)
commands.logger.info('> Renaming sources')
commands.process_rename(SERVER)
commands.logger.info('> Reformating sources')
commands.applyastyle(SERVER)
commands.logger.info('> Creating reobfuscation tables')
commands.renamereobsrg(SERVER)
commands.logger.info('> Done in %.2f seconds' % (time.time() - servertime))
else:
commands.logger.warn('!! Server already decompiled. Run cleanup before decompiling again !!')
srvdone = True
commands.logger.info('== Post decompiling operations ==')
if not cltdone or not srvdone:
commands.logger.info('> Recompiling')
recompile(conffile)
if not cltdone:
commands.logger.info('> Generating the md5 (client)')
commands.gathermd5s(CLIENT)
if not srvdone:
commands.logger.info('> Generating the md5 (server)')
commands.gathermd5s(SERVER)
except Exception: # pylint: disable-msg=W0703
commands.logger.exception('FATAL ERROR')
sys.exit(1)
示例10: main
# 需要导入模块: from commands import Commands [as 别名]
# 或者: from commands.Commands import gathermd5s [as 别名]
def main(conffile):
commands = Commands(conffile)
commands.checkupdates()
#TODO: Add a check for java here.
cltdone = False
srvdone = False
commands.logger.info ('> Creating Retroguard config files')
commands.creatergcfg()
if not os.path.exists(commands.srcclient):
commands.logger.info ('== Decompiling Client ==')
if commands.checkjars(0):
clienttime = time.time()
commands.logger.info ('> Creating SRGS for client')
commands.createsrgs(0)
commands.logger.info ('> Applying Retroguard to client')
commands.applyrg(0)
commands.logger.info ('> Unzipping the client jar')
commands.extractjar(0)
commands.logger.info ('> Applying jadretro')
commands.applyjadretro(0)
commands.logger.info ('> Decompiling...')
commands.applyjad(0)
commands.logger.info ('> Applying patches')
commands.applypatches(0)
commands.logger.info ('> Renaming sources')
commands.rename(0)
commands.logger.info ('> Creating reobfuscation tables')
#commands.createsaffx(0)
commands.renamereobsrg(0)
#print ('> Cleaning temp directory')
#commands.cleantempbin(0)
commands.logger.info ('> Done in %.2f seconds'%(time.time()-clienttime))
else:
commands.logger.warn ('!! Client already decompiled. Run cleanup before decompiling again !!')
cltdone = True
if not os.path.exists(commands.srcserver):
commands.logger.info ('== Decompiling Server ==')
if commands.checkjars(1):
servertime = time.time()
commands.logger.info ('> Creating SRGS for server')
commands.createsrgs(1)
commands.logger.info ('> Applying Retroguard to server')
commands.applyrg(1)
commands.logger.info ('> Unzipping the server jar')
commands.extractjar(1)
commands.logger.info ('> Applying jadretro')
commands.applyjadretro(1)
commands.logger.info ('> Decompiling...')
commands.applyjad(1)
commands.logger.info ('> Applying patches')
commands.applypatches(1)
commands.logger.info ('> Renaming sources')
commands.rename(1)
commands.logger.info ('> Creating reobfuscation tables')
#commands.createsaffx(1)
commands.renamereobsrg(1)
#print ('> Cleaning temp directory')
#commands.cleantempbin(1)
commands.logger.info ('> Done in %.2f seconds'%(time.time()-servertime))
else:
commands.logger.warn ('!! Server already decompiled. Run cleanup before decompiling again !!')
srvdone = True
commands.logger.info ('== Post decompiling operations ==')
if not cltdone or not srvdone:
commands.logger.info ('> Recompiling')
recompile.main(conffile)
if not cltdone:
commands.logger.info ('> Generating the md5 (client)')
commands.gathermd5s(0)
if not srvdone:
commands.logger.info ('> Generating the md5 (server)')
commands.gathermd5s(1)