当前位置: 首页>>代码示例>>Python>>正文


Python shared.ScannerPlugin类代码示例

本文整理汇总了Python中fuglu.shared.ScannerPlugin的典型用法代码示例。如果您正苦于以下问题:Python ScannerPlugin类的具体用法?Python ScannerPlugin怎么用?Python ScannerPlugin使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了ScannerPlugin类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

 def __init__(self, config, section=None):
     ScannerPlugin.__init__(self, config, section)
     self.backend = None
     self.logger = self._logger()
     self.requiredvars = {
         'redis': {
             'default': 'localhost:6379:0',
             'description': 'redis config: host:port:db',
         },
         # commented, for now we only want the count
         # 'lowthreshold':{
         #     'default':'1',
         #     'description': 'threshold for adding <headername>: LOW',
         # },
         # 'highthreshold':{
         #     'default':'3',
         #     'description': 'threshold for adding <headername>: HIGH',
         # },
         'headername': {
             'default': 'X-FuZor',
              'description': 'header name',
         },
         'maxsize': {
             'default': '600000',
             'description':
                 'maxsize in bytes, larger messages will be skipped'
         },
         'timeout': {
             'default': '2',
             'description': 'timeout in seconds'
         },
     }
开发者ID:gryphius,项目名称:fuglu-extra-plugins,代码行数:32,代码来源:fuzor.py

示例2: __init__

    def __init__(self, config, section=None):
        ScannerPlugin.__init__(self, config, section)
        self.requiredvars = {
            'template_blockedfile': {
                'default': '/etc/fuglu/templates/blockedfile.tmpl',
                'description': 'Mail template for the bounce to inform sender about blocked attachment',
            },

            'sendbounce': {
                'default': '1',
                'description': 'inform the sender about blocked attachments.\nIf a previous plugin tagged the message as spam or infected, no bounce will be sent to prevent backscatter',
            },

            'rulesdir': {
                'default': '/etc/fuglu/rules',
                'description': 'directory that contains attachment rules',
            },

            'blockaction': {
                'default': 'DELETE',
                'description': 'what should the plugin do when a blocked attachment is detected\nREJECT : reject the message (recommended in pre-queue mode)\nDELETE : discard messages\nDUNNO  : mark as blocked but continue anyway (eg. if you have a later quarantine plugin)',
            },

            'dbconnectstring': {
                'default': '',
                'description': 'sqlalchemy connectstring to load rules from a database and use files only as fallback. requires SQL extension to be enabled',
                'confidential': True,
            },

            'query': {
                'default': 'SELECT action,regex,description FROM attachmentrules WHERE scope=:scope AND checktype=:checktype ORDER BY prio',
                'description': "sql query to load rules from a db. #:scope will be replaced by the recipient address first, then by the recipient domain\n:check will be replaced 'filename','contenttype','archive-filename' or 'archive-contenttype'",
            },

            'checkarchivenames': {
                'default': '0',
                'description': "enable scanning of filenames within archives (zip,rar). This does not actually extract the files, it just looks at the filenames found in the archive."
            },

            'checkarchivecontent': {
                'default': '0',
                'description': 'extract compressed archives(zip,rar) and check file content type with libmagics\nnote that the files will be extracted into memory - tune archivecontentmaxsize  accordingly.\nfuglu does not extract archives within the archive(recursion)',
            },

            'archivecontentmaxsize': {
                'default': '5000000',
                'description': 'only extract and examine files up to this amount of (uncompressed) bytes',
            },

        }

        self.logger = self._logger()
        self.rulescache = None
        self.extremeverbosity = False

        # remember that the order is important here, if we support tar.gz and
        # gz in the future make sure tar.gz comes first!
        self.supported_archive_extensions = ['zip', ]
        if RARFILE_AVAILABLE:
            self.supported_archive_extensions.append('rar')
开发者ID:wbnxvzqbrfagznggre,项目名称:fuglu,代码行数:60,代码来源:attachment.py

示例3: __init__

 def __init__(self,config,section=None):
     ScannerPlugin.__init__(self,config,section)
     self.requiredvars={
             'privatekeyfile':{
              'description':"Location of the private key file. supports standard template variables plus additional ${header_from_domain} which extracts the domain name from the From: -Header",
              'default':"/etc/fuglu/dkim/${header_from_domain}.key",                  
             },
                        
             'canonicalizeheaders':{
              'description':"Type of header canonicalization (simple or relaxed)",
              'default':"relaxed",
             },
                        
             'canonicalizebody':{
              'description':"Type of body canonicalization (simple or relaxed)",
              'default':"relaxed",
             },
                        
             'selector':{
              'description':'selector to use when signing, supports templates',
              'default':'default',
             },
                        
             'signheaders':{
              'description':'comma separated list of headers to sign. empty string=sign all headers',
              'default':'',
             },
                        
             'signbodylength':{
               'description':'include l= tag in dkim header',
               'default':'False',                
             },
     }
开发者ID:gryphius,项目名称:fuglu-travis-test,代码行数:33,代码来源:domainauth.py

示例4: __init__

    def __init__(self, section=None):
        ScannerPlugin.__init__(self, section)
        self.filelist = FileList(strip=True, skip_empty=True, skip_comments=True, lowercase=True,
                                 additional_filters=None, minimum_time_between_reloads=30)

        self.requiredvars = {
            'domainsfile': {
                'default': '/etc/fuglu/spearphish-domains',
                'description': 'Filename where we load spearphish domains from. One domain per line. If this setting is empty, the check will be applied to all domains.',
            },
            'virusenginename': {
                'default': 'Fuglu SpearPhishing Protection',
                'description': 'Name of this plugins av engine',
            },
            'virusname': {
                'default': 'TRAIT.SPEARPHISH',
                'description': 'Name to use as virus signature',
            },
            'virusaction': {
                'default': 'DEFAULTVIRUSACTION',
                'description': "action if spear phishing attempt is detected (DUNNO, REJECT, DELETE)",
            },
            'rejectmessage': {
                'default': 'threat detected: ${virusname}',
                'description': "reject message template if running in pre-queue mode and virusaction=REJECT",
            },
        }
开发者ID:gryphius,项目名称:fuglu,代码行数:27,代码来源:domainauth.py

示例5: __init__

    def __init__(self, config, section=None):
        ScannerPlugin.__init__(self, config, section)

        self.requiredvars = {
            "yararulesdir": {
                "default": "/etc/fuglu/yararules",
                "description": "Directory containing one or more YARA rule files",
            },
            "archivecontentmaxsize": {
                "default": "5000000",
                "description": "only extract and examine files up to this amount of (uncompressed) bytes",
            },
            "virusaction": {
                "default": "DEFAULTVIRUSACTION",
                "description": "action if infection is detected (DUNNO, REJECT, DELETE)",
            },
            "problemaction": {"default": "DEFER", "description": "action if there is a problem (DUNNO, DEFER)"},
            "rejectmessage": {
                "default": "threat detected in ${infectedfile}: ${virusname}",
                "description": "reject message template if running in pre-queue mode and virusaction=REJECT",
            },
        }
        self.filter = None
        self.logger = self._logger()
        self.lastreload = 0
        self.compiled_rules = None

        # remember that the order is important here, if we support tar.gz and
        # gz in the future make sure tar.gz comes first!
        self.supported_archive_extensions = ["zip"]
        if RARFILE_AVAILABLE:
            self.supported_archive_extensions.append("rar")
开发者ID:gryphius,项目名称:fuglu-extra-plugins,代码行数:32,代码来源:fuyara.py

示例6: __init__

 def __init__(self,config,section=None):
     ScannerPlugin.__init__(self,config,section)
     self.logger=logging.getLogger('fuglu.plugin.DomainAction')
 
     self.requiredvars={       
         'blacklistconfig':{
             'default':'/etc/fuglu/rbl.conf',
             'description':'RBL Lookup config file',
         },
         'checksubdomains':{
             'default':'yes',
             'description':'check subdomains as well (from top to bottom, eg. example.com, bla.example.com, blubb.bla.example.com',
         },
             
         'action':{
             'default':'reject',
             'description':'action on hit (reject, delete, etc)',
         }, 
                        
         'message':{
             'default':'5.7.1 black listed URL ${domain} by ${blacklist}',
             'description':'message template for rejects/ok messages',
         }, 
                        
         'maxdomains':{
             'default':'10',
             'description':'maximum number of domains to check per message',
         }
         
     }
     
     self.rbllookup=None
     self.tldmagic=None
开发者ID:gryphius,项目名称:fuglu-extra-plugins,代码行数:33,代码来源:uriextract.py

示例7: __init__

    def __init__(self, config, section=None):
        ScannerPlugin.__init__(self, config, section)

        self.requiredvars = {
            "path": {
                "default": "/usr/local/fuglu/deliver/${to_address}",
                "description": "Path to maildir / mbox file, supports templates",
            },
            # maybe we need to support our own locking later, for now we use python's built-ins
            #'locktype':{
            #    'default':'',
            #    'description':"flock, ...",
            # },
            "boxtype": {"default": "mbox", "description": "mbox, maildir"},
            # maybe we need to support various mbox types later, for now we use python's built-in module
            #'subtype':{
            #    'default':'',
            #    'description':"what type of mbox... ",
            # },
            "filterfile": {"default": "", "description": "only store messages which use filter..."},
        }
        self.logger = self._logger()
        self.filter = None

        self.boxtypemap = {"mbox": self.deliver_mbox, "maildir": self.deliver_maildir}
开发者ID:gryphius,项目名称:fuglu-extra-plugins,代码行数:25,代码来源:lda.py

示例8: __init__

 def __init__(self,config,section=None):
     ScannerPlugin.__init__(self,config,section)
     self.requiredvars={
         'greeting':{
             'default':'hello world!',
             'description':'greeting the plugin should log to the console',
         }
     }
开发者ID:gryphius,项目名称:fuglu-travis-test,代码行数:8,代码来源:example.py

示例9: __init__

 def __init__(self, config, section=None):
     ScannerPlugin.__init__(self, config, section)
     self.requiredvars = { # this defines the configuration options for a plugin
         'greeting': { # name of the config
             'default': 'hello world!', # default value, always use strings here
             'description': 'greeting message the plugin should log to the console', #  included as comment when generating default config files
         }
     }
开发者ID:sporkman,项目名称:fuglu,代码行数:8,代码来源:helloworld.py

示例10: __init__

 def __init__(self, config, section=None):
     ScannerPlugin.__init__(self, config, section)
     self.logger = self._logger()
     self.requiredvars = {
         'scriptdir': {
             'default': '/etc/fuglu/scriptfilter',
             'description': 'Dir that contains the scripts (*.fgf files)',
         }
     }
开发者ID:wbnxvzqbrfagznggre,项目名称:fuglu,代码行数:9,代码来源:script.py

示例11: __init__

 def __init__(self, config, section=None):
     ScannerPlugin.__init__(self, config, section)
     self.logger = self._logger()
     self.requiredvars = {
         'actionrules': {
             'default': '/etc/fuglu/actionrules.regex',
             'description': 'Rules file',
         }
     }
     self.filter = None
开发者ID:gryphius,项目名称:fuglu,代码行数:10,代码来源:actionoverride.py

示例12: __init__

    def __init__(self, config, section=None):
        ScannerPlugin.__init__(self, config, section)
        self.requiredvars = {
            'host': {
                'default': 'localhost',
                'description': 'hostname where the ICAP server runs',
            },

            'port': {
                'default': '1344',
                'description': "tcp port or path to unix socket",
            },

            'timeout': {
                'default': '10',
                'description': 'socket timeout',
            },

            'maxsize': {
                'default': '22000000',
                'description': "maximum message size, larger messages will not be scanned. ",
            },

            'retries': {
                'default': '3',
                'description': 'how often should fuglu retry the connection before giving up',
            },

            'virusaction': {
                'default': 'DEFAULTVIRUSACTION',
                'description': "action if infection is detected (DUNNO, REJECT, DELETE)",
            },

            'problemaction': {
                'default': 'DEFER',
                'description': "action if there is a problem (DUNNO, DEFER)",
            },

            'rejectmessage': {
                'default': 'threat detected: ${virusname}',
                'description': "reject message template if running in pre-queue mode and virusaction=REJECT",
            },

            'service': {
                'default': 'AVSCAN',
                'description': 'ICAP Av scan service, usually AVSCAN (sophos, symantec)',
            },

            'enginename': {
                'default': 'icap-generic',
                'description': "name of the virus engine behind the icap service. used to inform other plugins. can be anything like 'sophos', 'symantec', ...",
            },
        }
        self.logger = self._logger()
开发者ID:sporkman,项目名称:fuglu,代码行数:54,代码来源:icap.py

示例13: __init__

 def __init__(self,config,section=None):
     ScannerPlugin.__init__(self,config,section)
     self.requiredvars={             
         'dbconnectstring':{
             'default':'....todo',
             'description':'sqlalchemy connectstring to store the greylist',
             'confidential':True,
         },
     }
     
     self.logger=self._logger()
     self.cache=None
开发者ID:gryphius,项目名称:fuglu-travis-test,代码行数:12,代码来源:greylist.py

示例14: __init__

    def __init__(self, config, section=None):
        ScannerPlugin.__init__(self, config, section)
        self.requiredvars = {
            "dbconnectstring": {
                "default": "",
                "description": "sqlalchemy connectstring to load vacations",
                "confidential": True,
            }
        }

        self.logger = self._logger()
        self.cache = None
开发者ID:Caomhin,项目名称:fuglu,代码行数:12,代码来源:vacation.py

示例15: __init__

    def __init__(self, config, section=None):
        ScannerPlugin.__init__(self, config, section)
        self.requiredvars = {
            'dbconnectstring': {
                'default': '',
                'description': 'sqlalchemy connectstring to load vacations',
                'confidential': True,
            },
        }

        self.logger = self._logger()
        self.cache = None
开发者ID:oasiswork,项目名称:fuglu,代码行数:12,代码来源:vacation.py


注:本文中的fuglu.shared.ScannerPlugin类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。