示例#1
0
    def deactivate(self):
        """
		On deactivation check that the 'activated' flag was on then
		tell everything's ok to the test procedure.
		"""
        IPlugin.deactivate(self)
        TEST_MESSAGE("Deactivated Version 1.0!")
示例#2
0
文件: wemo.py 项目: maxvitek/footman
    def __init__(self):
        IPlugin.__init__(self)
        self.command_priority = 1
        self.voice = None
        bind_port = 54321  # number
        host = get_ip_addresses()[0]  # we just grab the first one that isn't local
        while bind_port < 54329:
            bind = '{0}:{1}'.format(host, str(bind_port))
            try:
                self.env = Environment(bind=bind, with_subscribers=False)
                self.env.start()
                break
            except:
                bind_port += 1

        # retrieve or create device cache
        self.devices = mc.get('footman_wemo_cache')
        if not self.devices:
            self.env.discover(5)
            self.devices = self.env.list_switches()
            mc.set('footman_wemo_cache', self.devices)
        self.log = logging.getLogger(__name__)

        self.commands = {
            '.*turn (?P<command>on|off).*(?P<device>' + '|'.join([d.lower() for d in self.devices]) + ').*': [
                {
                    'command': self.command,
                    'args': (None, None,),
                    'kwargs': {},
                    'command_priority': 0,
                }
            ]
        }
示例#3
0
	def activate(self):
		"""
		On activation tell that this has been successfull.
		"""
		# get the automatic procedure from IPlugin
		IPlugin.activate(self)
		return
示例#4
0
    def deactivate(self):
        """Deactivates the plugin.

        Also clears references to the IDE settings and global data
        """
        self.ide.deactivate()
        IPlugin.deactivate(self)
示例#5
0
文件: fa_plaso.py 项目: alpblt/efetch
 def __init__(self):
     self.display_name = 'Create Timeline'
     self.popularity = 5
     self.cache = False
     self.fast = False
     self.action = False
     IPlugin.__init__(self)
	def deactivate(self):
		"""
		On deactivation check that the 'activated' flag was on then
		tell everything's ok to the test procedure.
		"""
		IPlugin.deactivate(self)
		TEST_MESSAGE("Deactivated Version 1.2a1!")
示例#7
0
 def __init__(self):
     self.display_name = 'Toggle Bookmark'
     self.popularity = 0
     self.cache = False
     self.fast = False
     self.action = False
     IPlugin.__init__(self)
	def __init__(self):
		"""
		init
		"""
		# initialise parent class
		IPlugin.__init__(self)
		TEST_MESSAGE("Version 1.2a1")
示例#9
0
    def activate(self, ideSettings, ideGlobalData):
        """Activates the plugin.

        Also saves references to the IDE settings and global data
        """
        IPlugin.activate(self)
        self.ide.activate(ideSettings, ideGlobalData)
示例#10
0
 def __init__(self):
     self.display_name = 'File Hasher'
     self.popularity = 0
     self.cache = True
     self.fast = False
     self.action = True
     IPlugin.__init__(self)
示例#11
0
 def __init__(self):
     self.display_name = 'Toggle Bookmark'
     self.popularity = 0
     self.cache = False
     self.fast = False
     self.action = False
     IPlugin.__init__(self)
示例#12
0
	def activate(self):
		"""
		On activation tell that this has been successfull.
		"""
		# get the automatic procedure from IPlugin
		IPlugin.activate(self)
		return
示例#13
0
    def __init__(self, **kwargs):

        IPlugin.__init__(self)
        BaseView.__init__(self, **kwargs)
        self.manager = PluginManagerSingleton.get()
        self.logger = logging.getLogger(self.__class__.__name__)
        self.enabled = False

        self.viewable = False
        self.widgetized = False
        self.use_filestore = False
        self.use_sqllog = False

        #set defaults for template paths
        # ais/plugins/name/widget.html
        # ais/plugins/name/index.html
        path_items = inspect.getfile(self.__class__).split('/')[-3:-1]
        self.path = str.join('/', path_items)
        self.view_template = self.path + '/index.html'
        self.widget_template = self.path + '/widget.html'
        self.url = "/" + self.__class__.__name__.lower() + "/"
        self.filestore = None

        try:
            getattr(self.manager, 'app')
        except Exception:
            pass
        else:
            self.app = self.manager.app
        self.logger.debug("%s Init finished", self.__class__.__name__)
示例#14
0
 def __init__(self):
     self.display_name = 'File Hasher'
     self.popularity = 0
     self.cache = True
     self.fast = False
     self.action = True
     IPlugin.__init__(self)
示例#15
0
    def __init__(self):
        """
		init
		"""
        # initialise parent class
        IPlugin.__init__(self)
        TEST_MESSAGE("Version 1.1.1")
示例#16
0
 def __init__(self):
     self.display_name = 'SQLite Ajax'
     self.popularity = 0
     self.cache = True
     self.fast = False
     self.action = False
     IPlugin.__init__(self)
示例#17
0
    def __init__(self):
        IPlugin.__init__(self)
        self.command_priority = 2
        self.nest = None
        self.voice = None

        self.commands = {
            'what.*(?P<nest_temp>indoor temp).*': [{
                'command': self.get_temp,
                'args': (None, ),
                'kwargs': {},
                'command_priority': 0,
            }],
            'what.*(?P<nest_hum>indoor humid).*': [{
                'command': self.get_humidity,
                'args': (None, ),
                'kwargs': {},
                'command_priority': 0,
            }],
            'what.*(?P<nest_cond>indoor condition).*': [{
                'command': self.get_conditions,
                'args': (None, ),
                'kwargs': {},
                'command_priority': 0,
            }],
            'set.*indoor temp.*to (?P<set_nest_temp>\d*).*': [{
                'command':
                self.set_temp,
                'args': (None, ),
                'kwargs': {},
                'command_priority':
                0,
            }],
        }
示例#18
0
 def __init__(self):
     IPlugin.__init__(self)
     self.file_provider = FileProvider()
     self.plugin_name = self.__class__.__name__
     self.db = ReportDatabase()
     self.task_info = TaskInfo()
     self.register_vulns()
示例#19
0
 def __init__(self):
     self.display_name = 'Action'
     self.popularity = 0
     self.cache = False
     self.fast = True
     self.action = False
     IPlugin.__init__(self)
示例#20
0
    def __init__(self):
        IPlugin.__init__(self)
        self.command_priority = 1
        self.log = logging.getLogger(__name__)
        self.voice = None
        self.bridge = None
        self.lights = mc.get('footman_lights')
        if not self.lights:
            self.bridge = Bridge(ip=HUE_IP_ADDRESS, username=HUE_USER)
            self.api_data = self.bridge.get_api()
            self.lights = [
                self.api_data['lights'][key]['name']
                for key in self.api_data['lights'].keys()
            ]
            mc.set('footman_lights', self.lights)

        self.commands = {
            '.*(?P<command>turn on|turn off|dim|bright|crazy).*(?P<light>' + '|'.join([
                l.lower() for l in self.lights
            ]) + '|all).*light.*': [{
                'command': self.command,
                'args': (
                    None,
                    None,
                ),
                'kwargs': {},
                'command_priority': 0,
            }]
        }
示例#21
0
 def __init__(self):
     self.display_name = 'Thumbnail'
     self.popularity = 0
     self.cache = False
     self.fast = True
     self.action = True
     IPlugin.__init__(self)
示例#22
0
 def __init__(self):
     self.display_name = 'File Analyze'
     self.popularity = 0
     self.cache = False
     self.fast = False
     self.action = False
     self.ignore_loader = ['preview', 'fa_timeline']
     IPlugin.__init__(self)
示例#23
0
 def __init__(self):
     self.display_name = 'SQLite Viewer'
     self.popularity = 7
     self.cache = True
     self.fast = False
     self.action = False
     self.icon = 'fa-database'
     IPlugin.__init__(self)
示例#24
0
 def __init__(self):
     self.display_name = 'Download'
     self.popularity = 1
     self.cache = True
     self.fast = False
     self.action = False
     self.icon = 'fa-download'
     IPlugin.__init__(self)
示例#25
0
 def __init__(self):
     self.display_name = 'Reg. View'
     self.popularity = 8
     self.cache = True
     self.fast = False
     self.action = False
     self.icon = 'fa-windows'
     IPlugin.__init__(self)
示例#26
0
 def __init__(self):
     self.display_name = 'Download'
     self.popularity = 1
     self.cache = True
     self.fast = False
     self.action = False
     self.icon = 'fa-download'
     IPlugin.__init__(self)
示例#27
0
 def __init__(self):
     self.display_name = 'Raw View'
     self.popularity = 2
     self.cache = False
     self.fast = False
     self.action = False
     self.icon = 'fa-code'
     IPlugin.__init__(self)
示例#28
0
 def __init__(self):
     self.display_name = 'Hex View'
     self.popularity = 3
     self.cache = True
     self.fast = False
     self.action = False
     self.icon = 'fa-file-code-o'
     IPlugin.__init__(self)
示例#29
0
 def __init__(self):
     self.display_name = 'Exif Map'
     self.popularity = 0  # To enable change to 4
     self.cache = True
     self.fast = False
     self.action = False
     self.icon = 'fa-map-marker'
     IPlugin.__init__(self)
示例#30
0
 def __init__(self):
     self.display_name = 'Preview'
     self.popularity = 8
     self.cache = True
     self.fast = False
     self.action = False
     self.icon = 'fa-eye'
     IPlugin.__init__(self)
示例#31
0
 def __init__(self):
     self.display_name = 'Image OCR'
     self.popularity = 3
     self.cache = False
     self.fast = False
     self.action = True
     self.icon = 'fa-file-image-o'
     IPlugin.__init__(self)
示例#32
0
 def __init__(self, name=None):
     """Initialize the Mastiff plugin class."""
     IPlugin.__init__(self)
     self.name = name
     self.prereq = None
     self.yara_filetype = None
     self.page_data = output.page()
     self.page_data.meta['filename'] = 'CHANGEME'
示例#33
0
文件: analyze.py 项目: alpblt/efetch
 def __init__(self):
     self.display_name = 'File Analyze'
     self.popularity = 0
     self.cache = False
     self.fast = False
     self.action = False
     self.ignore_loader = ['preview', 'fa_timeline']
     IPlugin.__init__(self)
示例#34
0
 def __init__(self):
     self.display_name = 'Torrent'
     self.popularity = 7
     self.cache = True
     self.fast = False
     self.action = False
     self.icon = 'fa-exchange'
     IPlugin.__init__(self)
示例#35
0
 def __init__(self):
     self.display_name = 'Preview'
     self.popularity = 8
     self.cache = True
     self.fast = False
     self.action = False
     self.icon = 'fa-eye'
     IPlugin.__init__(self)
示例#36
0
 def __init__(self):
     self.display_name = 'PE File'
     self.popularity = 7
     self.cache = True
     self.fast = False
     self.action = False
     self.icon = 'fa-cog'
     IPlugin.__init__(self)
示例#37
0
 def __init__(self):
     self.display_name = "PDF Info"
     self.popularity = 5
     self.cache = True
     self.fast = False
     self.action = False
     self.icon = "fa-file-pdf-o"
     IPlugin.__init__(self)
示例#38
0
 def __init__(self):
     self.display_name = 'PST Viewer'
     self.popularity = 8
     self.cache = True
     self.fast = False
     self.action = False
     self.icon = 'fa-envelope-o'
     IPlugin.__init__(self)
示例#39
0
 def __init__(self):
     self.display_name = 'EXIF'
     self.popularity = 6
     self.cache = True
     self.fast = False
     self.action = False
     self.icon = 'fa-file-image-o'
     IPlugin.__init__(self)
示例#40
0
 def __init__(self):
     self.display_name = 'Exif Map'
     self.popularity = 0 # To enable change to 4
     self.cache = True
     self.fast = False
     self.action = False
     self.icon = 'fa-map-marker'
     IPlugin.__init__(self)
示例#41
0
 def __init__(self):
     self.display_name = 'Strings'
     self.popularity = 4
     self.cache = False
     self.fast = False
     self.action = False
     self.icon = 'fa-file-text-o'
     IPlugin.__init__(self)
示例#42
0
 def __init__(self):
     self.display_name = 'Torrent'
     self.popularity = 7
     self.cache = True
     self.fast = False
     self.action = False
     self.icon = 'fa-exchange'
     IPlugin.__init__(self)
示例#43
0
 def __init__(self, name=None):
     """Initialize the Mastiff plugin class."""
     IPlugin.__init__(self)
     self.name = name
     self.prereq = None
     self.yara_filetype = None
     self.page_data = output.page()
     self.page_data.meta['filename'] = 'CHANGEME'
示例#44
0
 def __init__(self):
     self.display_name = 'Hex View'
     self.popularity = 3
     self.cache = True
     self.fast = False
     self.action = False
     self.icon = 'fa-file-code-o'
     IPlugin.__init__(self)
示例#45
0
	def activate(self):
		"""
		On activation tell that this has been successfull.
		"""
		# get the automatic procedure from IPlugin
		IPlugin.activate(self)
		TEST_MESSAGE("Activated Version 1.2a1!")
		return
示例#46
0
 def __init__(self):
     self.display_name = 'PDF Info'
     self.popularity = 5
     self.cache = True
     self.fast = False
     self.action = False
     self.icon = 'fa-file-pdf-o'
     IPlugin.__init__(self)
示例#47
0
    def activate(self):
        """
		On activation tell that this has been successfull.
		"""
        # get the automatic procedure from IPlugin
        IPlugin.activate(self)
        TEST_MESSAGE("Activated Version 1.0!")
        return
示例#48
0
 def __init__(self):
     self.display_name = 'Log2Timeline'
     self.popularity = 0
     self.cache = False
     self._default_plugin = 'analyze/'
     self.fast = True
     self.action = False
     self.icon = 'fa-list'
     IPlugin.__init__(self)
示例#49
0
 def __init__(self):
     """Creates a nimbus plugin"""
     
     IPlugin.__init__(self)
     
     self.config = dict()
     self.nimbus = None
     
     self.thread = threads.NimbusThread(config=self.config, nimbus=self.nimbus)
示例#50
0
	def __init__(self, receiveFrames=False):
		"""
		Set up internal state, read configuration, etc.
		@param receiveFrames If True, register to have _frameReceived
			be called.
		"""
		IPlugin.__init__(self)

		self.__receiveFrames = bool(receiveFrames)
示例#51
0
 def deactivate(self):
     """
     Just call the parent class's method
     """
     if len(self._supported_dbms)>0:
         get_notification_center().disconnectDBSettingChanged(self.connect_to_db)
     self.option_widgets = {}
     removeLogger(self.plugin_name)
     IPlugin.deactivate(self)
示例#52
0
 def __init__(self):
     self.display_name = 'Overview'
     self.popularity = 10
     self.cache = False
     self._order = [ 'thumbnail', 'path', 'mtime', 'atime', 'ctime', 'crtime', 'file_size', 'pid', 'mimetype', 'dir',
                     'name', 'ext', 'root', 'iid']
     self.fast = False
     self.action = False
     IPlugin.__init__(self)
示例#53
0
 def __init__(self):
     self.display_name = 'Log2Timeline'
     self.popularity = 0
     self.cache = False
     self._default_plugin = 'analyze/'
     self.fast = True
     self.action = False
     self.icon = 'fa-list'
     IPlugin.__init__(self)
示例#54
0
	def activate(self):
		"""
		Start doing things: connect to signals, send commands, etc.
		"""
		IPlugin.activate(self)
		if self.__receiveFrames:
			def handleFrameCb(sender=None, signal=None, frame=None):
				self._frameReceived(frame)
			signals.FRAME_RECEIVED.connect(handleFrameCb)
			self.__handleFrameCb = handleFrameCb
示例#55
0
 def __init__(self):
     self.display_name = 'Action AJAX'
     self.popularity = 0
     self.cache = False
     self.fast = True
     self.action = False
     self._actions = {}
     self._thread_pool_size = max([multiprocessing.cpu_count() - 1, 1])
     self._thread_pool = ThreadPool(processes=self._thread_pool_size)
     self._max_queue_size = 25
     self._max_size = 10000
     IPlugin.__init__(self)
示例#56
0
    def __init__(self):
        self.display_name = 'Navigate'
        self.popularity = 9
        self.cache = False
        self.fast = False
        self.action = False
        self.icon = 'fa-folder-o'

        self._file_plugin = 'analyze'
        self._dir_plugin = 'directory'
        self._evidence_plugin = 'directory'

        IPlugin.__init__(self)