python - How to multithread a scapy handshake -


i've got following lines of code wait connection client:

connfilter = "tcp[tcpflags] & (tcp-syn) != 0 , dst port " + str(hostport) connreq = sniff(filter = connfilter, prn = handshake) 

for every packet handshake required , html page send. handshake function works fine, until multiple clients connect @ same time.

why? because function called again when previous handshake complete. causes client time out if has not been handshaked in time. scapy waits response bizarre long time.

how can multithread this?


Comments

Popular posts from this blog

IF statement in MySQL trigger -

c++ - What does MSC in "// appease MSC" comments mean? -

javascript - Add class to another page attribute using URL id - Jquery -