Home > Enterprise >  GitHub raw text file content is used to login in Python
GitHub raw text file content is used to login in Python

Time:07-31

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")

CodePudding user response:

The two strings are not equal. What you input is indeed "1222", but page.text is "1222\n", 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.

CodePudding user response:

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.

  • Related