示例#1
0
def load_template(name):
    if name not in template_cache:
        template_file = open(relative_path("template", name))
        try:
            template_cache[name] = template_file.read()
        finally:
            template_file.close()
    return template_cache[name]
示例#2
0
def configs():
    # Launch a fine selection of abusehelper.core.* bots
    yield Bot("mailer",
              smtp_host="@SMTP_HOST@",
              smtp_port="@SMTP_PORT@",
              smtp_auth_user="******",
              smtp_auth_password="******",
              mail_sender="@MAIL_SENDER@")
    yield Bot("wikibot")
    yield Bot("dshield")
    yield Bot("roomgraph")
    yield Bot("historian")
    yield Bot("runtime", config=relative_path("runtime.py"))

    # Find and launch modules named custom/*.sanitizer.py
    for filename in os.listdir(relative_path("custom")):
        if filename.endswith(".sanitizer.py"):
            yield Bot(name=filename[:-3], 
                      module=relative_path("custom", filename))
示例#3
0
def configs():
    # Launch a fine selection of abusehelper.core.* bots
    yield Bot("mailer",
              smtp_host='smtp.example.com',
              smtp_port=25,
              smtp_auth_user=None,
              smtp_auth_password=None,
              mail_sender='*****@*****.**')
    yield Bot("wikibot")
    yield Bot("dshield")
    yield Bot("roomgraph")
    yield Bot("historian")
    yield Bot("runtime", config=relative_path("runtime.py"))

    # Find and launch modules named custom/*.sanitizer.py
    for filename in os.listdir(relative_path("custom")):
        if filename.endswith(".sanitizer.py"):
            yield Bot(name=filename[:-3], 
                      module=relative_path("custom", filename))
示例#4
0
def configs():
    return [
        Bot("runtime", 
            config=relative_path("runtime.py")),
        
        Bot("mailer",
            # Mailer will use this server and port for sending mails.
            # You can use e.g. the traditional 25 or the authenticated 
            # submission port 587.
            smtp_host = "smtp.example.com",
            smtp_port = 25,
            
            # From whom it looks like the mail reports came from.
            mail_sender = "*****@*****.**",
            
            # If you use authenticated submission port, put here
            # your username (without the domain) and password.
            #smtp_auth_user = "******",
            #smtp_auth_password = "******",
            ),
        
        Bot("dshield",
            # Override the default 1h polling interval. 
            # The interval is given in seconds,
            # e.g. poll_interval = 600 means polling every 10 minutes.
            #poll_interval = 600,
            
            # Use Cymru WHOIS service for determining ASNs.
            #use_cymru_whois = True,
            ),            
        
        # These are just for starting the roomgraph and historian services.
        # No extra startup options needed.
        Bot("roomgraph"),
        Bot("historian"),

        # Bot("atlassrf",
        #     feed_url=https://atlas.arbor.net/srf/feeds/889214124/?alt=csv,
        #     # Override the default 1h polling interval.  The
        #     # interval is given in seconds, e.g. poll_interval=600
        #     # means polling every 10 minutes.
        #     #poll_interval = 600
        #     )
        ]