Added prompt for SNMP password.
This commit is contained in:
1 parent
c4884ce14a
commit
5d1d4d9aae
1 file changed
+4
@@ -15,6 +15,7 @@ from datetime import datetime
|
|||||||
from bs4 import BeautifulSoup
|
from bs4 import BeautifulSoup
|
||||||
import smtplib
|
import smtplib
|
||||||
from email.mime.text import MIMEText
|
from email.mime.text import MIMEText
|
||||||
|
import getpass # For secure SNMP password input
|
||||||
|
|
||||||
SMTP_SERVER = "smtp.gmail.com"
|
SMTP_SERVER = "smtp.gmail.com"
|
||||||
SMTP_PORT = 587
|
SMTP_PORT = 587
|
||||||
@@ -41,6 +42,9 @@ parser.add_argument("-h", "--hook", type=str,
|
|||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
# Prompt for SNMP password securely
|
||||||
|
SNMP_PASSWORD = getpass.getpass("Enter SNMP password: ")
|
||||||
|
|
||||||
def normalize_url(url):
|
def normalize_url(url):
|
||||||
parsed = urlparse(url)
|
parsed = urlparse(url)
|
||||||
if not parsed.scheme:
|
if not parsed.scheme:
|
||||||
|
|||||||
Reference in new issue
Block a user