Guest User

Untitled

a guest
Jul 23rd, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.27 KB | None | 0 0
  1. Index: twisted/conch/ssh/transport.py
  2. ===================================================================
  3. --- twisted/conch/ssh/transport.py      (revision 34145)
  4. +++ twisted/conch/ssh/transport.py      (working copy)
  5. @@ -244,7 +244,8 @@
  6.          self.transport.write('%s\r\n' % (self.ourVersionString,))
  7.          self.currentEncryptions = SSHCiphers('none', 'none', 'none', 'none')
  8.          self.currentEncryptions.setKeys('', '', '', '', '', '')
  9. -        self.sendKexInit()
  10. +        # moved to dataReceived
  11. +        #self.sendKexInit()
  12.  
  13.  
  14.      def sendKexInit(self):
  15. @@ -425,6 +426,7 @@
  16.              for p in lines:
  17.                  if p.startswith('SSH-'):
  18.                      self.gotVersion = True
  19. +                    print 'OK now we have the version'
  20.                      self.otherVersionString = p.strip()
  21.                      remoteVersion = p.split('-')[1]
  22.                      if remoteVersion not in self.supportedVersions:
  23. @@ -432,6 +434,8 @@
  24.                          return
  25.                      i = lines.index(p)
  26.                      self.buf = '\n'.join(lines[i + 1:])
  27. +                    # moved from connectionMade
  28. +                    self.sendKexInit()
  29.          packet = self.getPacket()
  30.          while packet:
  31.              messageNum = ord(packet[0])
Add Comment
Please, Sign In to add comment