
class Proxy(SimpleHTTPServer.SimpleHTTPRequestHandler):

    def do_GET(self):
        self.copyfile(urllib2.urlopen(self.path), self.wfile)

def httproxy():
    '''
    @description: Starts a basic HTTP proxy on the target system.
    @author: ohdae [bindshell@live.com]
    @short: http proxy
    '''
    httpd = SocketServer.ForkingTCPServer(('', PPORT), Proxy)
    print("[+] Serving HTTP proxy on port %s" % PPORT)
    log_msg("\n\n [ HTTP Proxy module executed ]")
    log_msg("\n Start Time: %s" % logtime)

    httpd.serve_forever()
