[PYTHON] Try to write a program that abuses the program and sends 100 emails

** * This is an example of how the program can be easily abused, not an article that promotes cybercrime. Thank you. ** **

Start work

itazura.py



  1import smtplib
  2 from email.mime.text import MIMEText
  3
  4 for i in range(100):
  5 #Function to send mail from Yahoo Mail
  6     def send_mail(co_msg):
  7         SMTP_SERVER = "smtp.mail.yahoo.co.jp"
  8         SMTP_PORT = 587
  9         SMTP_USERNAME = "[email protected]"#Your user name or registered address
 10         SMTP_PASSWORD = "test"#My password
 11         EMAIL_FROM ="[email protected]"#I also send the email address
 12         EMAIL_TO = "[email protected]"#Destination email address
 13         EMAIL_SUBJECT = "pythontest"#Title
 14         msg = MIMEText(co_msg)
 15         msg['Subject'] = EMAIL_SUBJECT
 16         msg['From'] = EMAIL_FROM
 17         msg['To'] = EMAIL_TO
 18         mail=smtplib.SMTP(SMTP_SERVER, SMTP_PORT)
 19         mail.login(SMTP_USERNAME, SMTP_PASSWORD)
 20         mail.sendmail(EMAIL_FROM, EMAIL_TO, msg.as_string())
 21         mail.quit()
 22         return
 23
 24
 25     #Function execution
 26     text='I win! Please think about why you lost by tomorrow.'
 28     send_mail(co_msg=text)
~

that's all. Please adjust because there is a number of times on the 4th line. Next is the setting of Yahoo Mail.

Settings on the YAHOO side

スクリーンショット 2019-12-13 16.51.24.png

Please do it like this. When you run the program, you will receive 100 emails to that destination. to come. **To go. Please do not abuse it. ** **

Recommended Posts

Try to write a program that abuses the program and sends 100 emails
Write a python program to find the editing distance [python] [Levenshtein distance]
Write a program to solve the 4x4x4 Rubik's Cube! 1. Overview
A program that just presses and releases the Esc key
How to write a metaclass that supports both python2 and python3
[Python] A program to find the number of apples and oranges that can be harvested
Let's write a program to solve the 4x4x4 Rubik's Cube! 2. Algorithm
Let's write a program to solve the 4x4x4 Rubik's Cube! 3. Implementation
A program that answers a few questions and predicts the next answer
[Python] A program that rotates the contents of the list to the left
Various comments to write in the program
[Python] A program that rounds the score
Let's write a program to solve the Rubik's Cube (Part 2: IDA * Search)
[Python] A program that calculates the number of socks to be paired
A program that searches for the same image
Let's write a Python program and run it
Try to write a ping confirmation script appropriately
A shell program that displays the Fibonacci sequence
Create a program that automatically inputs and sends body temperature every morning [Note]
Try porting the "FORTRAN77 Numerical Computing Programming" program to C and Python (Part 1)
Try porting the "FORTRAN77 Numerical Computing Programming" program to C and Python (Part 3)
Try porting the "FORTRAN77 Numerical Computing Programming" program to C and Python (Part 2)
[Python] A program that finds the minimum and maximum values without using methods
[Python] A program that calculates the number of updates of the highest and lowest records
How to write a GUI using the maya command
[pyqtgraph] Created a class to display the crosshairs that follow the cursor and their coordinates
A simple system that automatically shoots with object detection and sends it to LINE
[Python] How to write a docstring that conforms to PEP8
A program to write Lattice Hinge with Rhinoceros with Python
Try to create a waveform (audio spectrum) that moves according to the sound with python
A note that runs an external program in Python and parses the resulting line
A solution to the problem that files containing [and] are not listed in glob.glob ()
[Python] A program that compares the positions of kangaroos.
[C / C ++] Pass the value calculated in C / C ++ to a python function to execute the process, and use that value in C / C ++.
A story that makes it easy to estimate the living area using Elasticsearch and Python
A program that automatically resizes the iOS app icon to the required image size in Python
How to start the PC at a fixed time every morning and execute the python program
Recursively get the Excel list in a specific folder with python and write it to Excel.
A story about porting the code of "Try and understand how Linux works" to Rust
Try to play with the uprobe that supports Systemtap directly
Try connecting to Supervisord via XMLRPC to start / stop the program
A program that removes specific characters from the entered text
[Python] Chapter 01-03 About Python (Write and execute a program using PyCharm)
A shell script that just emails the SQL execution result
Try to bring up a subwindow with PyQt5 and Python
How to write a test for processing that uses BigQuery
To write a test in Go, first design the interface
Try to extract the keywords that are popular in COTOHA
[Python] A program that finds the most common bird types
Try to model a multimodal distribution using the EM algorithm
[Introduction to Tensorflow] Understand Tensorflow properly and try to make a model
[Golang] A program that determines the turn with random numbers
Just try to receive a webhook in ngrok and python
I didn't want to write the AWS key in the program
Read and write a file
Write and read a file
Try to select a language
How to start the program
Try to generate a death metal jacket image with DCGAN + scrape the metal database site for that
A program that receives the servo command of the radio control, interrupts the Raspberry Pi and logs it
Write a script in Shell and Python to notify you in Slack when the process is finished