POCS 类型插件
POCS 类型插件用来自定义在系统初始化时候加载 PoC 脚本的功能,例如从 redis 或数据库加载 PoC 脚本代码。
from pocsuite3.api import PluginBase
from pocsuite3.api import PLUGIN_TYPE
from pocsuite3.api import logger
from pocsuite3.api import register_plugin
class TargetPluginDemo(PluginBase):
category = PLUGIN_TYPE.POCS
def init(self):
pocs = [POC_CODE_1, POC_CODE_2] # load PoC code from redis, database ...
count = 0
for poc in pocs:
if poc and self.add_poc(poc):
count += 1
info_msg = "[PLUGIN] get {0} poc(s) from demo".format(count)
logger.info(info_msg)
register_plugin(TargetPluginDemo)