Skip to content

Commit 7ffc4b6

Browse files
authored
Merge pull request #24 from task0001/patch-1
feat: prompt app password without echoing
2 parents a57d4ac + 432e306 commit 7ffc4b6

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

README.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
### Use App Password
3333
![App Password](https://i.imgur.com/krkn5EX.png)
3434
- Copy App Password.
35-
- Use App Password in Email-Bomber script.
35+
- Use App Password in Email-Bomber script (you can input it safely into the prompt without it displaying to the console).
3636
3737
### Setup App Password in Email-Bomber script
3838
![Folder Structure](./resources/images/folder-structure.jpg)
@@ -82,12 +82,6 @@ cd emailbomber
8282
python emailbomber.py
8383
```
8484
85-
# 🧾 Requirements.txt
86-
- [SMTP](https://docs.python.org/3/library/smtplib.html), which stands for Simple Mail Transfer Protocol, is a built-in Python module used to send e-mails in Python.
87-
88-
89-
- [OS](https://docs.python.org/3/library/os.html), which stands for Operating System, is a built-in Python module which provides a portable way of using operating system dependent functionality.
90-
9185
## 📇 License
9286
```
9387
MIT License

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)