Skip to content
API Documentation
BastionGuard™
make_ads_rules Namespace Reference

Variables

tuple lists
dict domains = {}
 r = requests.get(url)
 line = line.strip()
 part = part.strip()
 duh = ipaddress.ip_address(part)
int idx = 0
str tpl
str now = datetime.datetime.utcnow().isoformat("T") + "Z"
str data = tpl % ( now, now, idx, domain )

Variable Documentation

◆ data

str make_ads_rules.data = tpl % ( now, now, idx, domain )

Definition at line 66 of file make_ads_rules.py.

◆ domains

dict make_ads_rules.domains = {}

Definition at line 16 of file make_ads_rules.py.

◆ duh

make_ads_rules.duh = ipaddress.ip_address(part)

Definition at line 39 of file make_ads_rules.py.

◆ idx

int idx = 0

Definition at line 48 of file make_ads_rules.py.

◆ line

make_ads_rules.line = line.strip()

Definition at line 26 of file make_ads_rules.py.

◆ lists

tuple make_ads_rules.lists
Initial value:
= ( \
"https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts",
"https://mirror1.malwaredomains.com/files/justdomains",
"https://sysctl.org/cameleon/hosts",
"https://zeustracker.abuse.ch/blocklist.php?download=domainblocklist",
"https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt",
"https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt",
"https://hosts-file.net/ad_servers.txt" )

Definition at line 7 of file make_ads_rules.py.

◆ now

str make_ads_rules.now = datetime.datetime.utcnow().isoformat("T") + "Z"

Definition at line 65 of file make_ads_rules.py.

◆ part

make_ads_rules.part = part.strip()

Definition at line 34 of file make_ads_rules.py.

◆ r

make_ads_rules.r = requests.get(url)

Definition at line 20 of file make_ads_rules.py.

◆ tpl

str make_ads_rules.tpl
Initial value:
= """
{
"created": "%s",
"updated": "%s",
"name": "deny-adv-%d",
"enabled": true,
"action": "deny",
"duration": "always",
"operator": {
"type": "simple",
"operand": "dest.host",
"data": "%s"
}
}"""

Definition at line 51 of file make_ads_rules.py.