mirror of
https://github.com/reconurge/flowsint.git
synced 2026-04-30 11:19:07 -05:00
feat: rename ip_to geolocation to ip_to_infos
This commit is contained in:
@@ -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 scanner
|
||||
outputs[output_name] = {
|
||||
"country": "France",
|
||||
|
||||
@@ -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 || 1000
|
||||
|
||||
const { sketch } = useLoaderData({
|
||||
from: '/_auth/dashboard/investigations/$investigationId/$type/$id',
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -15,7 +15,7 @@ from flowsint_transforms.domain.to_history import DomainToHistoryScanner
|
||||
from flowsint_transforms.email.to_domains import EmailToDomainsScanner
|
||||
from flowsint_transforms.individual.to_domains import IndividualToDomainsScanner
|
||||
from flowsint_transforms.ip.to_domain import ReverseResolveScanner
|
||||
from flowsint_transforms.ip.to_geolocation import GeolocationScanner
|
||||
from flowsint_transforms.ip.to_infos import IpToInfosScanner
|
||||
from 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 scanners
|
||||
|
||||
@@ -374,6 +374,7 @@ class Scanner(ABC):
|
||||
final_properties["sketch_id"] = self.sketch_id
|
||||
final_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}
|
||||
|
||||
|
||||
@@ -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 automatically
|
||||
InputType = List[Ip]
|
||||
@@ -18,7 +18,7 @@ class GeolocationScanner(Scanner):
|
||||
|
||||
@classmethod
|
||||
def name(cls) -> str:
|
||||
return "ip_to_geolocation"
|
||||
return "ip_to_infos"
|
||||
|
||||
@classmethod
|
||||
def category(cls) -> str:
|
||||
@@ -131,5 +131,5 @@ class GeolocationScanner(Scanner):
|
||||
return {}
|
||||
|
||||
|
||||
InputType = GeolocationScanner.InputType
|
||||
OutputType = GeolocationScanner.OutputType
|
||||
InputType = IpToInfosScanner.InputType
|
||||
OutputType = IpToInfosScanner.OutputType
|
||||
@@ -1,7 +1,7 @@
|
||||
from flowsint_transforms.ips.geolocation import GeolocationScanner
|
||||
from flowsint_transforms.ips.geolocation import IpToInfosScanner
|
||||
from flowsint_types.ip import Ip, Ip
|
||||
|
||||
scanner = GeolocationScanner("sketch_123", "scan_123")
|
||||
scanner = IpToInfosScanner("sketch_123", "scan_123")
|
||||
|
||||
|
||||
def test_preprocess_valid_ips():
|
||||
Reference in New Issue
Block a user