Skip to content

This code is a Python script that extracts IP addresses from a pcap file, and plots their geo-locations on a KML file.

Notifications You must be signed in to change notification settings

AdiH8/Network-Tracking-using-Wireshark-and-Google-Maps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

This code is a Python script that extracts IP addresses from a pcap file, and plots their geo-locations on a KML file. It uses the dpkt module to read the pcap file, the socket module to convert IP addresses to human-readable format, and the pygeoip module to determine the geo-location of the IP addresses.

Installation

To use this code, you need to have Python installed on your machine, as well as the dpkt, socket, and pygeoip modules.

You can install these modules using pip, by running the following command in your terminal:

pip install dpkt socket pygeoip

Usage

To use this code, you need to have a pcap file that contains network traffic. You can run the code by running the main() function, which reads the pcap file, extracts the IP addresses, determines their geo-locations, and generates a KML file.

To run the code, simply execute the following command in your terminal:

python pcap-to-kml.py

The code will output the KML file to the console, which you can then save to a file using output redirection, like this:

python pcap-to-kml.py > output.kml

This will save the KML output to a file named output.kml in your current directory.

After that we upload our KML file to https://www.google.com/maps/d/

alt text

About

This code is a Python script that extracts IP addresses from a pcap file, and plots their geo-locations on a KML file.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages