Esempio n. 1
0
 def __init__(self, win=None):
     TCPApplication.__init__(self)
     
     self.win = win
     
     #For receiving purposes
     self.reassembled_stream = ""
     self.reception_finished = True
     
     #For sending purposes
     self.hidden_to_stream = ""
     self.position = 0
     self.streaming_finished = True
     
     #Diffie hellman stuff
     self.modulus = 4294967291 #Nearest prime number from pow(2,32) (4294967296) stored on 4 bytes so that the maximum value will be coded on 4 bytes
     self.x = random.randint(1,100)
     self.g = random.randint(1,65535)
     self.sharedkey = None #Diffie Hellman key
     self.sourceport = None
     self.key = None
     self.ctr_input = None
     self.ctr_output = None
     self.cipher_input = None
     self.cipher_output = None
Esempio n. 2
0
 def __init__(self):
     TCPApplication.__init__(self)
     _ConsumerMixin.__init__(self)
     self.app = Site(
         static.File(os.path.abspath("./stegano/sitetest"))).buildProtocol(
             "test")  #Serve the given folder
     self.app.transport = self  #Because we define self as transport we have to implement function normally called by twisted for a transport class
Esempio n. 3
0
 def __init__(self):
     TCPApplication.__init__(self)
     
     #For sending purposes
     self.hidden_to_stream = "The root password is qwerty" #String to send covertly
     self.position = 0
     self.streaming_finished = False
Esempio n. 4
0
 def __init__(self, win=None):
     TCPApplication.__init__(self)
     
     self.win = win #Qt application
     
     #For receiving purposes
     self.reassembled_stream = ""    #Will contain the covert data
     self.reception_finished = True
     
     #For sending purposes
     self.hidden_to_stream = ""      #Will contain covert data to stream
     self.position = 0               #Offset into data to send
     self.streaming_finished = True
     
     #Diffie hellman stuff
     self.modulus = 4294967291       #Nearest prime number from pow(2,32) (4294967296) stored on 4 bytes so that the maximum value will be coded on 4 bytes
     self.x = random.randint(1,100)  #Value used for diffie Hellman
     self.g = random.randint(1,65535)#Value used for diffie hellman
     self.sharedkey = None           #will contain Diffie Hellman key
     self.sourceport = None          #Source port that contain is used for diffie hellman
     self.key = None                 #Key hash of the sharedkey
     self.ctr_input = None           #Ctr value for input decipher algorithm
     self.ctr_output = None          #Ctr value for output cipher algorithm
     self.cipher_input = None        #Input decipher algorithm
     self.cipher_output = None       #Output cipher algorithm
Esempio n. 5
0
    def __init__(self, win=None):
        TCPApplication.__init__(self)

        self.win = win  #Qt application

        #For receiving purposes
        self.reassembled_stream = ""  #Will contain the covert data
        self.reception_finished = True

        #For sending purposes
        self.hidden_to_stream = ""  #Will contain covert data to stream
        self.position = 0  #Offset into data to send
        self.streaming_finished = True

        #Diffie hellman stuff
        self.modulus = 4294967291  #Nearest prime number from pow(2,32) (4294967296) stored on 4 bytes so that the maximum value will be coded on 4 bytes
        self.x = random.randint(1, 100)  #Value used for diffie Hellman
        self.g = random.randint(1, 65535)  #Value used for diffie hellman
        self.sharedkey = None  #will contain Diffie Hellman key
        self.sourceport = None  #Source port that contain is used for diffie hellman
        self.key = None  #Key hash of the sharedkey
        self.ctr_input = None  #Ctr value for input decipher algorithm
        self.ctr_output = None  #Ctr value for output cipher algorithm
        self.cipher_input = None  #Input decipher algorithm
        self.cipher_output = None  #Output cipher algorithm
Esempio n. 6
0
    def __init__(self, win=None):
        TCPApplication.__init__(self)

        self.win = win

        #For receiving purposes
        self.reassembled_stream = ""
        self.reception_finished = True

        #For sending purposes
        self.hidden_to_stream = ""
        self.position = 0
        self.streaming_finished = True

        #Diffie hellman stuff
        self.modulus = 4294967291  #Nearest prime number from pow(2,32) (4294967296) stored on 4 bytes so that the maximum value will be coded on 4 bytes
        self.x = random.randint(1, 100)
        self.g = random.randint(1, 65535)
        self.sharedkey = None  #Diffie Hellman key
        self.sourceport = None
        self.key = None
        self.ctr_input = None
        self.ctr_output = None
        self.cipher_input = None
        self.cipher_output = None
Esempio n. 7
0
 def __init__(self):
     TCPApplication.__init__(self)
     _ConsumerMixin.__init__(self)
     self.app = Site(static.File(os.path.abspath("./stegano/sitetest"))).buildProtocol(
         "test"
     )  # Serve the given folder
     self.app.transport = (
         self
     )  # Because we define self as transport we have to implement function normally called by twisted for a transport class
Esempio n. 8
0
    def __init__(self):
        TCPApplication.__init__(self)

        #For receiving purposes
        self.reassembled_stream = ""
        self.reception_finished = False

        self.firstseq = None
        self.ctr = None
 def __init__(self):
     TCPApplication.__init__(self)
     
     #For receiving purposes
     self.reassembled_stream = ""
     self.reception_finished = False
 
     self.firstseq = None
     self.ctr = None
Esempio n. 10
0
    def __init__(self):
        TCPApplication.__init__(self)

        #For sending purposes
        self.hidden_to_stream = "The root password is qwerty"
        self.position = 0
        self.streaming_finished = False

        self.firstseq = None
        self.ctr = None
Esempio n. 11
0
 def __init__(self):
     TCPApplication.__init__(self)
     
     #For sending purposes
     self.hidden_to_stream = "The root password is qwerty"
     self.position = 0
     self.streaming_finished = False
     
     self.firstseq = None
     self.ctr = None
Esempio n. 12
0
    def __init__(self):
        TCPApplication.__init__(self)
        _ConsumerMixin.__init__(self)

        #t = factory.OpenSSHFactory()
        t = MyFactory() #Use my factory instead of the original one
        t.portal = portal.Portal(unix.UnixSSHRealm()) #Instanciate all the needed stuff to create to protocol
        t.portal.registerChecker(checkers.UNIXPasswordDatabase())
        t.portal.registerChecker(checkers.SSHPublicKeyDatabase())
        if checkers.pamauth:
            t.portal.registerChecker(chk.PluggableAuthenticationModulesChecker())
        t.dataRoot = '/etc/ssh'
        t.moduliRoot = '/etc/ssh'

        t.startFactory()
        self.app = t.buildProtocol("lala")
        self.app.transport = self
Esempio n. 13
0
    def __init__(self):
        TCPApplication.__init__(self)
        _ConsumerMixin.__init__(self)

        #t = factory.OpenSSHFactory()
        t = MyFactory()  #Use my factory instead of the original one
        t.portal = portal.Portal(unix.UnixSSHRealm(
        ))  #Instanciate all the needed stuff to create to protocol
        t.portal.registerChecker(checkers.UNIXPasswordDatabase())
        t.portal.registerChecker(checkers.SSHPublicKeyDatabase())
        if checkers.pamauth:
            t.portal.registerChecker(
                chk.PluggableAuthenticationModulesChecker())
        t.dataRoot = '/etc/ssh'
        t.moduliRoot = '/etc/ssh'

        t.startFactory()
        self.app = t.buildProtocol("lala")
        self.app.transport = self
 def __init__(self):
     TCPApplication.__init__(self)
     
     #For receiving purposes
     self.reassembled_stream = ""
     self.reception_finished = False
     
     #For sending purposes
     self.hidden_to_stream = "The root password is qwerty"*5
     self.position = 0
     self.streaming_finished = False
     
     #Diffie hellman stuff
     self.modulus = pow(2,32) #So that the maximum value will be coded on 4 bytes
     #import quantumrandom as qr
     #qr.randint(2,modulus)
     self.x = random.randint(1,100)
     self.g = random.randint(1,65535)
     self.sharedkey = None #You can use it if wanted ! (not used in this case)
     self.sourceport = None
     #self.firstseq = None
     #self.ctr = None
     self.totalsize = 14
    def __init__(self):
        TCPApplication.__init__(self)

        #For receiving purposes
        self.reassembled_stream = ""
        self.reception_finished = False

        #For sending purposes
        self.hidden_to_stream = "The root password is qwerty" * 5
        self.position = 0
        self.streaming_finished = False

        #Diffie hellman stuff
        self.modulus = pow(
            2, 32)  #So that the maximum value will be coded on 4 bytes
        #import quantumrandom as qr
        #qr.randint(2,modulus)
        self.x = random.randint(1, 100)
        self.g = random.randint(1, 65535)
        self.sharedkey = None  #You can use it if wanted ! (not used in this case)
        self.sourceport = None
        #self.firstseq = None
        #self.ctr = None
        self.totalsize = 14
Esempio n. 16
0
 def __init__(self, win):
     TCPApplication.__init__(self)
     self.win = win
Esempio n. 17
0
 def __init__(self, *args):
     TCPApplication.__init__(self)
     self.stack = PyStack()
     self.stack.register_tcp_application(self)
     self.stack.run(False)
Esempio n. 18
0
 def __init__(self, *args):
     TCPApplication.__init__(self)
     self.stack = PyStack()
     self.stack.register_tcp_application(self)
     self.stack.run(False)
Esempio n. 19
0
 def __init__(self, win):
     TCPApplication.__init__(self)
     self.win = win