Secure77

Techblog and Security

Python Cheat Sheet

Scripts / Tools
Sheets

Python Cheat Sheet

SMTP Mailer

import smtplib

server = smtplib.SMTP_SSL('smtp.server.com', 465)
headers = """From: Service <[email protected]>
To: <[email protected]>
Subject: Subject\n
gesendet von Pyton Mailer\n
"""
server.ehlo
server.login("username", "password")
server.sendmail(
  "[email protected]", 
  "[email protected]", 
  headers )
server.quit()

Web Server

python3 -m http.server 8080 --bind 10.10.14.120

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert