Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _create_name_and_type(self, name_method_index, descriptor_method_index) :
name_and_type_index = self.get_name_and_type_index( name_method_index, descriptor_method_index )
if name_and_type_index == -1 :
new_nat = CreateNameAndType( self, name_method_index, descriptor_method_index )
self.add_constant_pool( NameAndType( self, bytecode.BuffHandle( new_nat.get_raw() ) ) )
name_and_type_index = self.get_constant_pool_count() - 1
return name_and_type_index
def __init__(self, raw_buff):
self.reset()
self.valid_axml = True
self.buff = bytecode.BuffHandle(raw_buff)
axml_file = unpack('
def __init__(self, raw_buff):
self.reset()
self.valid_axml = True
self.buff = bytecode.BuffHandle(raw_buff)
axml_file = unpack('
def __init__(self, raw_buff) :
self.reset()
self.buff = bytecode.BuffHandle( raw_buff )
self.buff.read(4)
self.buff.read(4)
self.sb = StringBlock( self.buff )
self.m_resourceIDs = []
self.m_prefixuri = {}
self.m_uriprefix = {}
self.m_prefixuriL = []
def __init__(self, raw_buff):
self.analyzed = False
self.buff = bytecode.BuffHandle(raw_buff)
#print "SIZE", hex(self.buff.size())
self.header = ARSCHeader(self.buff)
self.packageCount = unpack('
def add_string(self, name) :
name_index = self.get_string_index(name)
if name_index != -1 :
return name_index
tag_value = INVERT_CONSTANT_INFO[ "CONSTANT_Utf8" ]
buff = pack( CONSTANT_INFO[ tag_value ][1], tag_value, len(name) ) + pack( ">%ss" % len(name), name )
ci = CONSTANT_INFO[ tag_value ][-1]( self, bytecode.BuffHandle( buff ) )
self.constant_pool.append( ci )
self.constant_pool_count.set_value( self.constant_pool_count.get_value() + 1 )
return self.constant_pool_count.get_value() - 1
def __init__(self, raw_buff):
self.reset()
self.buff = bytecode.BuffHandle(raw_buff)
self.buff.read(4)
self.buff.read(4)
self.sb = StringBlock(self.buff)
self.m_resourceIDs = []
self.m_prefixuri = {}
self.m_uriprefix = {}
self.m_prefixuriL = []
def create_method_ref(self, new_class_index, new_name_and_type_index) :
new_mr_index = self.get_method_ref_index( new_class_index, new_name_and_type_index )
if new_mr_index == -1 :
new_mr = CreateMethodRef( self, new_class_index, new_name_and_type_index )
self.add_constant_pool( MethodRef( self, bytecode.BuffHandle( new_mr.get_raw() ) ) )
new_mr_index = self.get_constant_pool_count() - 1
return new_mr_index
def __init__(self, raw_buff) :
self.reset()
self.buff = bytecode.BuffHandle( raw_buff )
self.buff.read(4)
self.buff.read(4)
self.sb = StringBlock( self.buff )
self.m_resourceIDs = []
self.m_prefixuri = {}
self.m_uriprefix = {}
self.m_prefixuriL = []