How to Send Anonymous Emails with Python
Hello fellow grey hat hackers, as hackers it becomes necessary for us to be able to send emails anonymously. Whether for whistle blowing or pranks or social engineering or whatever, it just is necessary for us to do that.
So then I tried with python smtplib but then that required that you login and that is just bad news especially, if you have got some kind of keylogger that sends you emails. I mean if the person finds it, you fucked up...lol
So I almost gave up until...i heard of anonymouse's anonymous email sending thingy...that bounces it around a lot so it's kinda anonymous anyway...so I figured I will give it shot...it worked!!!
It's just annoying to always open your web browser and have to go to that URL, I mean no one wants to do that....plus if I make it my homepage or I bookmark it and my kid brother wants to use my computer he will find that weird and I am not about to explain to my mum why I wanna send anonymous emails...I decided to write a script that does that and does it fast...after much research and debugging I finally got it right, so here you go...
That's the code, very pretty..Let's explain it
- Import mechanize(a module that acts like a browser)
- Getting the information about the email from the user
- Including headers(User-Agent) so that it looks legit.
- Adding some configurations to prevent suspicion and other stuff
- Select the first form on the page you can use the form name..but I haven't yet learn't that and I am not really into that...sorry :D
- input data data into the form
- Submit the form and get a response
- Telling user whether the information has been sent or not.
(There is also an option to use proxy but I didn't use that, that's why I commented it out!)
Now for the cool part, I will send an email with it. And you guys can check out that email!! It's pretty cool!!
Sorry...if you notice in the code, I added to print the response, you can leave that out(in fact you should, it's not necessary at all)...I wanted it to be real that's why I showed just a part of the response...but well here is the message sent. Now the confirmation..
Here is the confirmation..
You can check out the message here later, just to be sure or if you don't believe me...lol
There you have it, your own anonymous sending script in python(pretty easy huh?! :P ). And you can use mailinator to receive messages, but because of no login authentication, anyone can read those messages so don't let sensitive stuff go there.Thanks for reading :D
Also, because some of you might just want to look at the code and not a picture, here is the pastebin link(because I'm a nice guy!)
I leave you with a little something until next time.....
Acts 20:24 :- However, I consider my life worth nothing to me, if only I may finish the race and complete the task the Lord Jesus has given me -- the task of testifying to the gospel of God's grace. Amen!!