Skip to content

Commit 96794b6

Browse files
authored
Merge pull request #1927 from stratosphereips/alya/update_ti_feeds
Update organizations domains, ips, and ASNs
2 parents 9edf44f + 52fd2fc commit 96794b6

24 files changed

Lines changed: 17698 additions & 17910 deletions

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ private/AGENTS.md
3333
*.swp
3434
*.swo
3535

36-
# apple shit
36+
# apple-related
3737
*.bst
3838

3939
# pcap

modules/feeds_update_manager/feeds_update_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1492,7 +1492,7 @@ def update_org_files(self):
14921492
and initializes the bloom filters
14931493
"""
14941494
for org in utils.supported_orgs:
1495-
org_ips = os.path.join(self.org_info_path, org)
1495+
org_ips = os.path.join(self.org_info_path, f"{org}_ip_ranges")
14961496
org_asn = os.path.join(self.org_info_path, f"{org}_asn")
14971497
org_domains = os.path.join(self.org_info_path, f"{org}_domains")
14981498

slips_files/core/helpers/bloom_filters_manager.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ def _init_whitelisted_orgs_bf(self):
6767
"""
6868
err_rate = 0.01
6969
for org in utils.supported_orgs:
70-
domains_bloom = BloomFilter(capacity=10000, error_rate=err_rate)
70+
domains_bloom = BloomFilter(capacity=20000, error_rate=err_rate)
7171
asns_bloom = BloomFilter(capacity=10000, error_rate=err_rate)
72-
cidrs_bloom = BloomFilter(capacity=100, error_rate=err_rate)
72+
cidrs_bloom = BloomFilter(capacity=200, error_rate=err_rate)
7373

7474
domains: List[str] = self.db.get_org_info(org, "domains")
7575
_ = [domains_bloom.add(domain) for domain in domains]

slips_files/core/helpers/whitelist/whitelist_parser.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -221,12 +221,12 @@ def load_org_ips(self, org) -> Optional[Dict[str, List[str]]]:
221221
if org not in utils.supported_orgs:
222222
return
223223

224-
# Each file is named after the organization's name
225-
org_info_file = os.path.join(self.org_info_path, org)
224+
org_info_file = os.path.join(self.org_info_path, f"{org}_ip_ranges")
226225
try:
227226
org_info = open(org_info_file)
228227
except (FileNotFoundError, IOError):
229-
# there's no slips_files/organizations_info/{org} for this org
228+
# there's no slips_files/organizations_info/{org}_ip_ranges
229+
# for this org
230230
return
231231

232232
org_subnets = {}

0 commit comments

Comments
 (0)