src/backend/countries.py \
src/backend/database.py \
src/backend/decorators.py \
- src/backend/dnsbl.py \
+ src/backend/dbl.py \
src/backend/fireinfo.py \
src/backend/httpclient.py \
src/backend/hwdata.py \
src/web/base.py \
src/web/blog.py \
src/web/boot.py \
- src/web/dnsbl.py \
+ src/web/dbl.py \
src/web/docs.py \
src/web/donate.py \
src/web/downloads.py \
templates_blog_modulesdir = $(templates_blogdir)/modules
-templates_dnsbl_DATA = \
- src/templates/dnsbl/index.html \
- src/templates/dnsbl/search.html
+templates_dbl_DATA = \
+ src/templates/dbl/index.html \
+ src/templates/dbl/search.html
-templates_dnsbldir = $(templatesdir)/dnsbl
+templates_dbldir = $(templatesdir)/dbl
-templates_dnsbl_lists_DATA = \
- src/templates/dnsbl/lists/domain.html \
- src/templates/dnsbl/lists/history.html \
- src/templates/dnsbl/lists/index.html \
- src/templates/dnsbl/lists/reports.html \
- src/templates/dnsbl/lists/sources.html \
- src/templates/dnsbl/lists/show.html
+templates_dbl_lists_DATA = \
+ src/templates/dbl/lists/domain.html \
+ src/templates/dbl/lists/history.html \
+ src/templates/dbl/lists/index.html \
+ src/templates/dbl/lists/reports.html \
+ src/templates/dbl/lists/sources.html \
+ src/templates/dbl/lists/show.html
-templates_dnsbl_listsdir = $(templates_dnsbldir)/lists
+templates_dbl_listsdir = $(templates_dbldir)/lists
-templates_dnsbl_modules_DATA = \
- src/templates/dnsbl/modules/lists.html
+templates_dbl_modules_DATA = \
+ src/templates/dbl/modules/lists.html
-templates_dnsbl_modulesdir = $(templates_dnsbldir)/modules
+templates_dbl_modulesdir = $(templates_dbldir)/modules
-templates_dnsbl_reports_DATA = \
- src/templates/dnsbl/reports/show.html \
- src/templates/dnsbl/reports/submit.html \
- src/templates/dnsbl/reports/submitted.html
+templates_dbl_reports_DATA = \
+ src/templates/dbl/reports/show.html \
+ src/templates/dbl/reports/submit.html \
+ src/templates/dbl/reports/submitted.html
-templates_dnsbl_reportsdir = $(templates_dnsbldir)/reports
+templates_dbl_reportsdir = $(templates_dbldir)/reports
templates_donate_DATA = \
src/templates/donate/donate.html \
from . import cache
from . import campaigns
from . import database
-from . import dnsbl
+from . import dbl
from . import fireinfo
from . import httpclient
from . import iuse
return campaigns.Campaigns(self)
@lazy_property
- def dnsbl(self):
- return dnsbl.DNSBL(self)
+ def dbl(self):
+ return dbl.DBL(self)
@lazy_property
def groups(self):
# Setup logging
log = logging.getLogger(__name__)
-class DNSBL(Object):
+class DBL(Object):
async def _fetch(self, path, headers=None, args=None, body=None, **kwargs):
if headers is None:
headers = {}
# Format the URL
url = urllib.parse.urljoin(
- "https://api.dnsbl.ipfire.org", path,
+ "https://api.dbl.ipfire.org", path,
)
# Append any query arguments to the URL
# Authenticate
headers |= {
- "X-API-Key" : self.backend.settings.get("dnsbl-api-key", ""),
+ "X-API-Key" : self.backend.settings.get("dbl-api-key", ""),
}
# Serialize any content
"""
Composes a download URL for this list
"""
- return os.path.join("https://dnsbl.ipfire.org/lists/%s" % self.slug, *args)
+ return os.path.join("https://dbl.ipfire.org/lists/%s" % self.slug, *args)
# Sources
async def get_sources(self):
- response = await self._backend.dnsbl._fetch("/lists/%s/sources" % self.slug)
+ response = await self._backend.dbl._fetch("/lists/%s/sources" % self.slug)
return [Source(self._backend, **data) for data in response]
}
# Send the request
- response = await self._backend.dnsbl._fetch(
+ response = await self._backend.dbl._fetch(
"/lists/%s/reports" % self.slug, args=args,
)
}
# Submit the report
- response = await self._backend.dnsbl._fetch(
+ response = await self._backend.dbl._fetch(
"/lists/%s/reports" % self.slug, method="POST", body=body,
)
"""
Fetches the history of this list
"""
- response = await self._backend.dnsbl._fetch(
+ response = await self._backend.dbl._fetch(
"/lists/%s/history" % self.slug, args={ "before" : before, "limit" : limit },
)
"""
Fetches the history of a specific domain on this list
"""
- response = await self._backend.dnsbl._fetch(
+ response = await self._backend.dbl._fetch(
"/lists/%s/domains/%s" % (self.slug, name),
)
async def get_list(self):
if not hasattr(self, "_list"):
- self._list = await self._backend.dnsbl.get_list(self.list_slug)
+ self._list = await self._backend.dbl.get_list(self.list_slug)
return self._list
</head>
<body class="is-flex is-flex-direction-column">
- <nav class="navbar {% if request.path.startswith("/dnsbl") %}is-dark{% end %}"
+ <nav class="navbar {% if request.path.startswith("/dbl") %}is-dark{% end %}"
role="navigation" aria-label="main navigation">
<div class="container">
<div class="navbar-brand is-size-4">
- {% if request.path.startswith("/dnsbl") %}
- <a class="navbar-item" href="/dnsbl">
- {% module IPFireLogo("DNSBL") %}
+ {% if request.path.startswith("/dbl") %}
+ <a class="navbar-item" href="/dbl">
+ {% module IPFireLogo("DBL") %}
</a>
{# Beta #}
</div>
{% end %}
- {# DNSBL #}
- {% if request.path.startswith("/dnsbl") %}
+ {# DBL #}
+ {% if request.path.startswith("/dbl") %}
<a class="navbar-item is-tab
- {% if request.path.startswith("/dnsbl/lists") %}is-active{% end %}"
- href="/dnsbl/lists">
+ {% if request.path.startswith("/dbl/lists") %}is-active{% end %}"
+ href="/dbl/lists">
{{ _("Lists") }}
</a>
<a class="navbar-item is-tab
- {% if request.path.startswith("/dnsbl/report") %}is-active{% end %}"
- href="/dnsbl/report">
+ {% if request.path.startswith("/dbl/report") %}is-active{% end %}"
+ href="/dbl/report">
{{ _("Report") }}
</a>
<div class="navbar-item">
- <form action="/dnsbl/search" method="GET">
+ <form action="/dbl/search" method="GET">
<div class="field">
<div class="control has-icons-left">
<input class="input" type="text"
name="q" {% if q %}value="{{ q }}"{% end %}
- placeholder="{{ _("Search DNSBL...") }}">
+ placeholder="{{ _("Search DBL...") }}">
<span class="icon is-small is-left">
<i class="fas fa-search"></i>
</span>
{% block head %}
{% module OpenGraph(
- title=_("IPFire DNSBL"),
+ title=_("IPFire DBL"),
description="High-quality DNS blocklists for security-critical environments",
) %}
{% end block %}
-{% block title %}{{ _("Welcome to IPFire DNSBL") }}{% end block %}
+{% block title %}{{ _("Welcome to IPFire DBL") }}{% end block %}
{% block container %}
<section class="hero is-medium is-primary">
<div class="hero-body">
<div class="container">
- <h1 class="title">{{ _("IPFire DNS Blocklist") }}</h1>
+ <h1 class="title">{{ _("IPFire Domain Blocklist") }}</h1>
<h6 class="subtitle mb-6">
{{ _("Early threat mitigation, enforced over DNS") }}
<i class="fa-solid fa-heart"></i>
</span>
<span>
- Help keep the Internet safe and free — support IPFire DNSBL today
+ Help keep the Internet safe and free — support IPFire DBL today
</span>
</a>
</div>
{% block head %}
{% module OpenGraph(
- title=_("IPFire DNSBL - %(list)s - Domain %(domain)s") %\
+ title=_("IPFire DBL - %(list)s - Domain %(domain)s") %\
{ "list" : list, "domain" : name },
description=list.description,
) %}
{% end block %}
{% block title %}
- {{ _("IPFire DNSBL") }} - {{ list }} - {{ _("Domain %s") % name }}
+ {{ _("IPFire DBL") }} - {{ list }} - {{ _("Domain %s") % name }}
{% end block %}
{% block container %}
<nav class="breadcrumb" aria-label="breadcrumbs">
<ul>
<li>
- <a href="/dnsbl">
- {{ _("IPFire DNSBL") }}
+ <a href="/dbl">
+ {{ _("IPFire DBL") }}
</a>
</li>
<li>
- <a href="/dnsbl/lists">
+ <a href="/dbl/lists">
{{ _("Lists") }}
</a>
</li>
<li>
- <a href="/dnsbl/lists/{{ list.slug }}">
+ <a href="/dbl/lists/{{ list.slug }}">
{{ list }}
</a>
</li>
</strong>
{% end %}
- {{ _("Send a report and help us to improve IPFire DNSBL.") }}
+ {{ _("Send a report and help us to improve IPFire DBL.") }}
</div>
<div class="column is-narrow">
- <a class="button is-primary is-small" href="/dnsbl/report?list={{ list.slug }}&name={{ name }}">
+ <a class="button is-primary is-small" href="/dbl/report?list={{ list.slug }}&name={{ name }}">
{{ _("Report %s") % name }}
</a>
</div>
{% block head %}
{% module OpenGraph(
- title=_("IPFire DNSBL - %s - History") % list,
+ title=_("IPFire DBL - %s - History") % list,
description=list.description,
) %}
{% end block %}
-{% block title %}{{ _("IPFire DNSBL") }} - {{ list }} - {{ _("History") }}{% end block %}
+{% block title %}{{ _("IPFire DBL") }} - {{ list }} - {{ _("History") }}{% end block %}
{% block container %}
{% import urllib.parse %}
<nav class="breadcrumb" aria-label="breadcrumbs">
<ul>
<li>
- <a href="/dnsbl">
- {{ _("IPFire DNSBL") }}
+ <a href="/dbl">
+ {{ _("IPFire DBL") }}
</a>
</li>
<li>
- <a href="/dnsbl/lists">
+ <a href="/dbl/lists">
{{ _("Lists") }}
</a>
</li>
<li>
- <a href="/dnsbl/lists/{{ list.slug }}">
+ <a href="/dbl/lists/{{ list.slug }}">
{{ list }}
</a>
</li>
{# Domains Allowed #}
{% for domain in event.domains_allowed %}
<li title="{{ _("Allowed") }}">
- <a class="has-text-info" href="/dnsbl/lists/{{ list.slug }}/domains/{{ domain }}">
+ <a class="has-text-info" href="/dbl/lists/{{ list.slug }}/domains/{{ domain }}">
+ {{ format_domain(domain) }}
</a>
</li>
{# Domains Blocked #}
{% for domain in event.domains_blocked %}
<li title="{{ _("Blocked") }}">
- <a class="has-text-success" href="/dnsbl/lists/{{ list.slug }}/domains/{{ domain }}">
+ <a class="has-text-success" href="/dbl/lists/{{ list.slug }}/domains/{{ domain }}">
+ {{ format_domain(domain) }}
</a>
</li>
{# Domains Removed #}
{% for domain in event.domains_removed %}
<li title="{{ _("Removed") }}">
- <a class="has-text-danger" href="/dnsbl/lists/{{ list.slug }}/domains/{{ domain }}">
+ <a class="has-text-danger" href="/dbl/lists/{{ list.slug }}/domains/{{ domain }}">
− {{ format_domain(domain) }}
</a>
</li>
{% set before = min(e.ts for e in history) %}
<a class="pagination-next"
- href="/dnsbl/lists/{{ list.slug }}/history?before={{ urllib.parse.quote(before.isoformat()) }}">
+ href="/dbl/lists/{{ list.slug }}/history?before={{ urllib.parse.quote(before.isoformat()) }}">
{{ _("Older") }} »
</a>
</nav>
{% block head %}
{% module OpenGraph(
- title=_("IPFire DNSBL - Lists"),
+ title=_("IPFire DBL - Lists"),
) %}
{% end block %}
-{% block title %}{{ _("IPFire DNSBL") }} - {{ _("Lists") }}{% end block %}
+{% block title %}{{ _("IPFire DBL") }} - {{ _("Lists") }}{% end block %}
{% block container %}
<section class="hero is-dark">
<nav class="breadcrumb" aria-label="breadcrumbs">
<ul>
<li>
- <a href="/dnsbl">
- {{ _("IPFire DNSBL") }}
+ <a href="/dbl">
+ {{ _("IPFire DBL") }}
</a>
</li>
<section class="section">
<div class="container">
- {% module DNSBLLists(lists) %}
+ {% module DBLLists(lists) %}
</div>
</section>
{% end block %}
{% block head %}
{% module OpenGraph(
- title=_("IPFire DNSBL - %s - Reports") % list,
+ title=_("IPFire DBL - %s - Reports") % list,
description=list.description,
) %}
{% end block %}
-{% block title %}{{ _("IPFire DNSBL") }} - {{ list }} - {{ _("Reports") }}{% end block %}
+{% block title %}{{ _("IPFire DBL") }} - {{ list }} - {{ _("Reports") }}{% end block %}
{% block container %}
<section class="hero is-dark">
<nav class="breadcrumb" aria-label="breadcrumbs">
<ul>
<li>
- <a href="/dnsbl">
- {{ _("IPFire DNSBL") }}
+ <a href="/dbl">
+ {{ _("IPFire DBL") }}
</a>
</li>
<li>
- <a href="/dnsbl/lists">
+ <a href="/dbl/lists">
{{ _("Lists") }}
</a>
</li>
<li>
- <a href="/dnsbl/lists/{{ list.slug }}">
+ <a href="/dbl/lists/{{ list.slug }}">
{{ list }}
</a>
</li>
<div class="columns">
<div class="column">
<p class="title is-5">
- <a href="/dnsbl/reports/{{ report.id }}">
+ <a href="/dbl/reports/{{ report.id }}">
{{ report }}
</a>
</p>
Spot something that should be listed? Send it our way.
</div>
- <a class="button is-primary" href="/dnsbl/report">
+ <a class="button is-primary" href="/dbl/report">
{{ _("Submit a Report") }}
</a>
</div>
{% block head %}
{% module OpenGraph(
- title=_("IPFire DNSBL - %s") % list,
+ title=_("IPFire DBL - %s") % list,
description=list.description,
) %}
{% end block %}
-{% block title %}{{ _("IPFire DNSBL") }} - {{ list }}{% end block %}
+{% block title %}{{ _("IPFire DBL") }} - {{ list }}{% end block %}
{% block container %}
{% import urllib.parse %}
<nav class="breadcrumb" aria-label="breadcrumbs">
<ul>
<li>
- <a href="/dnsbl">
- {{ _("IPFire DNSBL") }}
+ <a href="/dbl">
+ {{ _("IPFire DBL") }}
</a>
</li>
<li>
- <a href="/dnsbl/lists">
+ <a href="/dbl/lists">
{{ _("Lists") }}
</a>
</li>
{# Navigation #}
<div class="buttons are-small is-centered">
- <a class="button" href="/dnsbl/lists/{{ list.slug }}/reports">
+ <a class="button" href="/dbl/lists/{{ list.slug }}/reports">
<span class="icon is-small">
<i class="fa-solid fa-flag" aria-hidden="true"></i>
</span>
</span>
</a>
- <a class="button" href="/dnsbl/lists/{{ list.slug }}/sources">
+ <a class="button" href="/dbl/lists/{{ list.slug }}/sources">
<span class="icon is-small">
<i class="fas fa-code-pull-request" aria-hidden="true"></i>
</span>
<span>{{ _("Sources") }}</span>
</a>
- <a class="button" href="/dnsbl/lists/{{ list.slug }}/history">
+ <a class="button" href="/dbl/lists/{{ list.slug }}/history">
<span class="icon is-small">
<i class="fas fa-list-check" aria-hidden="true"></i>
</span>
{% set url = "https://subscribe.adblockplus.org/?%s" % \
urllib.parse.urlencode({
"location" : list.url("abp.txt"),
- "title" : "IPFire DNSBL - %s" % list,
+ "title" : "IPFire DBL - %s" % list,
})
%}
<div id="rpz" class="tab-content is-hidden">
<div class="content">
<p>
- The IPFire DNSBL is published as a Response Policy Zone (RPZ) and
+ The IPFire DBL is published as a Response Policy Zone (RPZ) and
can be consumed by many popular recursive DNS resolvers.
</p>
rpzs:
- name: {{ list.slug }}.rpz.ipfire.org
addresses:
- - 'primary.dnsbl.ipfire.org'</pre>
+ - 'primary.dbl.ipfire.org'</pre>
<h6>Unbound</h6>
rpz:
name: {{ list.slug }}.rpz.ipfire.org
- primary: primary.dnsbl.ipfire.org
+ primary: primary.dbl.ipfire.org
zonefile: /var/cache/unbound/{{ list.slug }}.rpz.ipfire.org.zone</pre>
</div>
</div>
<div id="alternative" class="tab-content is-hidden">
<div class="content">
<p>
- All IPFire DNSBL lists are also available as downloadable domain and hosts files.
+ All IPFire DBL lists are also available as downloadable domain and hosts files.
</p>
<p>
</div>
<div class="buttons are-small">
- <a class="button is-primary" href="https://dnsbl.ipfire.org/lists/{{ list.slug }}/domains.txt">
+ <a class="button is-primary" href="https://dbl.ipfire.org/lists/{{ list.slug }}/domains.txt">
<span class="icon">
<i class="fas fa-download"></i>
</span>
</span>
</a>
- <a class="button is-primary" href="https://dnsbl.ipfire.org/lists/{{ list.slug }}/hosts.txt">
+ <a class="button is-primary" href="https://dbl.ipfire.org/lists/{{ list.slug }}/hosts.txt">
<span class="icon">
<i class="fas fa-download"></i>
</span>
{% block head %}
{% module OpenGraph(
- title=_("IPFire DNSBL - %s - Sources") % list,
+ title=_("IPFire DBL - %s - Sources") % list,
description=list.description,
) %}
{% end block %}
-{% block title %}{{ _("IPFire DNSBL") }} - {{ list }} - {{ _("Sources") }}{% end block %}
+{% block title %}{{ _("IPFire DBL") }} - {{ list }} - {{ _("Sources") }}{% end block %}
{% block container %}
<section class="hero is-dark">
<nav class="breadcrumb" aria-label="breadcrumbs">
<ul>
<li>
- <a href="/dnsbl">
- {{ _("IPFire DNSBL") }}
+ <a href="/dbl">
+ {{ _("IPFire DBL") }}
</a>
</li>
<li>
- <a href="/dnsbl/lists">
+ <a href="/dbl/lists">
{{ _("Lists") }}
</a>
</li>
<li>
- <a href="/dnsbl/lists/{{ list.slug }}">
+ <a href="/dbl/lists/{{ list.slug }}">
{{ list }}
</a>
</li>
{% for l in sorted(lists) %}
<div class="block">
<h5 class="title is-5">
- <a href="/dnsbl/lists/{{ l.slug }}">
+ <a href="/dbl/lists/{{ l.slug }}">
{{ l }}
</a>
</h5>
{% extends "../../base.html" %}
{% block title %}
- {{ _("IPFire DNSBL") }} {{ _("Report %s") % report }}
+ {{ _("IPFire DBL") }} {{ _("Report %s") % report }}
{% end block %}
{% block head %}
<nav class="breadcrumb" aria-label="breadcrumbs">
<ul>
<li>
- <a href="/dnsbl">
- {{ _("IPFire DNSBL") }}
+ <a href="/dbl">
+ {{ _("IPFire DBL") }}
</a>
</li>
<li>
- <a href="/dnsbl/lists">
+ <a href="/dbl/lists">
{{ _("Lists") }}
</a>
</li>
<li>
- <a href="/dnsbl/lists/{{ list.slug }}">
+ <a href="/dbl/lists/{{ list.slug }}">
{{ list.name }}
</a>
</li>
<li>
- <a href="/dnsbl/lists/{{ list.slug }}/reports">
+ <a href="/dbl/lists/{{ list.slug }}/reports">
{{ _("Reports") }}
</a>
</li>
{% extends "../../base.html" %}
{% block title %}
- {{ _("IPFire DNSBL") }} {{ _("Report A Domain") }}
+ {{ _("IPFire DBL") }} {{ _("Report A Domain") }}
{% end block %}
{% block head %}
{% module OpenGraph(
title=_("Report A Domain"),
- description=_("Help Us To Improve IPFire DNSBL"),
+ description=_("Help Us To Improve IPFire DBL"),
) %}
{% end block %}
<div class="hero-body">
<div class="container">
<h1 class="title">
- {{ _("Help Us To Improve IPFire DNSBL") }}
+ {{ _("Help Us To Improve IPFire DBL") }}
</h1>
<p class="subtitle">
<br>
- To keep the IPFire DNSBL accurate and trustworthy, domain reports
+ To keep the IPFire DBL accurate and trustworthy, domain reports
can only be submitted by logged-in users.
This helps us prevent spam and abuse, and ensures that every report
comes from a real, accountable community member.
<p class="help">
By submitting your report, you grant the IPFire Project the right to store,
process, and publish this information as part of its security services,
- including the IPFire DNSBL under the terms of the respective list.
+ including the IPFire DBL under the terms of the respective list.
Submissions may be reviewed, modified, or removed at our discretion.
</p>
</div>
{{ _("Your report has been submitted") }}
</p>
- <a class="button is-white" href="/dnsbl/reports/{{ report.id }}">
+ <a class="button is-white" href="/dbl/reports/{{ report.id }}">
{{ _("View Report") }}
</a>
</div>
{% block head %}
{% module OpenGraph(
- title=_("IPFire DNSBL - Search Results For: %s") % q,
+ title=_("IPFire DBL - Search Results For: %s") % q,
) %}
{% end block %}
{% for list, domains in sorted(results.items()) %}
<div class="block">
<h5 class="title is-5">
- <a href="/dnsbl/lists/{{ list.slug }}">
+ <a href="/dbl/lists/{{ list.slug }}">
{{ list }}
</a>
</h5>
<ul>
{% for domain in domains %}
<li>
- <a href="/dnsbl/lists/{{ list.slug }}/domains/{{ domain }}">
+ <a href="/dbl/lists/{{ list.slug }}/domains/{{ domain }}">
{{ format_domain(domain) }}
</a>
</li>
<div class="columns is-centered is-multiline">
<div class="column is-one-third has-text-centered">
<div>
- <p class="heading">DNS Blocklists</p>
+ <p class="heading">Domain Blocklists</p>
<p class="title">
- <a href="/dnsbl">
- {{ _("IPFire DNSBL") }}
+ <a href="/dbl">
+ {{ _("IPFire DBL") }}
</a>
</p>
</div>
from . import auth
from . import blog
from . import boot
-from . import dnsbl
+from . import dbl
from . import docs
from . import donate
from . import downloads
"BootMenuHeader" : boot.MenuHeaderModule,
"BootMenuSeparator" : boot.MenuSeparatorModule,
- # DNSBL
- "DNSBLLists" : dnsbl.ListsModule,
+ # DBL
+ "DBLLists" : dbl.ListsModule,
# Docs
"DocsDiff" : docs.DiffModule,
(r"/location/report\-a\-problem", StaticHandler, { "template" : "location/report-a-problem.html" }),
(r"/location/lookup/(.+)", location.LookupHandler),
- # DNSBL
- (r"/dnsbl/?", StaticHandler, { "template" : "dnsbl/index.html" }),
- (r"/dnsbl/lists", dnsbl.ListsHandler),
- (r"/dnsbl/lists/(\w+)", dnsbl.ListHandler),
- (r"/dnsbl/lists/(\w+)/domains/(.*)", dnsbl.ListDomainHandler),
- (r"/dnsbl/lists/(\w+)/history", dnsbl.ListHistoryHandler),
- (r"/dnsbl/lists/(\w+)/reports", dnsbl.ListReportsHandler),
- (r"/dnsbl/lists/(\w+)/sources", dnsbl.ListSourcesHandler),
- (r"/dnsbl/report", dnsbl.SubmitReportHandler),
- (r"/dnsbl/reports/([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})", dnsbl.ReportHandler),
- (r"/dnsbl/search", dnsbl.SearchHandler),
+ # DBL
+ (r"/dbl/?", StaticHandler, { "template" : "dbl/index.html" }),
+ (r"/dbl/lists", dbl.ListsHandler),
+ (r"/dbl/lists/(\w+)", dbl.ListHandler),
+ (r"/dbl/lists/(\w+)/domains/(.*)", dbl.ListDomainHandler),
+ (r"/dbl/lists/(\w+)/history", dbl.ListHistoryHandler),
+ (r"/dbl/lists/(\w+)/reports", dbl.ListReportsHandler),
+ (r"/dbl/lists/(\w+)/sources", dbl.ListSourcesHandler),
+ (r"/dbl/report", dbl.SubmitReportHandler),
+ (r"/dbl/reports/([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})", dbl.ReportHandler),
+ (r"/dbl/search", dbl.SearchHandler),
# Single-Sign-On for Discourse
(r"/sso/discourse", auth.SSODiscourse),
tornado.web.StaticFileHandler, { "path" : BOOT_STATIC_PATH }),
])
- # dnsbl.ipfire.org
- self.add_handlers(r"dnsbl\.([a-z]+\.dev\.)?ipfire\.org", [
- (r"(.*)", tornado.web.RedirectHandler, { "url" : "https://www.ipfire.org/dnsbl{0}" }),
+ # dbl.ipfire.org
+ self.add_handlers(r"dbl\.([a-z]+\.dev\.)?ipfire\.org", [
+ (r"(.*)", tornado.web.RedirectHandler, { "url" : "https://www.ipfire.org/dbl{0}" }),
])
# nopaste.ipfire.org
slug = self.get_argument(*args, **kwargs)
# Fetch the list
- return await self.backend.dnsbl.get_list(slug)
+ return await self.backend.dbl.get_list(slug)
class ListsHandler(base.AnalyticsMixin, BaseHandler):
async def get(self):
# Fetch all lists
- lists = await self.backend.dnsbl.get_lists()
+ lists = await self.backend.dbl.get_lists()
# Render the page
- self.render("dnsbl/lists/index.html", lists=lists)
+ self.render("dbl/lists/index.html", lists=lists)
class ListHandler(base.AnalyticsMixin, BaseHandler):
async def get(self, slug):
# Fetch the list
- list = await self.backend.dnsbl.get_list(slug)
+ list = await self.backend.dbl.get_list(slug)
if not list:
raise tornado.web.HTTPError(404, "Could not find list '%s'" % slug)
# Render the page
- self.render("dnsbl/lists/show.html", list=list)
+ self.render("dbl/lists/show.html", list=list)
class ListHistoryHandler(base.AnalyticsMixin, BaseHandler):
async def get(self, slug):
# Fetch the list
- list = await self.backend.dnsbl.get_list(slug)
+ list = await self.backend.dbl.get_list(slug)
if not list:
raise tornado.web.HTTPError(404, "Could not find list '%s'" % slug)
)
# Render the page
- self.render("dnsbl/lists/history.html", list=list, history=history)
+ self.render("dbl/lists/history.html", list=list, history=history)
class ListReportsHandler(base.AnalyticsMixin, BaseHandler):
async def get(self, slug):
# Fetch the list
- list = await self.backend.dnsbl.get_list(slug)
+ list = await self.backend.dbl.get_list(slug)
if not list:
raise tornado.web.HTTPError(404, "Could not find list '%s'" % slug)
reports = await list.get_reports(limit=25)
# Render the page
- self.render("dnsbl/lists/reports.html", list=list, reports=reports)
+ self.render("dbl/lists/reports.html", list=list, reports=reports)
class ListSourcesHandler(base.AnalyticsMixin, BaseHandler):
async def get(self, slug):
# Fetch the list
- list = await self.backend.dnsbl.get_list(slug)
+ list = await self.backend.dbl.get_list(slug)
if not list:
raise tornado.web.HTTPError(404, "Could not find list '%s'" % slug)
sources = await list.get_sources()
# Render the page
- self.render("dnsbl/lists/sources.html", list=list, sources=sources)
+ self.render("dbl/lists/sources.html", list=list, sources=sources)
class ListDomainHandler(base.AnalyticsMixin, BaseHandler):
async def get(self, slug, name):
# Fetch the list
- list = await self.backend.dnsbl.get_list(slug)
+ list = await self.backend.dbl.get_list(slug)
if not list:
raise tornado.web.HTTPError(404, "Could not find list '%s'" % slug)
events = await list.get_domain_history(name)
# Render the page
- self.render("dnsbl/lists/domain.html", list=list, name=name, events=events)
+ self.render("dbl/lists/domain.html", list=list, name=name, events=events)
class SubmitReportHandler(base.AnalyticsMixin, BaseHandler):
async def get(self):
# Fetch all lists
- lists = await self.backend.dnsbl.get_lists()
+ lists = await self.backend.dbl.get_lists()
# Fetch any pre-selected lists
list = await self.get_list("list", None)
name = self.get_argument("name", None)
# Render the page
- self.render("dnsbl/reports/submit.html", lists=lists, list=list, name=name)
+ self.render("dbl/reports/submit.html", lists=lists, list=list, name=name)
@tornado.web.authenticated
#@base.ratelimit(minutes=60, requests=10)
)
# Render a result page
- self.render("dnsbl/reports/submitted.html", report=report)
+ self.render("dbl/reports/submitted.html", report=report)
class ReportHandler(base.AnalyticsMixin, BaseHandler):
async def get(self, id):
# Fetch the report
- report = await self.backend.dnsbl.get_report(id)
+ report = await self.backend.dbl.get_report(id)
if not report:
raise tornado.web.HTTPError(404, "Could not find report '%s'" % id)
# Fetch the list
list = await report.get_list()
- self.render("dnsbl/reports/show.html", report=report, list=list)
+ self.render("dbl/reports/show.html", report=report, list=list)
class SearchHandler(base.AnalyticsMixin, BaseHandler):
raise tornado.web.HTTPError(400, "Empty search query")
# Search for the query
- results = await self.backend.dnsbl.search(q)
+ results = await self.backend.dbl.search(q)
# Render the page
- self.render("dnsbl/search.html", q=q, results=results)
+ self.render("dbl/search.html", q=q, results=results)
class ListsModule(ui_modules.UIModule):
def render(self, lists):
- return self.render_string("dnsbl/modules/lists.html", lists=lists)
+ return self.render_string("dbl/modules/lists.html", lists=lists)