mirror of https://github.com/n1nj4sec/pupy.git
Delay is small, we use separate thread..
This commit is contained in:
parent
ab9825fa28
commit
577f53dc9b
|
@ -6,9 +6,6 @@ transport protocol is available here:
|
|||
http://www.cs.kau.se/philwint/scramblesuit/
|
||||
"""
|
||||
|
||||
#from twisted.internet import reactor
|
||||
from ..obfscommon import threads as reactor
|
||||
|
||||
from ... import base
|
||||
import logging
|
||||
|
||||
|
@ -26,6 +23,7 @@ import uniformdh
|
|||
import state
|
||||
import fifobuf
|
||||
import ticket
|
||||
import time
|
||||
|
||||
log = logging
|
||||
|
||||
|
@ -34,7 +32,6 @@ class ReadPassFile(argparse.Action):
|
|||
with open(values) as f:
|
||||
setattr(namespace, self.dest, f.readline().strip())
|
||||
|
||||
|
||||
class ScrambleSuitTransport( base.BaseTransport ):
|
||||
|
||||
"""
|
||||
|
@ -252,8 +249,8 @@ class ScrambleSuitTransport( base.BaseTransport ):
|
|||
|
||||
if len(self.choppingBuf) == 0:
|
||||
self.choppingBuf.write(blurb)
|
||||
reactor.callLater(self.iatMorpher.randomSample(),
|
||||
self.flushPieces)
|
||||
time.sleep(self.iatMorpher.randomSample())
|
||||
self.flushPieces()
|
||||
else:
|
||||
# flushPieces() is still busy processing the chopping buffer.
|
||||
self.choppingBuf.write(blurb)
|
||||
|
@ -289,7 +286,8 @@ class ScrambleSuitTransport( base.BaseTransport ):
|
|||
self.circuit.downstream.write(blurb + padBlurb)
|
||||
return
|
||||
|
||||
reactor.callLater(self.iatMorpher.randomSample(), self.flushPieces)
|
||||
time.sleep(self.iatMorpher.randomSample())
|
||||
self.flushPieces
|
||||
|
||||
def processMessages( self, data ):
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue