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, } ] }
def __init__(self): """ init """ # initialise parent class IPlugin.__init__(self) TEST_MESSAGE("Version 1.1.1")
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): self.display_name = 'Create Timeline' self.popularity = 5 self.cache = False self.fast = False self.action = False IPlugin.__init__(self)
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__)
def __init__(self): self.display_name = 'File Hasher' self.popularity = 0 self.cache = True self.fast = False self.action = True IPlugin.__init__(self)
def __init__(self): self.display_name = 'Action' self.popularity = 0 self.cache = False self.fast = True self.action = False IPlugin.__init__(self)
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, }] }
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, }], }
def __init__(self): self.display_name = 'SQLite Ajax' self.popularity = 0 self.cache = True self.fast = False self.action = False IPlugin.__init__(self)
def __init__(self): """ init """ # initialise parent class IPlugin.__init__(self) TEST_MESSAGE("Version 1.2a1")
def __init__(self): self.display_name = 'Thumbnail' self.popularity = 0 self.cache = False self.fast = True self.action = True IPlugin.__init__(self)
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()
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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'
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)
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)
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)
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)
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)
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)
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)
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)
def __init__(self): # extend __init__ super class IPlugin.__init__(self) # instantiate main components self.tx = TxData() self.prod_master = ProductMaster() self.cust_master = CustomerMaster() self.quote = Quote() self.price_model = PriceModel() # cds_plot lives here rather than quote because they draw on several main components self.cds_plot = ColumnDataSource(data=dict(x=[0], y=[0], attr_label=[''], attr_name=[''])) # plot_filters lives here because it's drawing from several main components self.plot_filters = [MultiSelect(title='Product_filter', value=[''], options=[''])] self.plot_filters[0].on_change('value', self.update_plot) # configuration backup settings self.backup_loc = TextInput(value=getcwd()) self.backup_config_button = Button(label='Output config', button_type='success') self.backup_config_button.on_click(self.output_config) self.config_data_input = FileInput(accept=".json") self.config_data_input.on_change('value', self.load_config) self.datafile_selector = RadioButtonGroup(labels=['Tx data', 'Product master', 'Customer master'], active=0) self.datafile_selector.on_change('active', self.refresh_view) # define and initialize views (and their layout attributes) self.view_quote = QuoteView(self) self.view_price_mgt = PriceMgtView(self) self.view_price_model_config = PriceModelConfigView(self) self.view_attr_settings = AttrSettingsView(self) self.view_settings = SettingsView(self) self.tabs = Tabs( tabs=[Panel(child=self.view_quote.layout, title='Quote'), Panel(child=self.view_price_mgt.layout, title='Price Management'), Panel(child=self.view_price_model_config.layout, title='Price adjustments'), Panel(child=self.view_attr_settings.layout, title='Attribute Settings'), Panel(child=self.view_settings.layout, title='Settings')]) # define some on_change events self.price_model.price_group_selector.on_change('active', self.refresh_view) self.price_model.num_prod_groups.on_change('value', self.refresh_view, self.update_on_change) self.price_model.num_customer_groups.on_change('value', self.refresh_view) self.tx.num_columns.on_change('value', self.refresh_view) self.prod_master.num_columns.on_change('value', self.refresh_view) self.cust_master.num_columns.on_change('value', self.refresh_view) for pg in self.price_model.price_groups: pg.num_attributes.on_change('value', self.refresh_view, self.update_on_change) for attr in pg.attributes: attr.sourcefile.on_change('value', partial(attr.update_sourcecolumns_options, cpq=self)) attr.num_configs.on_change('value', self.refresh_view, self.update_on_change, self.update_quote_filters)
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)
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)
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)
def __init__(self): IPlugin.__init__(self) self.name = self.__class__.__name__ self.logger = logging.getLogger("Plugin:%s" % self.name) self.raiseEvent = EventRaiser( self, self.events, self.event_args, self.logger) self.trigger = None #def raiseEvent(self, name, eventList, logger, watchdog): """dummy, will be set to a new EventRaiser in __init__"""
def __init__(self): IPlugin.__init__(self) self.command_priority = 1 self.voice = None self.apex = None self.commands = { '.*(?P<command>turn on|turn off).*aquarium (?P<outlet>.*)': [ { 'command': self.command, 'args': (None, None,), 'kwargs': {}, 'command_priority': 0, } ] }
def __init__(self): IPlugin.__init__(self) self.command_priority = 0 self.client = wolframalpha.Client(WOLFRAM_ALPHA_API_KEY) self.voice = None self.commands = { '(?P<query>.*)': [ { 'command': self.speak_query_result, 'args': (None,), 'kwargs': {}, 'command_priority': 0, }, ] }
def __init__(self): IPlugin.__init__(self) self.command_priority = 1 self.engine = pyttsx.init() self.log = logging.getLogger(__name__) if VOICE_ID: self.engine.setProperty('voice', VOICE_ID) self.commands = { 'say (?P<speech>.*)': [ { 'command': self.say, 'args': (None,), 'kwargs': {}, 'command_priority': 0, } ] }
def __init__(self): IPlugin.__init__(self) self.command_priority = 1 self.log = logging.getLogger(__name__) self.voice = None self.commands = {} for comm in COMMANDLINE_COMMANDS: self.commands[comm['regex']] = [ { 'command': self.command, 'args': (None,), 'kwargs': { 'command': comm['command'], 'success_message': comm['success_message'], 'read_output': comm['read_output'], }, 'command_priority': 0, } ]