Greetings all!
Anyway excuse my English.
I can't understand how I can do this:
<loop cycle; variable is filled by some values>
<loop is still running, but simultaneously another command is running>
<loop is terminated; i want to read variable>
More specifically (it concerned with Scapy module, but I'll explain the detailes):
May be somebody who do parallel programming knows how I can do that?
Anyway excuse my English.
I can't understand how I can do this:
<loop cycle; variable is filled by some values>
<loop is still running, but simultaneously another command is running>
<loop is terminated; i want to read variable>
More specifically (it concerned with Scapy module, but I'll explain the detailes):
Code:
# sniff() command reads packets from network interface in loop and puts them as list to variable 'a'
a = sniff()
# now I want sniff() to be running in background and to run another command - ping host in this case
send(IP(dst='192.168.0.1')/ICMP())
# now I want to terminate sniff() loop and to see what in variable 'a'
print a
May be somebody who do parallel programming knows how I can do that?