Skip to content

Commit a752c10

Browse files
committed
added bab11_bonus, simple auth, getPass & getUser
1 parent 5f71688 commit a752c10

File tree

3 files changed

+31
-0
lines changed

3 files changed

+31
-0
lines changed

bab11_bonus/simple_auth.py

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Simple Auth (getPass & getUser) by Kucing Item Putih (12 April 2018)
2+
3+
from getpass import getuser
4+
import getpass
5+
6+
username = getuser("Username = ")
7+
password = getpass.getpass("Password = ")
8+
if (username == "admin" and password == "admin"):
9+
print("yay, Sucess login!")
10+
else :
11+
print("wrong username / password, pls try again.")

bab11_bonus/simple_getPass.py

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Simple getPass by Kucing Item Putih (12 April 2018)
2+
3+
import getpass
4+
5+
username = input("Username = ")
6+
password = getpass.getpass("Password = ")
7+
if (username == "admin" and password == "admin"):
8+
print("yay, Sucess login!")
9+
else :
10+
print("wrong username / password, pls try again.")

bab11_bonus/simple_getUser.py

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Simple getUser by Kucing Item Putih (12 April 2018)
2+
3+
from getpass import getuser
4+
5+
username = getuser("Username = ")
6+
password = input("Password = ")
7+
if (username == "admin" and password == "admin"):
8+
print("yay, Sucess login!")
9+
else :
10+
print("wrong username / password, pls try again.")

0 commit comments

Comments
 (0)