From 3345ad1ac27a61f9c787c5609ef6d5d2e79f202d Mon Sep 17 00:00:00 2001 From: carnivuth Date: Tue, 3 Feb 2026 13:56:48 +0100 Subject: [PATCH 1/3] removed old default value --- src/config.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/config.py b/src/config.py index b98a750..b17df7e 100644 --- a/src/config.py +++ b/src/config.py @@ -42,7 +42,6 @@ class Config: # Database settings database_path: str = "data/krawl.db" database_retention_days: int = 30 - exports_path: str = "data/exports" # Analyzer settings http_risky_methods_threshold: float = None From 494f1678f3c94e64b359a8ea11464b1aa65800e7 Mon Sep 17 00:00:00 2001 From: carnivuth Date: Tue, 3 Feb 2026 13:57:46 +0100 Subject: [PATCH 2/3] lint code --- src/database.py | 4 +++- src/geo_utils.py | 6 ++++-- src/tasks/fetch_ip_rep.py | 8 +++++--- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/database.py b/src/database.py index beca629..1834802 100644 --- a/src/database.py +++ b/src/database.py @@ -147,7 +147,9 @@ class DatabaseManager: migrations_run.append("region") if "region_name" not in columns: - cursor.execute("ALTER TABLE ip_stats ADD COLUMN region_name VARCHAR(100)") + cursor.execute( + "ALTER TABLE ip_stats ADD COLUMN region_name VARCHAR(100)" + ) migrations_run.append("region_name") if "timezone" not in columns: diff --git a/src/geo_utils.py b/src/geo_utils.py index 34b5265..9c4538e 100644 --- a/src/geo_utils.py +++ b/src/geo_utils.py @@ -41,7 +41,9 @@ def fetch_ip_geolocation(ip_address: str) -> Optional[Dict[str, Any]]: # Check if the API call was successful if data.get("status") != "success": - app_logger.warning(f"IP lookup failed for {ip_address}: {data.get('message')}") + app_logger.warning( + f"IP lookup failed for {ip_address}: {data.get('message')}" + ) return None # Cache the result @@ -113,7 +115,7 @@ def fetch_blocklist_data(ip_address: str) -> Optional[Dict[str, Any]]: # Get the most recent result (first in list, sorted by record_added) most_recent = results[0] list_on = most_recent.get("list_on", {}) - + app_logger.debug(f"Fetched blocklist data for {ip_address}") return list_on except requests.RequestException as e: diff --git a/src/tasks/fetch_ip_rep.py b/src/tasks/fetch_ip_rep.py index 8737fae..ddaea49 100644 --- a/src/tasks/fetch_ip_rep.py +++ b/src/tasks/fetch_ip_rep.py @@ -29,7 +29,7 @@ def main(): try: # Fetch geolocation data using ip-api.com geoloc_data = extract_geolocation_from_ip(ip) - + # Fetch blocklist data from lcrawl API blocklist_data = fetch_blocklist_data(ip) @@ -55,7 +55,7 @@ def main(): list_on = blocklist_data else: list_on = {} - + # Add flags to list_on list_on["is_proxy"] = is_proxy list_on["is_hosting"] = is_hosting @@ -69,7 +69,9 @@ def main(): sanitized_city = sanitize_for_storage(city, 100) if city else None sanitized_timezone = sanitize_for_storage(timezone, 50) sanitized_isp = sanitize_for_storage(isp, 100) - sanitized_reverse = sanitize_for_storage(reverse, 255) if reverse else None + sanitized_reverse = ( + sanitize_for_storage(reverse, 255) if reverse else None + ) sanitized_list_on = sanitize_dict(list_on, 100000) db_manager.update_ip_rep_infos( From 578645756765bd284b9725758410cc813152ac80 Mon Sep 17 00:00:00 2001 From: carnivuth Date: Tue, 3 Feb 2026 14:04:04 +0100 Subject: [PATCH 3/3] bumped version --- helm/Chart.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/helm/Chart.yaml b/helm/Chart.yaml index 839e4f7..6e37702 100644 --- a/helm/Chart.yaml +++ b/helm/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 name: krawl-chart description: A Helm chart for Krawl honeypot server type: application -version: 1.0.0 -appVersion: 1.0.1 +version: 1.0.2 +appVersion: 1.0.2 keywords: - honeypot - security @@ -13,4 +13,4 @@ maintainers: home: https://github.com/blessedrebus/krawl sources: - https://github.com/blessedrebus/krawl -icon: https://raw.githubusercontent.com/blessedrebus/krawl/main/img/krawl-svg.svg \ No newline at end of file +icon: https://raw.githubusercontent.com/blessedrebus/krawl/main/img/krawl-svg.svg