How To: Send Anonymous Emails with Python

Send Anonymous Emails with Python

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...

The Code

Image via imgur.com

That's the code, very pretty..Let's explain it

  1. Import mechanize(a module that acts like a browser)
  2. Getting the information about the email from the user
  3. Including headers(User-Agent) so that it looks legit.
  4. Adding some configurations to prevent suspicion and other stuff
  5. 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
  6. input data data into the form
  7. Submit the form and get a response
  8. 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!)

Demo!

Now for the cool part, I will send an email with it. And you guys can check out that email!! It's pretty cool!!

Image via imgur.com

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..

Image via imgur.com

Here is the confirmation..
You can check out the message here later, just to be sure or if you don't believe me...lol
http://mailinator.com/inbox.jsp?to=nullbyte

Conclusion

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!)

http://pastebin.com/p3i6h59A

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!!

13 Comments

I think it takes a lot less time..this is the proof...but check it out for yourself...I could have faked but I didn't...OR DID I?? :D hehehe!!

Image via imgur.com

This is pretty cool :333 Also, thanks for the code!

Thanks.. and you welcome!!

Is mechanize a built in module? If not, where can I get the correct version?

I don't think it's built in. I used pip to install it : "pip install mechanize"
That's what I used to install it....hope this helped.

If you on linux(Debian) you can use:"sudo apt-get install python-mechanize" :D

Ok this si really awesome!!

But what if I want to use that iframe tag?? Or can I attach some file??

Anyway its too good!!

Thanks. Glad you like it. I don't really get what you mean by the iframe tag tho. and for the attachment unfortunately that's not possible. anonymouse doesn't support it. If I figure something out though I will let you know.

Thanks again.

~ManWuzi~

Thanks...I know what an iframe tag is though...but sorry I haven't tried it...you can give it a go tho

Ok so I sent an email using this to my own email but its been a day and I havrnt recieved it...

And it said succesful in the script.

It usually takes up to 12 hours to send the email, If you still haven't received it, then there must be something wrong with the service or you might not have entered the email address correctly. I'm sorry if I haven't been of much help.

i am getting an error plzz help me :

Traceback (most recent call last):
File "/opt/trity/trity.py", line 326, in <module>
tritymain()
File "/opt/trity/trity.py", line 251, in tritymain
anon()
File "/opt/trity/anon.py", line 41, in anon
br.open(url)
File "/usr/local/lib/python2.7/dist-packages/mechanize/_mechanize.py", line 254, in open
return self.mechopen(urlorrequest, data, timeout=timeout)
File "/usr/local/lib/python2.7/dist-packages/mechanize/mechanize.py", line 310, in mech_open
raise response
mechanize.response.httperrorseek_wrapper: HTTP Error 403: request disallowed by robots.txt

thanks in advance ...

Share Your Thoughts

  • Hot
  • Latest