Example #1
0
def main(args):
	tmpdir = tempfile.mkdtemp()
	zipfile = ZipFile(args.apk_file)
	zipfile.extractall(tmpdir)
	import_plugins()
	processing_modules = Obfuscator.__subclasses__()
	try:
		for module in processing_modules:
			module(tmpdir, config.get(module.__name__, {})).run()
	except Exception as ex:
		logging.error('Exception encountered: %s' % str(ex))
		shutil.rmtree(tmpdir)
		return
	if args.force_overwrite or not os.path.isfile(args.outfile):
		zipdir(tmpdir, args.outfile, args.keep_meta)
	else:
		logging.error('Output file already exists (use -f to overwrite)!')
	shutil.rmtree(tmpdir)
Example #2
0
def main(args):
    tmpdir = tempfile.mkdtemp()
    zipfile = ZipFile(args.apk_file)
    zipfile.extractall(tmpdir)
    import_plugins()
    processing_modules = Obfuscator.__subclasses__()
    try:
        for module in processing_modules:
            module(tmpdir, config.get(module.__name__, {})).run()
    except Exception as ex:
        logging.error('Exception encountered: %s' % str(ex))
        shutil.rmtree(tmpdir)
        return
    if args.force_overwrite or not os.path.isfile(args.outfile):
        zipdir(tmpdir, args.outfile, args.keep_meta)
    else:
        logging.error('Output file already exists (use -f to overwrite)!')
    shutil.rmtree(tmpdir)
Example #3
0
 def __init__(self, path, config):
     Obfuscator.__init__(self, path, config)
     self.axml = AXML(os.path.join(path, 'AndroidManifest.xml'))
Example #4
0
	def __init__(self, path, config):
		Obfuscator.__init__(self, path, config)
		self.axml = AXML(os.path.join(path, 'AndroidManifest.xml'))