Ask coding questions

← Back to all posts
I accidentally broke my script, help
AzureScripts (166)

Idk what i did but now my "else:" is giving me a syntax error

Commentshotnewtop
Coder100 (8943)

You forgot to close your parentheses on line 13!

print("[FOUND] " + https_a + " (" + socket.gethostbyname(a) + ")")
PattanAhmed (1107)

@AzureScripts Hi,
Silly error:-
You forgot to close the print statement's parentheses on line 13.
Change your code to like this on line 13:-

print("[FOUND] " + https_a + " (" + socket.gethostbyname(a) + ")")

Or change lines from 7 to 18:-

def check(a):
  try:
    https_a = "https://" + a
    r = requests.get(https_a)
    # This checks to see the status code
    if r.status_code == 200 or r.status_code == 301 or r.status_code == 302:
      print("[FOUND] " + https_a + " (" + socket.gethostbyname(a) + ")")
    else:
      pass
  except:
    pass

That's it
Thanks!

Hope this helps

JosephSanthosh (1192)

Wait, did you call the person silly or the question silly? @PattanAhmed

PattanAhmed (1107)

@JosephSanthosh LoL!
Wait.
I called the

errorrr

as silly.

lmao