This Go script processes JSON output from HTTPX (Project Discovery) and imports the data into a Neo4j database. It extracts information about hosts, IP addresses, technologies, and ASN data, structuring them into a graph database for further analysis.
- Processes JSON line by line to minimize memory usage.
- Automates data import into Neo4j for visualization and analysis.
- Creates relationships between Hosts, IPs, Technologies, and ASN data.
- Supports command-line arguments for flexible file input.
Install directly using Go:
go install github.com/pocahon/jsontoneo@latestOn the first run, the script checks for a configuration file at ~/.config/jsontoneo/neo4j_config.yaml. If the file does not exist, it automatically creates the necessary directory and prompts you to enter your Neo4j credentials (URI, username, and password). These details are then saved in the configuration file for subsequent runs.
The default configuration file, once created, will contain:
neo4j:
uri: "neo4j://localhost:7687"
user: "neo4j"
password: "neo4jpass"After installation, you can run the script by specifying the path to the JSON file you wish to process. The script will automatically import the data into your Neo4j database, creating nodes and relationships based on the extracted information.
jsontoneo -f /path/to/your/httpx-output.json