GitHub raw text file content is used to login in Python

Question:

So I have this little problem that i wanted to make a little script that gets the website content text from a raw .txt file in GitHub. Everything works fine it gets the 4-digit login code and prints it, but when i ask for it on input it just doesnt work.

import requests
url = 'https://raw.githubusercontent.com/RealMrQuacki/QCKR-LOADER/main/updated-key'
page = requests.get(url)

print(page.text)

login = input("")
if login == page.text:
    print("Logged in")
else:
    print("Failed")

Asked By: MrQuacki

||

Answers:

As a cheat developer I’ve seen many things throughout the years, but I haven’t ever seen someone try to make a cheat loader using Python and public GitHub repositories. This is a whole another level of stupidity.

Answered By: excepts

The two strings are not equal. What you input is indeed "1222", but page.text is "1222n", so with a new line at the end. With a debugger you can easily see the difference. For example use if login == page.text.strip(): to do the trick.

Answered By: Kozi
Categories: questions Tags: , , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.