├── password.txt ├── message.txt ├── README.md ├── .gitignore ├── LICENSE └── forwardSpam.py /password.txt: -------------------------------------------------------------------------------- 1 | lol nice try 2 | -------------------------------------------------------------------------------- /message.txt: -------------------------------------------------------------------------------- 1 | Hi Friend, 2 | 3 | I'm just testing my program right now. Please feel free to ignore this email. 4 | 5 | Thanks, 6 | Your Name Here 7 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | emailSpam 2 | ========= 3 | 4 | An email spam bot written in Python, to send emails to specified addresses. Use with caution. 5 | 6 | Simply make sure you have Python 2+ installed, with smtp support. Edit the password.txt file, recipients, and 7 | your email username to start zipping out those emails! 8 | 9 | CAUTION: Use at your own risk. No one is responsible but you for misuse of this code to tick people off. Cheers! 10 | 11 | (Note: depending on your email client, you may be initially blocked because of security reasons. Simply disable 12 | this setting for now, and then the program will run fine. 13 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | 5 | # C extensions 6 | *.so 7 | 8 | # Distribution / packaging 9 | .Python 10 | env/ 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | lib/ 17 | lib64/ 18 | parts/ 19 | sdist/ 20 | var/ 21 | *.egg-info/ 22 | .installed.cfg 23 | *.egg 24 | 25 | # PyInstaller 26 | # Usually these files are written by a python script from a template 27 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 28 | *.manifest 29 | *.spec 30 | 31 | # Installer logs 32 | pip-log.txt 33 | pip-delete-this-directory.txt 34 | 35 | # Unit test / coverage reports 36 | htmlcov/ 37 | .tox/ 38 | .coverage 39 | .cache 40 | nosetests.xml 41 | coverage.xml 42 | 43 | # Translations 44 | *.mo 45 | *.pot 46 | 47 | # Django stuff: 48 | *.log 49 | 50 | # Sphinx documentation 51 | docs/_build/ 52 | 53 | # PyBuilder 54 | target/ 55 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Andrew Li 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /forwardSpam.py: -------------------------------------------------------------------------------- 1 | import smtplib 2 | import time 3 | import random 4 | 5 | from email.Header import Header 6 | from email.mime.text import MIMEText 7 | #Open a file for reading 8 | 9 | me = 'andrewyli@gmail.com' # change to your email 10 | p_reader = open('password.txt', 'rb') # edit for your password 11 | cipher = p_reader.read() 12 | recipients = ['andrewyli@gmail.com'] # enter recipients here 13 | 14 | 15 | def spamEveryMinute(): 16 | while (True): 17 | fp = open('message.txt', 'rb') 18 | #multipart class is for multiple recipients 19 | msg = MIMEText(fp.read(), 'plain', 'utf-8') 20 | fp.close() 21 | 22 | thread_number = random.randint(0, 10000) 23 | msg['Subject'] = Header('Minutely Spam Report (randomizer: ' + str(thread_number) + ')', 'utf-8') 24 | msg['From'] = me 25 | msg['To'] = ', '.join(recipients) 26 | 27 | s = smtplib.SMTP(host='smtp.gmail.com', port=587) 28 | s.ehlo() 29 | s.starttls() 30 | s.ehlo() 31 | s.login(me, cipher) 32 | s.sendmail(me, recipients, msg.as_string()) 33 | 34 | print "Email sent to: " + ', '.join(recipients) 35 | s.quit() 36 | time.sleep(60) # change rate of fire here 37 | 38 | spamEveryMinute() 39 | --------------------------------------------------------------------------------