minor bug fix

This commit is contained in:
Lgandx 2013-02-14 11:30:46 -05:00
parent 2718f9c513
commit f5c1f9464a
2 changed files with 3 additions and 11 deletions

View file

@ -39,7 +39,7 @@ class WPADScript(Packet):
("Code", "HTTP/1.1 200 OK\r\n"), ("Code", "HTTP/1.1 200 OK\r\n"),
("ServerType", "Server: Microsoft-IIS/6.0\r\n"), ("ServerType", "Server: Microsoft-IIS/6.0\r\n"),
("Date", "Date: Wed, 12 Sep 2012 13:06:55 GMT\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"), ("PoweredBy", "X-Powered-By: ASP.NET\r\n"),
("ContentLen", "Content-Length: "), ("ContentLen", "Content-Length: "),
("ActualLen", "76"), ("ActualLen", "76"),
@ -63,14 +63,6 @@ class IIS_Auth_407_Ans(Packet):
("CRLF", "\r\n"), ("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. #HTTP NTLM packet.
class IIS_407_NTLM_Challenge_Ans(Packet): class IIS_407_NTLM_Challenge_Ans(Packet):
fields = OrderedDict([ fields = OrderedDict([

View file

@ -862,7 +862,7 @@ def ProxyPacketSequence(data,client):
if packetNtlm == "\x03": if packetNtlm == "\x03":
NTLM_Auth= b64decode(''.join(a)) NTLM_Auth= b64decode(''.join(a))
ParseHTTPHash(NTLM_Auth,client) ParseHTTPHash(NTLM_Auth,client)
buffer1 = IIS_Proxy_Auth_Failed() buffer1 = DitchThisConnection()
buffer1.calculate() buffer1.calculate()
return str(buffer1) return str(buffer1)
if b: if b:
@ -876,7 +876,7 @@ def ProxyPacketSequence(data,client):
WriteData(outfile,b64decode(''.join(b))) WriteData(outfile,b64decode(''.join(b)))
print "[+]HTTP-User & Password:", b64decode(''.join(b)) print "[+]HTTP-User & Password:", b64decode(''.join(b))
logging.warning('[+]HTTP-User & Password: %s'%(b64decode(''.join(b)))) logging.warning('[+]HTTP-User & Password: %s'%(b64decode(''.join(b))))
buffer1 = IIS_Proxy_Auth_Failed() buffer1 = DitchThisConnection()
buffer1.calculate() buffer1.calculate()
return str(buffer1) return str(buffer1)