A modern platform for visual, flexible, and extensible graph-based investigations. For cybersecurity analysts and investigators.
feat: rename ip_to geolocation to ip_to_infos
dextmorgncce0e51faf5d
diff --git a/flowsint-api/app/api/routes/flows.py b/flowsint-api/app/api/routes/flows.pyindex 7eadfd2a..b7da55d9 100644--- a/flowsint-api/app/api/routes/flows.py+++ b/flowsint-api/app/api/routes/flows.py@@ -511,7 +511,7 @@ def process_node_data(node: Node, inputs: Dict[str, Any]) -> Dict[str, Any]:"creation_date": "2020-01-01",}- elif class_name == "GeolocationScanner":+ elif class_name == "IpToInfosScanner":# Geolocation scanneroutputs[output_name] = {"country": "France",diff --git a/flowsint-app/src/renderer/src/components/graphs/index.tsx b/flowsint-app/src/renderer/src/components/graphs/index.tsxindex b28490de..a36c4fe8 100644--- a/flowsint-app/src/renderer/src/components/graphs/index.tsx+++ b/flowsint-app/src/renderer/src/components/graphs/index.tsx@@ -54,7 +54,7 @@ const GraphPanel = ({ graphData, isLoading }: GraphPanelProps) => {const setFilters = useGraphStore(s => s.setFilters)const filters = useGraphStore(s => s.filters)const { actionItems, isLoading: isLoadingActionItems } = useActionItems()- const NODE_COUNT_THRESHOLD = settings.general.graphViewerThreshold.value+ const NODE_COUNT_THRESHOLD = settings?.general?.graphViewerThreshold?.value || 1000const { sketch } = useLoaderData({from: '/_auth/dashboard/investigations/$investigationId/$type/$id',diff --git a/flowsint-app/src/renderer/src/stores/graph-settings-store.ts b/flowsint-app/src/renderer/src/stores/graph-settings-store.tsindex 058e77d9..dceca739 100644--- a/flowsint-app/src/renderer/src/stores/graph-settings-store.ts+++ b/flowsint-app/src/renderer/src/stores/graph-settings-store.ts@@ -13,15 +13,18 @@ const DEFAULT_SETTINGS = {description: "Display the MiniMap on the graph panel."},graphViewerThreshold: {- type: "number",- value: 1500,- min: 10,- max: 20000,- step: 5,+ type: "select",+ value: 800,+ options: [+ { value: 100, label: "100" },+ { value: 400, label: "400" },+ { value: 800, label: "800" },+ { value: 2000, label: "2000" }+ ],description: "Threshold to switch from general graph to less interactive but more performant) viewer."},- },+ },graph: {nodeSize: {type: "number",diff --git a/flowsint-core/src/flowsint_core/core/registry.py b/flowsint-core/src/flowsint_core/core/registry.pyindex 31620a51..1d92f87a 100644--- a/flowsint-core/src/flowsint_core/core/registry.py+++ b/flowsint-core/src/flowsint_core/core/registry.py@@ -15,7 +15,7 @@ from flowsint_transforms.domain.to_history import DomainToHistoryScannerfrom flowsint_transforms.email.to_domains import EmailToDomainsScannerfrom flowsint_transforms.individual.to_domains import IndividualToDomainsScannerfrom flowsint_transforms.ip.to_domain import ReverseResolveScanner-from flowsint_transforms.ip.to_geolocation import GeolocationScanner+from flowsint_transforms.ip.to_infos import IpToInfosScannerfrom flowsint_transforms.ip.to_asn import IpToAsnScanner# ASN-related scanners@@ -147,7 +147,7 @@ TransformRegistry.register(DomainToAsnScanner)TransformRegistry.register(DomainToHistoryScanner)# IP-related scanners-TransformRegistry.register(GeolocationScanner)+TransformRegistry.register(IpToInfosScanner)TransformRegistry.register(IpToAsnScanner)# ASN-related scannersdiff --git a/flowsint-core/src/flowsint_core/core/scanner_base.py b/flowsint-core/src/flowsint_core/core/scanner_base.pyindex cce02292..c4bbf186 100644--- a/flowsint-core/src/flowsint_core/core/scanner_base.py+++ b/flowsint-core/src/flowsint_core/core/scanner_base.py@@ -373,6 +373,7 @@ class Scanner(ABC):final_properties["type"] = node_type.lower()final_properties["sketch_id"] = self.sketch_idfinal_properties["label"] = final_properties.get("label", key_value)+set_clauses = [f"n.{prop} = ${prop}" for prop in final_properties.keys()]params = {key_prop: key_value, **final_properties}diff --git a/flowsint-transforms/src/flowsint_transforms/ip/to_geolocation.py b/flowsint-transforms/src/flowsint_transforms/ip/to_infos.pysimilarity index 95%rename from flowsint-transforms/src/flowsint_transforms/ip/to_geolocation.pyrename to flowsint-transforms/src/flowsint_transforms/ip/to_infos.pyindex 5d528206..6f563cea 100644--- a/flowsint-transforms/src/flowsint_transforms/ip/to_geolocation.py+++ b/flowsint-transforms/src/flowsint_transforms/ip/to_infos.py@@ -9,8 +9,8 @@ InputType: TypeAlias = List[Ip]OutputType: TypeAlias = List[Ip]-class GeolocationScanner(Scanner):- """[ip-api.com] Get geolocation data for IP addresses."""+class IpToInfosScanner(Scanner):+ """[ip-api.com] Get information data for IP addresses."""# Define types as class attributes - base class handles schema generation automaticallyInputType = List[Ip]@@ -18,7 +18,7 @@ class GeolocationScanner(Scanner):@classmethoddef name(cls) -> str:- return "ip_to_geolocation"+ return "ip_to_infos"@classmethoddef category(cls) -> str:@@ -131,5 +131,5 @@ class GeolocationScanner(Scanner):return {}-InputType = GeolocationScanner.InputType-OutputType = GeolocationScanner.OutputType+InputType = IpToInfosScanner.InputType+OutputType = IpToInfosScanner.OutputTypediff --git a/flowsint-transforms/tests/scanners/ip/geolocation.py b/flowsint-transforms/tests/scanners/ip/ip_to_infos.pysimilarity index 96%rename from flowsint-transforms/tests/scanners/ip/geolocation.pyrename to flowsint-transforms/tests/scanners/ip/ip_to_infos.pyindex 607ef8b6..cc44e2bd 100644--- a/flowsint-transforms/tests/scanners/ip/geolocation.py+++ b/flowsint-transforms/tests/scanners/ip/ip_to_infos.py@@ -1,7 +1,7 @@-from flowsint_transforms.ips.geolocation import GeolocationScanner+from flowsint_transforms.ips.geolocation import IpToInfosScannerfrom flowsint_types.ip import Ip, Ip-scanner = GeolocationScanner("sketch_123", "scan_123")+scanner = IpToInfosScanner("sketch_123", "scan_123")def test_preprocess_valid_ips():diff --git a/test.js b/test.jsindex 8d3f33fe..58eef64c 100644--- a/test.js+++ b/test.js@@ -15,4 +15,7 @@ export function deepObjectDiff(obj1, obj2) {})return diffObject-}\ No newline at end of file+}++const diffObject = deepObjectDiff({ key1: "value1", key2: "value2" }, { key1: "value1", key2: "value3", key3: "value4" })+console.log(diffObject)\ No newline at end of file