-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Asking #1
Comments
What do you want me to explain? TableWidget is a tool to display(or print) something, and you should first parse the packets with pcap and then convert to string, then you can display them with TableWidget |
Hello Sir,
Thank you for your answer and I understand your answer as well.
Since I am new to pyqt, I might have a lot of questions regarding to this
problem. For your case, you sniff and show the pcap packet onto
tablewidget. For my case, I just want to open the pcap file and display
packets like you did on tablewidget. So, could you please tell me how to
convert pcap file to string?
Sorry for the inconveniences. Lookinh foward to seeing your response.
Sincerely yours,
KEY Sopheap
…On Wed, 1 May 31 Heisei at 6:20 PM 彭兆卿 ***@***.***> wrote:
What do you want me to explain? TableWidget is a tool to display(or print)
something, and you should first parse the packets with pcap and then
convert to string, then you can display them with TableWidget
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AK2YLJXUKO2B2PHJAGA6M5DPTFOHBANCNFSM4HJOFUPA>
.
|
Hello sir,
In your case, you display source, destination, protocol and more by
str(source), str(destination), str(protocol). So, after I parse pcap
packet, I should do the same. Am i right?
On Wed, 1 May 31 Heisei at 6:48 PM Sopheap Key <keysopheap123@gmail.com>
wrote:
… Hello Sir,
Thank you for your answer and I understand your answer as well.
Since I am new to pyqt, I might have a lot of questions regarding to this
problem. For your case, you sniff and show the pcap packet onto
tablewidget. For my case, I just want to open the pcap file and display
packets like you did on tablewidget. So, could you please tell me how to
convert pcap file to string?
Sorry for the inconveniences. Lookinh foward to seeing your response.
Sincerely yours,
KEY Sopheap
On Wed, 1 May 31 Heisei at 6:20 PM 彭兆卿 ***@***.***> wrote:
> What do you want me to explain? TableWidget is a tool to display(or
> print) something, and you should first parse the packets with pcap and then
> convert to string, then you can display them with TableWidget
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#1 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AK2YLJXUKO2B2PHJAGA6M5DPTFOHBANCNFSM4HJOFUPA>
> .
>
|
ok, I will give you some hints.
Actually, pyqt is not that complicated if you just want to display something without thread, you can refer some tutorial: http://zetcode.com/gui/pyqt4/firstprograms/ But in my case, since a sniff operation is a thread, so I make it become so complicated. |
Thank you for your hints. I am really appreciate it.
By the way, one more thing about print_summary function. Does that part use
to convert pcap packets to string and seperate each string into each column
right?
…On Wed, 1 May 31 Heisei at 11:20 PM 彭兆卿 ***@***.***> wrote:
ok, I will give you some hints.
self.filterButton.clicked.connect(self.start_thread) says that the
start_thread function will be called after I clicked on filter button
text = str(self.filterText.text()) says that the I will get the input
text from filter widget
self.thread = SniffThread(self, self.pkt_buffer) says that I initialize a
thread (not started yet)
self.connect(self.thread, SIGNAL("output(PyQt_PyObject)"), self.push_entry)
means that, under this thread, if I send something(e.g. l) with signal
"output(PyQt_PyObject)" then the function push_entry will handle this l (in
my example, push_entry will print this l).
self.thread.render(interface=interface, filter_text=text) says that I
will start the thread now (the sniff will start).
Actually, pyqt is not that complicated if you just want to display
something without thread, if can refer some tutorial:
https://pythonspot.com/pyqt4/
http://zetcode.com/gui/pyqt4/firstprograms/
But in my case, since a sniff operation is a thread, so I make it become
so complicated.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AK2YLJS3SSKJP6H2GWUY5C3PTGRMRANCNFSM4HJOFUPA>
.
|
yes, print_summary is callback function that handle the result from sniff function, it convert the packet result into lists |
Okay, I understand it.
Another thing, the variable pkt in the print_summary function, is it the
pcap that you sniff?
For my case, I just open the pcap file from my directory and use expand
function to my imported pcap file. Since I don’t create a thread, that emit
signal is not important. Am I right?
…On Thu, 2 May 31 Heisei at 12:19 AM 彭兆卿 ***@***.***> wrote:
yes, print_summary is callback function that handle the result from sniff
function, it convert the packet result into lists
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AK2YLJVUZKS7YWQXOHQ3URLPTGYHPANCNFSM4HJOFUPA>
.
|
Hello Sir,
About the parsing pcap file and display on TableWidget, now I can display
on TableWidget. But why it only display the last packet of pcap not all
packet? Could you tell me the problem here?
Sincerely yours,
KEY Sopheap
On Thu, 2 May 31 Heisei at 12:45 AM Sopheap Key <keysopheap123@gmail.com>
wrote:
… Okay, I understand it.
Another thing, the variable pkt in the print_summary function, is it the
pcap that you sniff?
For my case, I just open the pcap file from my directory and use expand
function to my imported pcap file. Since I don’t create a thread, that emit
signal is not important. Am I right?
On Thu, 2 May 31 Heisei at 12:19 AM 彭兆卿 ***@***.***> wrote:
> yes, print_summary is callback function that handle the result from sniff
> function, it convert the packet result into lists
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#1 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AK2YLJVUZKS7YWQXOHQ3URLPTGYHPANCNFSM4HJOFUPA>
> .
>
|
Hello Sir,
Here is my result. Hope you can help me one last time.
Sincerely yours,
KEY Sopheap
…On Tue, May 7, 2019 at 6:23 PM Sopheap Key ***@***.***> wrote:
Hello Sir,
About the parsing pcap file and display on TableWidget, now I can display
on TableWidget. But why it only display the last packet of pcap not all
packet? Could you tell me the problem here?
Sincerely yours,
KEY Sopheap
On Thu, 2 May 31 Heisei at 12:45 AM Sopheap Key ***@***.***>
wrote:
> Okay, I understand it.
> Another thing, the variable pkt in the print_summary function, is it the
> pcap that you sniff?
> For my case, I just open the pcap file from my directory and use expand
> function to my imported pcap file. Since I don’t create a thread, that emit
> signal is not important. Am I right?
>
> On Thu, 2 May 31 Heisei at 12:19 AM 彭兆卿 ***@***.***> wrote:
>
>> yes, print_summary is callback function that handle the result from
>> sniff function, it convert the packet result into lists
>>
>> —
>> You are receiving this because you authored the thread.
>> Reply to this email directly, view it on GitHub
>> <#1 (comment)>,
>> or mute the thread
>> <https://github.com/notifications/unsubscribe-auth/AK2YLJVUZKS7YWQXOHQ3URLPTGYHPANCNFSM4HJOFUPA>
>> .
>>
>
|
Hello.
I just want to you something regarding to this issue. For my case, I only want to read pcap file. By clicking open pcap file, all packets will be listed in TableWidget. Could you please explain me about this problem?
The text was updated successfully, but these errors were encountered: