Skip to content

Commit ef4e419

Browse files
authored
feat: prompt app password without echoing
- Solves #19
1 parent a57d4ac commit ef4e419

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

emailbomber.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Built-in libraries
22
import smtplib
3+
import getpass
34
from os import access, path, mkdir
45
from email.message import EmailMessage
56

@@ -10,7 +11,7 @@
1011
if not path.exists("User_Credentials"):
1112
# If User_Credentials does not exist, asks for user credentials
1213
sender = input("Enter the Gmail address you would like to send emails from (example@gmail.com) -> ")
13-
app_password = input("Enter the app's password (xxxx xxxx xxxx xxxx) -> ")
14+
app_password = getpass.getpass("Enter the app's password (xxxx xxxx xxxx xxxx) -> ")
1415
else:
1516
# Otherwise, reads saved user credentials
1617
sender = open("User_Credentials/sender.txt", "rt").read()

0 commit comments

Comments
 (0)