{"id":24404879,"url":"https://github.com/basemax/ctu13data-analyst","last_synced_at":"2026-05-21T19:38:36.158Z","repository":{"id":273254852,"uuid":"919120746","full_name":"BaseMax/ctu13data-analyst","owner":"BaseMax","description":"This project analyzes CTU-13 dataset network traffic by creating visual graphs and calculating key graph attributes, such as degree and centrality, to explore network behavior and interactions.","archived":false,"fork":false,"pushed_at":"2025-01-19T20:35:09.000Z","size":28,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-25T11:57:25.773Z","etag":null,"topics":["ctu","ctu-dataset","dataset","graph","igraph","ip-dataset","network-dataset","network-ip","py","python","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BaseMax.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-19T18:52:55.000Z","updated_at":"2025-01-19T20:35:11.000Z","dependencies_parsed_at":"2025-01-19T20:19:14.571Z","dependency_job_id":"55f57f30-5a55-4c65-9afb-67d76314bfa9","html_url":"https://github.com/BaseMax/ctu13data-analyst","commit_stats":null,"previous_names":["basemax/ctu13data-analyst"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/BaseMax/ctu13data-analyst","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2Fctu13data-analyst","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2Fctu13data-analyst/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2Fctu13data-analyst/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2Fctu13data-analyst/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BaseMax","download_url":"https://codeload.github.com/BaseMax/ctu13data-analyst/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2Fctu13data-analyst/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28087822,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-27T02:00:05.897Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ctu","ctu-dataset","dataset","graph","igraph","ip-dataset","network-dataset","network-ip","py","python","python3"],"created_at":"2025-01-20T04:05:49.027Z","updated_at":"2025-12-27T23:18:39.972Z","avatar_url":"https://github.com/BaseMax.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CTU13 Data Analyst\n\nThis repository contains two Python scripts, `draw.py` and `calculate.py`, that analyze network traffic data from the CTU-13 dataset. The scripts create and visualize network graphs and calculate several graph attributes such as centrality measures.\n\n## Files Overview\n\n### `draw.py`\n\nThis script reads `.binetflow` files from the CTU-13 dataset, creates directed network graphs using the `networkx` library, and visualizes the graphs. It saves the resulting graph as PNG images.\n\n#### Functionality:\n\n- Reads the `.binetflow` files.\n- Constructs a directed graph where nodes represent IP addresses and edges represent communication between them.\n- Visualizes the graph using `matplotlib` and saves it as a PNG file.\n\n#### How it works:\n\n1. The script loops through directories in the specified dataset directory.\n2. For each `.binetflow` file, it creates a directed graph using `networkx`.\n3. The graph is then drawn using `matplotlib` and saved as a PNG image.\n\n#### Example Usage:\n\n```bash\npython draw.py\n```\n\n### `calculate.py`\n\nThis script calculates various graph metrics, including degree, centrality measures, and page rank, from `.binetflow` data files using the `igraph` library. It saves these metrics in CSV format.\n\n#### Functionality:\n- Creates a directed graph using `igraph`.\n- Calculates graph attributes such as:\n  - Degree\n  - In-degree\n  - Out-degree\n  - Closeness centrality\n  - Eigenvector centrality\n  - PageRank\n  - Alpha centrality\n- Saves the results as CSV files for further analysis.\n\n#### How it works:\n1. The script iterates through the specified dataset directory.\n2. For each `.binetflow` file, it creates a graph and calculates the desired metrics.\n3. The results are saved as a CSV file in the same directory.\n\n#### Example Usage:\n\n```bash\npython calculate.py\n```\n\n## Note on Graph Visualization\n\nDue to the enormous size of the graph generated from the dataset, it is almost impossible to draw and save it as a single image. The sheer number of nodes and edges would make the visualization process computationally expensive and result in images that are impractical to analyze.\n\nTherefore, instead of attempting to draw the graph, we focus on calculating and extracting the necessary graph parameters (such as degree, centrality measures, etc.) and save these values in a CSV file for further analysis. This approach allows us to efficiently handle large-scale graphs and derive meaningful insights without the need for expensive and impractical visualizations.\n\n### Wireshark and Npcap Installation\n\nTo analyze the network traffic data from the CTU-13 dataset, you can utilize Wireshark, a powerful network protocol analyzer. It allows you to capture and inspect network packets, making it easier to debug and explore network traffic.\n\n#### Wireshark Installation\n\n1. Download the Wireshark installer from the official website:  \n   [Wireshark 4.4.3 (Windows)](https://2.na.dl.wireshark.org/win64/Wireshark-4.4.3-x64.exe)\n\n2. During installation, you will be prompted to install **Npcap**, a packet capture library. It is highly recommended to install it, as it allows Wireshark to capture network traffic and perform real-time analysis.\n\n3. Follow the installation steps, and once complete, you can start analyzing the `.binetflow` files and other network capture data in the CTU-13 dataset with Wireshark.\n\n#### Npcap Installation\n\nNpcap is an essential component for network capture and is included in the Wireshark installation process. If you decide to install Wireshark, make sure that the **Npcap** option is selected during the setup. If you prefer to install Npcap separately, you can download it here:  \n[Npcap Download](https://nmap.org/npcap/)\n\nOnce installed, Npcap will allow you to capture network data using tools like Wireshark or other compatible software.\n\n## Installation\n\nYou can install the necessary dependencies using `pip`:\n\n```bash\npip install pandas networkx igraph matplotlib numpy\n```\n\n## Contributing\n\nFeel free to fork the repository, submit pull requests, or open issues if you have any improvements or suggestions. Contributions are welcome!\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for more details.\n\nCopyright 2025, Max Base\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasemax%2Fctu13data-analyst","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbasemax%2Fctu13data-analyst","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasemax%2Fctu13data-analyst/lists"}