Пример #1
0
 def channel_forwarded_tcpip(self, windowSize, maxPacket, data):
     log.msg('%s %s' % ('FTCP', repr(data)))
     remoteHP, origHP = forwarding.unpackOpen_forwarded_tcpip(data)
     log.msg(self.remoteForwards)
     log.msg(remoteHP)
     if remoteHP[1] in self.remoteForwards:
         connectHP = self.remoteForwards[remoteHP[1]]
         log.msg('connect forwarding %s' % (connectHP,))
         return SSHConnectForwardingChannel(connectHP,
                                         remoteWindow = windowSize,
                                         remoteMaxPacket = maxPacket,
                                         conn = self)
     else:
         raise ConchError(connection.OPEN_CONNECT_FAILED, "don't know about that port")
Пример #2
0
 def channel_forwarded_tcpip(self, windowSize, maxPacket, data):
     log.msg('%s %s' % ('FTCP', repr(data)))
     remoteHP, origHP = forwarding.unpackOpen_forwarded_tcpip(data)
     log.msg(self.remoteForwards)
     log.msg(remoteHP)
     if remoteHP[1] in self.remoteForwards:
         connectHP = self.remoteForwards[remoteHP[1]]
         log.msg('connect forwarding %s' % (connectHP,))
         return SSHConnectForwardingChannel(connectHP,
                                         remoteWindow = windowSize,
                                         remoteMaxPacket = maxPacket,
                                         conn = self)
     else:
         raise ConchError(connection.OPEN_CONNECT_FAILED, "don't know about that port")
Пример #3
0
 def channel_forwarded_tcpip(self, winSize, maxP, data):
     if self.diagnostic:
         print('FTCP %s' % repr(data))
     remoteHP, origHP = forwarding.unpackOpen_forwarded_tcpip(data)
     if self.diagnostic:
         print(remoteHP)
     if remoteHP[1] in self.remoteForwards:
         connectHP = self.remoteForwards[remoteHP[1]]
         if self.diagnostic:
             print('connect forwarding ', connectHP)
         return forwarding.SSHConnectForwardingChannel(connectHP,
                                                       remoteWindow=winSize,
                                                       remoteMaxPacket=maxP,
                                                       conn = self)
     else:
         raise ConchError(connection.OPEN_CONNECT_FAILED,
                          "don't know about that port")
Пример #4
0
 def channel_forwarded_tcpip(self, windowSize, maxPacket, data):
     '''
     This gets called when the remote forwared port gets a connection request
     '''
     log.msg('%s %s' % ('FTCP', repr(data)))
     remoteHP, origHP = forwarding.unpackOpen_forwarded_tcpip(data)
     log.msg(self.remoteForwards)
     log.msg(remoteHP)
     if self.remoteForwards.has_key(remoteHP[1]):
         connectHP = self.remoteForwards[remoteHP[1]]
         log.msg('connect forwarding %s' % (connectHP,))
         return SSHConnectForwardingChannel(connectHP,
                                         remoteWindow = windowSize,
                                         remoteMaxPacket = maxPacket,
                                         conn = self)
     else:
         raise ConchError(connection.OPEN_CONNECT_FAILED, "don't know about that port")
Пример #5
0
 def channel_forwarded_tcpip(self, windowSize, maxPacket, data):
     '''
     This gets called when the remote forwared port gets a connection request
     '''
     log.msg('%s %s' % ('FTCP', repr(data)))
     remoteHP, origHP = forwarding.unpackOpen_forwarded_tcpip(data)
     log.msg(self.remoteForwards)
     log.msg(remoteHP)
     if self.remoteForwards.has_key(remoteHP[1]):
         connectHP = self.remoteForwards[remoteHP[1]]
         log.msg('connect forwarding %s' % (connectHP, ))
         return SSHConnectForwardingChannel(connectHP,
                                            remoteWindow=windowSize,
                                            remoteMaxPacket=maxPacket,
                                            conn=self)
     else:
         raise ConchError(connection.OPEN_CONNECT_FAILED,
                          "don't know about that port")