Navigation X
ALERT
Click here to register with a few steps and explore all our cool stuff we have to offer!



   2451

Help With Python Login System!

by KnockOutGas - 03 November, 2020 - 03:45 PM
This post is by a banned member (KnockOutGas) - Unhide
This post is by a banned member (techtanic1234) - Unhide
56
Posts
3
Threads
5 Years of service
#2
(This post was last modified: 03 November, 2020 - 03:50 PM by techtanic1234.)
hi hit me up on discord

maybe this can help https://forum.freecodecamp.org/t/login-w...hon/194808
[Image: service.gif]
Discord: TECHTANIC#8090
ID: 323799247214608384
Click on Like or +Rep to help me reach the GODLIKE Rank. [Image: Amusing.png]
This post is by a banned member (KnockOutGas) - Unhide
This post is by a banned member (ZeroTolerance) - Unhide
147
Posts
19
Threads
6 Years of service
#4
Code:
import csv
import requests

login = False
answer = input("Do you have an account?(yes or no) ")


if answer == 'yes' :
    username = input("Username: ")
    password = input("Password: ")
    r = requests.get('https://pastebin.com/raw/HbNhYF3T').text # <- username,password
    user = [s for s in r.split(',')][0]
    passw = [s for s in r.split(',')][1]
    if username == user and password == passw:
        login = True
        #break
    else:
        login = False
        #break
        
    if login == True:
      print("You are now logged in!")
    else:
      print("Incorrect Login.")
      exit()    
else:
   print('Only Valid Usernames allowed')
   exit()

i don't know if that's what you're trying to do, if not, pm me with your discord.
This post is by a banned member (KnockOutGas) - Unhide
This post is by a banned member (ZeroTolerance) - Unhide
147
Posts
19
Threads
6 Years of service
#6
that's exactly what it's doing though, its reading the information (user,pass) from the pastebin raw tab and checks if the input entered matches
This post is by a banned member (KnockOutGas) - Unhide

Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
or
Sign in
Already have an account? Sign in here.


Forum Jump:


Users browsing this thread: 1 Guest(s)