本文整理匯總了Python中pluginmanager.PluginManager.plugin_run方法的典型用法代碼示例。如果您正苦於以下問題:Python PluginManager.plugin_run方法的具體用法?Python PluginManager.plugin_run怎麽用?Python PluginManager.plugin_run使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類pluginmanager.PluginManager
的用法示例。
在下文中一共展示了PluginManager.plugin_run方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: Coffesploit
# 需要導入模塊: from pluginmanager import PluginManager [as 別名]
# 或者: from pluginmanager.PluginManager import plugin_run [as 別名]
class Coffesploit(object):
"""Main Class"""
def __init__(self, basepath):
self.target = Target()
self.tool = None
self.pluginmanager = PluginManager()
self.helper = Help()
self.basepath = basepath
def set_target(self,rhost=None,url=None):
if url is not None:
self.target.seturl(url)
if rhost is not None:
self.target.setrhost(rhost)
def set(self, arg1, arg2):
self.pluginmanager.current_plugin.set_arg(arg1,arg2)
def show(self,arg):
if arg == "target":
print "ip:",self.target.getrhost(),"url:",self.target.geturl()
if arg == "status":
if self.pluginmanager.current_plugin is not None:
self.pluginmanager.plugin_status()
if arg == "version":
print "Currnt Version:",self.version()
def use(self,arg):
self.pluginmanager.load_plugin(arg)
def run(self):
self.pluginmanager.plugin_run()
self.pluginmanager.plugin_result()
def main_help (self):
return self.helper.main_help()
def main_list (self):
return self.pluginmanager.importer.get_plugins_list()
def help(self,arg):
"""show help info of t"""
if arg == "target":
self.helper.help_set_tartget()
if arg == "show":
self.helper.help_show()
if arg == "use":
self.helper.help_use()
def exit(self):
exit(0)
def version(self):
return __Version__