Ticket #5508: twisted_ssh_less_noisy.diff
| File twisted_ssh_less_noisy.diff, 5.2 KB (added by htj, 15 months ago) |
|---|
-
twisted/conch/ssh/transport.py
536 536 self.sendDisconnect(DISCONNECT_KEY_EXCHANGE_FAILED, 537 537 "couldn't match all kex parts") 538 538 return 539 log.msg('kex alg, key alg: %s %s' % (self.kexAlg, self.keyAlg))540 log.msg('outgoing: %s %s %s' % (self.nextEncryptions.outCipType,541 self.nextEncryptions.outMACType,542 self.outgoingCompressionType))543 log.msg('incoming: %s %s %s' % (self.nextEncryptions.inCipType,544 self.nextEncryptions.inMACType,545 self.incomingCompressionType))546 539 547 540 if self._keyExchangeState == self._KEY_EXCHANGE_REQUESTED: 548 541 self._keyExchangeState = self._KEY_EXCHANGE_PROGRESSING … … 606 599 607 600 @type service: C{SSHService} 608 601 """ 609 log.msg('starting service %s' % service.name)610 602 if self.service: 611 603 self.service.serviceStopped() 612 604 self.service = service … … 705 697 outs = [initIVSC, encKeySC, integKeySC] 706 698 ins = [initIVCS, encKeyCS, integKeyCS] 707 699 if self.isClient: # reverse for the client 708 log.msg('REVERSE')709 700 outs, ins = ins, outs 710 701 self.nextEncryptions.setKeys(outs[0], outs[1], ins[0], ins[1], 711 702 outs[2], ins[2]) … … 719 710 and compression parameters should be adopted. Any messages which were 720 711 queued during key exchange will also be flushed. 721 712 """ 722 log.msg('NEW KEYS')723 713 self.currentEncryptions = self.nextEncryptions 724 714 if self.outgoingCompressionType == 'zlib': 725 715 self.outgoingCompression = zlib.compressobj(6) -
twisted/conch/ssh/connection.py
238 238 if channel.localWindowLeft < channel.localWindowSize / 2: 239 239 self.adjustWindow(channel, channel.localWindowSize - \ 240 240 channel.localWindowLeft) 241 #log.msg('local window left: %s/%s' % (channel.localWindowLeft,242 # channel.localWindowSize))243 241 log.callWithLogger(channel, channel.dataReceived, data) 244 242 245 243 def ssh_CHANNEL_EXTENDED_DATA(self, packet): … … 407 405 @type channel: subclass of C{SSHChannel} 408 406 @type extra: C{str} 409 407 """ 410 log.msg('opening channel %s with %s %s'%(self.localChannelID,411 channel.localWindowSize, channel.localMaxPacket))412 408 self.transport.sendPacket(MSG_CHANNEL_OPEN, common.NS(channel.name) 413 409 + struct.pack('>3L', self.localChannelID, 414 410 channel.localWindowSize, channel.localMaxPacket) … … 429 425 """ 430 426 if channel.localClosed: 431 427 return 432 log.msg('sending request %s' % requestType)433 428 self.transport.sendPacket(MSG_CHANNEL_REQUEST, struct.pack('>L', 434 429 self.channelsToRemoteChannel[channel]) 435 430 + common.NS(requestType)+chr(wantReply) … … 494 489 """ 495 490 if channel.localClosed: 496 491 return # we're already closed 497 log.msg('sending eof')498 492 self.transport.sendPacket(MSG_CHANNEL_EOF, struct.pack('>L', 499 493 self.channelsToRemoteChannel[channel])) 500 494 … … 506 500 """ 507 501 if channel.localClosed: 508 502 return # we're already closed 509 log.msg('sending close %i' % channel.id)510 503 self.transport.sendPacket(MSG_CHANNEL_CLOSE, struct.pack('>L', 511 504 self.channelsToRemoteChannel[channel])) 512 505 channel.localClosed = True -
twisted/conch/ssh/userauth.py
144 144 if it failed. 145 145 @rtype: C{defer.Deferred} 146 146 """ 147 log.msg('%s trying auth %s' % (user, kind))148 147 if kind not in self.supportedAuthentications: 149 148 return defer.fail( 150 149 error.ConchError('unsupported authentication, failing')) … … 523 522 if meth not in self.authenticatedWith], 524 523 key=orderByPreference) 525 524 526 log.msg('can continue with: %s' % canContinue)527 525 return self._cbUserauthFailure(None, iter(canContinue)) 528 526 529 527 … … 685 683 if publicKey is not None: 686 684 self.lastPublicKey = publicKey 687 685 self.triedPublicKeys.append(publicKey) 688 log.msg('using key of type %s' % publicKey.type())689 686 self.askForAuth('publickey', '\x00' + NS(publicKey.sshType()) + 690 687 NS(publicKey.blob())) 691 688 return True
