Skip to content

Commit

Permalink
Merge pull request #3 from abhinashjain/master
Browse files Browse the repository at this point in the history
fix open_redirect 'r' error
  • Loading branch information
003random committed Dec 7, 2017
2 parents 14d630d + fa05c3c commit 0896dff
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions tools/open_redirect.py 100644 → 100755
Expand Up @@ -24,22 +24,22 @@ def start():

try:
r = requests.head(url, allow_redirects=True, timeout=5)
except:
print "[-]Error on " + url

if r.history:
if r.url == "https://example.com":
print "[+]"+url
if is_closed:
file = open(output_file,"w+")
is_closed = False
file.write(url + "\n")
if r.history:
if r.url == "https://example.com":
print "[+]"+url
if is_closed:
file = open(output_file,"w+")
is_closed = False
file.write(url + "\n")
else:
print "[-]"+url
else:
print "[-]"+url
else:
print "[-]"+url
else:
print "[-]Domain is invalid"
except:
print "[-]Error on " + url
else:
print "[-]Domain is invalid"

if is_closed == False:
file.close()
Expand Down

0 comments on commit 0896dff

Please sign in to comment.