parent
a743788dcf
commit
1233d8998a
2 changed files with 21 additions and 0 deletions
19
app/terraform/block/bridge_roskomsvoboda.py
Normal file
19
app/terraform/block/bridge_roskomsvoboda.py
Normal file
|
@ -0,0 +1,19 @@
|
|||
from typing import Any
|
||||
|
||||
import requests
|
||||
|
||||
from app.terraform.block.bridge import BlockBridgeAutomation
|
||||
|
||||
|
||||
class BlockBridgeRoskomsvobodaAutomation(BlockBridgeAutomation):
|
||||
short_name = "block_bridge_roskomsvoboda"
|
||||
description = "Import the RosKomSvoboda IP blocklist"
|
||||
frequency = 300
|
||||
|
||||
_data: Any
|
||||
|
||||
def fetch(self) -> None:
|
||||
self._data = requests.get("https://reestr.rublacklist.net/api/v3/ips/").json()
|
||||
|
||||
def parse(self) -> None:
|
||||
self.ips.extend(self._data)
|
Loading…
Add table
Add a link
Reference in a new issue