GithubHelp home page GithubHelp logo

sumidcyber / netflowcrafter Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 8 KB

This Go code is used to listen to network traffic, monitor and analyze certain protocols. Users can listen to live traffic from a specific network interface, monitor protocols such as TCP, UDP, ICMP, and record traffic. It can be used in various applications such as network security and performance monitoring.

Home Page: https://www.linkedin.com/in/umid-mammadov-951968278/

Go 100.00%
cyber-analytics cybersecurity forensic-analysis forensics-tools malware netowrk-tools network network-analysis network-programming networks nmap scanner

netflowcrafter's Introduction

Go Network Traffic Analyzer

The Go Network Traffic Analyzer is a versatile tool designed to monitor and analyze network traffic. It allows you to observe various network protocols, record traffic data, and analyze live traffic from specific network interfaces. Features

Protocol Monitoring: Monitor various network protocols such as TCP, UDP, ICMP, etc.
Live Traffic Monitoring: Analyze live traffic from a specified network interface.
Traffic Recording: Record traffic data to log files for later analysis.
Flexible Usage: User-friendly interface and simple command-line options for flexible usage.

Usage

Select the desired network interface and specify the protocols you want to monitor by running the program. Traffic monitoring will start automatically.

bash

go run interfaceP.go  and  go run onlyInterface.go

Requirements

Go (version 1.13 or newer)
github.com/google/gopacket and github.com/google/gopacket/pcap libraries

Contributing

Fork the project and make your enhancements.
Open an issue on GitHub for bug reports and suggestions.
Read, understand, and improve the code.

Listening to the network interface and analyzing TCP packets:

interface := "eth0"
packetType := "TCP"

// Ağ arabirimini ve paket türünü belirtin
handle, err := pcap.OpenLive(interface, 1600, true, pcap.BlockForever)
if err != nil {
    log.Fatal("Error opening interface:", err)
}
defer handle.Close()

packetSource := gopacket.NewPacketSource(handle, handle.LinkType())

// TCP paketlerini dinleme ve analiz etme
for packet := range packetSource.Packets() {
    tcpLayer := packet.Layer(layers.LayerTypeTCP)
    if tcpLayer != nil {
        tcp, _ := tcpLayer.(*layers.TCP)
        fmt.Printf("Source Port: %d, Destination Port: %d\n", tcp.SrcPort, tcp.DstPort)
    }
}

Interacting with a specific network device and analyzing ICMP packets:

interface := "eth0"
packetType := "ICMP"

// Ağ arabirimini ve paket türünü belirtin
handle, err := pcap.OpenLive(interface, 1600, true, pcap.BlockForever)
if err != nil {
    log.Fatal("Error opening interface:", err)
}
defer handle.Close()

packetSource := gopacket.NewPacketSource(handle, handle.LinkType())

// ICMP paketlerini dinleme ve analiz etme
for packet := range packetSource.Packets() {
    icmpLayer := packet.Layer(layers.LayerTypeICMPv4)
    if icmpLayer != nil {
        icmp, _ := icmpLayer.(*layers.ICMPv4)
        fmt.Printf("Type: %d, Code: %d\n", icmp.TypeCode.Type(), icmp.TypeCode.Code())
    }
}

netflowcrafter's People

Contributors

sumidcyber avatar

Stargazers

Ulaş SAYGIN avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.