Commit e29e2af3 authored by fimap.dev's avatar fimap.dev

Fixed bug #49. Thanks to fblubr for reporting it!

parent f74548a6
......@@ -43,14 +43,21 @@ class autoawesome(baseClass):
extHeader = ""
code, headers = self.doRequest(self.URL, self.config["p_useragent"], self.config["p_post"], self.config["header"], self.config["p_ttl"])
for head in headers:
if head[0] in ("set-cookie", "set-cookie2"):
cookie = head[1]
c = Cookie.SimpleCookie()
c.load(cookie)
for k,v in c.items():
extHeader += "%s=%s; " %(k, c[k].value)
if (headers != None):
for head in headers:
if head[0] in ("set-cookie", "set-cookie2"):
cookie = head[1]
c = Cookie.SimpleCookie()
c.load(cookie)
for k,v in c.items():
extHeader += "%s=%s; " %(k, c[k].value)
if (code == None):
print "Code == None!"
print "Does the target exist?!"
print "AutoAwesome mode failed. -> Aborting."
sys.exit(1)
if (extHeader != ""):
print "Cookies retrieved. Using them for further requests."
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment