本文整理匯總了Python中common.set_plugin_members方法的典型用法代碼示例。如果您正苦於以下問題:Python common.set_plugin_members方法的具體用法?Python common.set_plugin_members怎麽用?Python common.set_plugin_members使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類common
的用法示例。
在下文中一共展示了common.set_plugin_members方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: calculate
# 需要導入模塊: import common [as 別名]
# 或者: from common import set_plugin_members [as 別名]
def calculate(self):
common.set_plugin_members(self)
if self._config.SYSCALL_INDEXES:
index_names = self._parse_handler_names()
else:
index_names = None
sym_addrs = self.profile.get_all_addresses()
table_addr = self.addr_space.profile.get_symbol("_sysent")
nsysent = obj.Object("int", offset = self.addr_space.profile.get_symbol("_nsysent"), vm = self.addr_space)
sysents = obj.Object(theType = "Array", offset = table_addr, vm = self.addr_space, count = nsysent, targetType = "sysent")
for (i, sysent) in enumerate(sysents):
ent_addr = sysent.sy_call.v()
hooked = ent_addr not in sym_addrs
if index_names:
sym_name = index_names[i]
else:
sym_name = self.profile.get_symbol_by_address("kernel", ent_addr)
if not sym_name:
sym_name = "N/A"
yield (table_addr, "SyscallTable", i, ent_addr, sym_name, hooked)
示例2: calculate
# 需要導入模塊: import common [as 別名]
# 或者: from common import set_plugin_members [as 別名]
def calculate(self):
common.set_plugin_members(self)
if self._config.SYSCALL_INDEXES:
index_names = self._parse_handler_names()
else:
index_names = None
sym_addrs = self.profile.get_all_addresses()
table_addr = self.addr_space.profile.get_symbol("_sysent")
nsysent = obj.Object("int", offset = self.addr_space.profile.get_symbol("_nsysent"), vm = self.addr_space)
if nsysent == None or nsysent == 0:
return
sysents = obj.Object(theType = "Array", offset = table_addr, vm = self.addr_space, count = nsysent, targetType = "sysent")
if sysents == None:
return
for (i, sysent) in enumerate(sysents):
ent_addr = sysent.sy_call.v()
hooked = ent_addr not in sym_addrs
if index_names:
sym_name = index_names[i]
else:
sym_name = self.profile.get_symbol_by_address("kernel", ent_addr)
if not sym_name:
sym_name = "N/A"
yield (table_addr, "SyscallTable", i, ent_addr, sym_name, hooked)
示例3: calculate
# 需要導入模塊: import common [as 別名]
# 或者: from common import set_plugin_members [as 別名]
def calculate(self):
common.set_plugin_members(self)
if self._config.SYSCALL_INDEXES:
index_names = self._parse_handler_names()
else:
index_names = None
sym_addrs = self.profile.get_all_addresses()
table_addr = self.addr_space.profile.get_symbol("_sysent")
nsysent = obj.Object("int", offset = self.addr_space.profile.get_symbol("_nsysent"), vm = self.addr_space)
sysents = obj.Object(theType = "Array", offset = table_addr, vm = self.addr_space, count = nsysent, targetType = "sysent")
for (i, sysent) in enumerate(sysents):
ent_addr = sysent.sy_call.v()
hooked = ent_addr not in sym_addrs
if index_names:
sym_name = index_names[i]
else:
sym_name = self.profile.get_symbol_by_address("kernel", ent_addr)
if not sym_name:
sym_name = "N/A"
yield (table_addr, "SyscallTable", i, ent_addr, hooked, sym_name)