<<<<<<< HEAD
import subprocess
import tkinter as tk
from tkinter import filedialog

def filter_pcap(file):
    # once pcap is downloaded open wireshark
    cmd1 = 'start wireshark -Y "ip.src == 10.52.15.117 and ip.dst == 238.0.0.1 and udp.port == 50001" ' + file
    process = subprocess.Popen(cmd1, shell=True, stdout=subprocess.PIPE)
    output, error = process.communicate()
    print(output.decode())  # print the filtered output as a string

    # cmds: wireshark [options] ... [<infile>]


    # use filter:
    # ip.src == 10.52.15.117 and ip.dst == 238.0.0.1 and udp.port == 50001
    # export specified packets...
    # rename file with _filtered in chosen location

    # exit wireshark


    # open folder where filtered pcap is

if __name__ == '__main__':
    # file = filedialog.askopenfilename()
    file = "turkey_tcpdump_20241004145414_VQQ_hyd_test.pcap"
    filter_pcap(file)
else:
=======
import subprocess
import tkinter as tk
from tkinter import filedialog

def filter_pcap(file):
    # once pcap is downloaded open wireshark
    cmd1 = 'start wireshark -Y "ip.src == 10.52.15.117 and ip.dst == 238.0.0.1 and udp.port == 50001" ' + file
    process = subprocess.Popen(cmd1, shell=True, stdout=subprocess.PIPE)
    output, error = process.communicate()
    print(output.decode())  # print the filtered output as a string

    # cmds: wireshark [options] ... [<infile>]


    # use filter:
    # ip.src == 10.52.15.117 and ip.dst == 238.0.0.1 and udp.port == 50001
    # export specified packets...
    # rename file with _filtered in chosen location

    # exit wireshark


    # open folder where filtered pcap is

if __name__ == '__main__':
    # file = filedialog.askopenfilename()
    file = "turkey_tcpdump_20241004145414_VQQ_hyd_test.pcap"
    filter_pcap(file)
else:
>>>>>>> ebac091896f9d9fd44ed5b44ad3c4b4ae5a38f21
    print("what are you trying to do")