本文整理汇总了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)