def WpadCustom(data, client): Wpad = re.search(r'(/wpad.dat|/*\.pac)', data) if Wpad: Buffer = WPADScript(Payload=settings.Config.WPAD_Script) Buffer.calculate() return str(Buffer) return False
def WpadCustom(data, client): Wpad = re.search(r'(/wpad.dat|/*\.pac)', data) if Wpad and SpotFirefox(data): Buffer = WPADScript(Payload="function FindProxyForURL(url, host){return 'DIRECT';}") Buffer.calculate() return str(Buffer) if Wpad and SpotFirefox(data) == False: Buffer = WPADScript(Payload=settings.Config.WPAD_Script) Buffer.calculate() return str(Buffer) return False