medved/lib/plugin/plugins/Gopher.py

26 lines
579 B
Python
Raw Normal View History

2018-04-02 22:41:10 +00:00
import netaddr
from Config import cnf
from lib.plugin.plugins import BasePlugin
class Plugin(BasePlugin):
class TelegramMessage(BasePlugin.TelegramMessage):
def _init(self):
self._name = "Gopher"
def _generate(self):
class Pipeline(BasePlugin.Pipeline):
def _init(self):
self._name = "Gopher"
def run(self):
try:
self._find()
self._push()
except Exception as e:
self._logger.debug("Error occured: %s (%s)", e, self._host['ip'])
else:
self._logger.info("Succeeded for %s" % self._host['ip'])