only add a couple IPs and no kinds during database creation
This commit is contained in:
parent
d8fb3b5e62
commit
1ee3ccf724
1 changed files with 2 additions and 17 deletions
|
@ -134,29 +134,14 @@ class RespoDB:
|
|||
self.new_exception(name="Timeout", fail=True)
|
||||
|
||||
def setup_ips(self):
|
||||
from .ips import china, blocks
|
||||
|
||||
self._fire(create_table_statements["ips"])
|
||||
|
||||
# TODO: upsert?
|
||||
|
||||
self.new_address(ip=addr_to_int("0.0.0.0"), block_target=True)
|
||||
self.new_address(ip=addr_to_int("127.0.0.1"), block_target=True)
|
||||
for ip in china:
|
||||
self.new_address(ip=addr_to_int(ip), china=True)
|
||||
for ip in blocks:
|
||||
self.new_address(ip=addr_to_int(ip), block_target=True)
|
||||
self.modify_address("0.0.0.0", block_target=True)
|
||||
self.modify_address("127.0.0.1", block_target=True)
|
||||
|
||||
def setup_kinds(self):
|
||||
self._fire(create_table_statements["kinds"])
|
||||
|
||||
# TODO: upsert?
|
||||
|
||||
if 0:
|
||||
NXDOMAIN = self.find_one(TException, TException.name == "NXDOMAIN")
|
||||
self.new_kind(name="bad", exception=NXDOMAIN)
|
||||
self.new_kind(name="badsub", exception=NXDOMAIN)
|
||||
|
||||
def setup_domains(self):
|
||||
self._fire(create_table_statements["domains"])
|
||||
|
||||
|
|
Loading…
Reference in a new issue