Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sumidcyber/netflowcrafter
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.
https://github.com/sumidcyber/netflowcrafter
cyber-analytics cybersecurity forensic-analysis forensics-tools malware netowrk-tools network network-analysis network-programming networks nmap scanner
Last synced: about 2 months ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/sumidcyber/netflowcrafter
- Owner: SUmidcyber
- Created: 2024-05-11T15:11:48.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-05-11T15:32:55.000Z (8 months ago)
- Last Synced: 2024-05-11T16:28:07.529Z (8 months ago)
- Topics: cyber-analytics, cybersecurity, forensic-analysis, forensics-tools, malware, netowrk-tools, network, network-analysis, network-programming, networks, nmap, scanner
- Language: Go
- Homepage: https://www.linkedin.com/in/umid-mammadov-951968278/
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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.
FeaturesProtocol 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 librariesContributing
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())
}
}