Skip to content

Commit

Permalink
stub for pcap engine
Browse files Browse the repository at this point in the history
  • Loading branch information
Srinivas11789 committed Aug 6, 2019
1 parent b22f360 commit 52665ef
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Source/Module/user_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,14 @@ def __init__(self, base):
# Browse button
ttk.Button(FirstFrame, text="Browse", command=lambda: self.browse_directory("report")).grid(column=2, row=0, padx=10, pady=10,sticky="E")

# Pcap Engine
# * Add Pcap Engine with an Engine Selection here once tested with full support
# * Need to solve pyshark errors: main thread event loop, infinite loop in file capture
self.engine = StringVar()
#self.engines = { 'scapy', 'pyshark' }
#ttk.OptionMenu(FirstFrame, self.engine, "Engine", *self.engines).grid(row=0,column=3, padx=5, sticky="W")
self.engine.set('scapy')

# Zoom
self.zoom = [900,900]
ttk.Button(FirstFrame, text="zoomIn", command=self.zoom_in).grid(row=0,column=10, padx=5, sticky="E")
Expand Down Expand Up @@ -188,7 +196,7 @@ def pcap_analyse(self):

# PcapRead - First of All!
#result = q.Queue()
packet_read = threading.Thread(target=pcap_reader.PcapEngine,args=(self.pcap_file.get(),"scapy"))
packet_read = threading.Thread(target=pcap_reader.PcapEngine,args=(self.pcap_file.get(), self.engine.get()))
packet_read.start()
while packet_read.is_alive():
self.progressbar.update()
Expand Down

0 comments on commit 52665ef

Please sign in to comment.