Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ private/AGENTS.md
*.swp
*.swo

# apple shit
# apple-related
*.bst

# pcap
Expand Down
2 changes: 1 addition & 1 deletion modules/feeds_update_manager/feeds_update_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -1492,7 +1492,7 @@ def update_org_files(self):
and initializes the bloom filters
"""
for org in utils.supported_orgs:
org_ips = os.path.join(self.org_info_path, org)
org_ips = os.path.join(self.org_info_path, f"{org}_ip_ranges")
org_asn = os.path.join(self.org_info_path, f"{org}_asn")
org_domains = os.path.join(self.org_info_path, f"{org}_domains")

Expand Down
4 changes: 2 additions & 2 deletions slips_files/core/helpers/bloom_filters_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ def _init_whitelisted_orgs_bf(self):
"""
err_rate = 0.01
for org in utils.supported_orgs:
domains_bloom = BloomFilter(capacity=10000, error_rate=err_rate)
domains_bloom = BloomFilter(capacity=20000, error_rate=err_rate)
asns_bloom = BloomFilter(capacity=10000, error_rate=err_rate)
cidrs_bloom = BloomFilter(capacity=100, error_rate=err_rate)
cidrs_bloom = BloomFilter(capacity=200, error_rate=err_rate)

domains: List[str] = self.db.get_org_info(org, "domains")
_ = [domains_bloom.add(domain) for domain in domains]
Expand Down
6 changes: 3 additions & 3 deletions slips_files/core/helpers/whitelist/whitelist_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,12 +221,12 @@ def load_org_ips(self, org) -> Optional[Dict[str, List[str]]]:
if org not in utils.supported_orgs:
return

# Each file is named after the organization's name
org_info_file = os.path.join(self.org_info_path, org)
org_info_file = os.path.join(self.org_info_path, f"{org}_ip_ranges")
try:
org_info = open(org_info_file)
except (FileNotFoundError, IOError):
# there's no slips_files/organizations_info/{org} for this org
# there's no slips_files/organizations_info/{org}_ip_ranges
# for this org
return

org_subnets = {}
Expand Down
Loading
Loading