예제 #1
0
    def do_use(self, plugin):
        """
        加载插件
        :param plugin: string, 插件名称
        :return:
        """
        #在use新插件的时候要清除已经设置的变量以及结果
        initializeKb()
        ClearConf()

        kb.CurrentPlugin = plugin
        zsp = PluginBase(package='zsplugins')
        plugin_zsp = zsp.make_plugin_source(
            searchpath=[paths.ZEROSCAN_PLUGINS_PATH])
        expNames = plugin_zsp.list_plugins()
        if kb.CurrentPlugin:
            if plugin in expNames:
                self.prompt = "ZEROScan exploit({color}{content}{color_reset}) > ".format(
                    color=Fore.RED,
                    content=kb.CurrentPlugin,
                    color_reset=Fore.RESET)
            else:
                log.error("plugin is not exist!")
        else:
            log.error("use <plugin>")
예제 #2
0
def main():
    paths.ZEROSCAN_ROOT_PATH = modulePath()
    setPaths()
    kb.unloadedList = {}
    initializeKb()
    initializeExp()
    zs = baseConsole()
    zs.cmdloop()
예제 #3
0
def main():
    paths.ZEROSCAN_ROOT_PATH = modulePath()
    setPaths()
    kb.unloadedList = {}
    initializeKb()
    initializeExp()
    zs = baseConsole()
    zs.cmdloop()
예제 #4
0
 def do_back(self, line):
     """
     返回主菜单
     :param line:
     :return:
     """
     ClearConf()
     initializeKb()
     self.current_plugin = ""
     self.prompt = "ZEROScan > "
예제 #5
0
파일: consoles.py 프로젝트: zer0yu/ZEROScan
 def do_back(self, line):
     """
     返回主菜单
     :param line:
     :return:
     """
     ClearConf()
     initializeKb()
     self.current_plugin = ""
     self.prompt = "ZEROScan > "
예제 #6
0
파일: consoles.py 프로젝트: zer0yu/ZEROScan
    def do_use(self, plugin):
        """
        加载插件
        :param plugin: string, 插件名称
        :return:
        """
        #在use新插件的时候要清除已经设置的变量以及结果
        initializeKb()
        ClearConf()

        kb.CurrentPlugin = plugin
        zsp = PluginBase(package='zsplugins')
        plugin_zsp = zsp.make_plugin_source(searchpath=[paths.ZEROSCAN_PLUGINS_PATH])
        expNames = plugin_zsp.list_plugins()
        if kb.CurrentPlugin:
            if plugin in expNames:
                self.prompt = "ZEROScan exploit({color}{content}{color_reset}) > ".format(
                    color=Fore.RED, content=kb.CurrentPlugin, color_reset=Fore.RESET)
            else:
                log.error("plugin is not exist!")
        else:
            log.error("use <plugin>")
예제 #7
0
 def do_set(self, arg):
     """
     设置参数
     :param arg: string, 以空格分割 option, value
     :return:
     """
     try:
         initializeKb()
         if kb.CurrentPlugin:
             if len(arg.split()) == 2:
                 option = arg.split()[0]
                 value = arg.split()[1]
                 rn = SetOption(option, value)
                 if rn.startswith("Invalid option:"):
                     log.error(rn)
                 else:
                     print rn
             else:
                 log.error("set <option> <value>")
         else:
             log.error("Select a plugin first.")
     except:
         log.error("Select a plugin first.")
예제 #8
0
파일: consoles.py 프로젝트: zer0yu/ZEROScan
 def do_set(self, arg):
     """
     设置参数
     :param arg: string, 以空格分割 option, value
     :return:
     """
     try:
         initializeKb()
         if kb.CurrentPlugin:
             if len(arg.split()) == 2:
                 option = arg.split()[0]
                 value = arg.split()[1]
                 rn = SetOption(option, value)
                 if rn.startswith("Invalid option:"):
                     log.error(rn)
                 else:
                     print rn
             else:
                 log.error("set <option> <value>")
         else:
             log.error("Select a plugin first.")
     except:
         log.error("Select a plugin first.")
예제 #9
0
 def do_clear(self, args):
     initializeKb()
     pass
예제 #10
0
 def do_clear(self, args):
     initializeKb()
     pass
예제 #11
0
#-*- coding:utf-8 -*-

"""
Copyright (c) 2014-2015 pocsuite developers (http://sebug.net)
See the file 'docs/COPYING' for copying permission
"""

import sys
from pocsuite import modulePath
from lib.core.consoles import baseConsole
from lib.core.data import kb
from lib.core.data import paths
from lib.core.common import setPaths
from lib.core.consoles import initializePoc
from lib.core.option import initializeKb


if __name__ == "__main__":
    folders, sys.argv = sys.argv[1:], sys.argv[:1]

    
    paths.POCSUITE_ROOT_PATH = modulePath()
    setPaths()
    kb.unloadedList = {}

    initializeKb()
    initializePoc(folders)

    pcs = baseConsole()
    pcs.cmdloop()
예제 #12
0
#!/usr/bin/env python
#-*- coding:utf-8 -*-
"""
Copyright (c) 2014-2015 pocsuite developers (http://sebug.net)
See the file 'docs/COPYING' for copying permission
"""

import sys
from pocsuite import modulePath
from lib.core.consoles import baseConsole
from lib.core.data import kb
from lib.core.data import paths
from lib.core.common import setPaths
from lib.core.consoles import initializePoc
from lib.core.option import initializeKb

if __name__ == "__main__":
    folders, sys.argv = sys.argv[1:], sys.argv[:1]

    paths.POCSUITE_ROOT_PATH = modulePath()
    setPaths()
    kb.unloadedList = {}

    initializeKb()
    initializePoc(folders)

    pcs = baseConsole()
    pcs.cmdloop()