[Tutor] AntiSpam measures circumventing
Albert-Jan Roskam
fomcl at yahoo.com
Mon Sep 23 20:13:50 CEST 2013
----- Original Message -----
> From: Jugurtha Hadjar <jugurtha.hadjar at gmail.com>
> To: tutor at python.org
> Cc:
> Sent: Friday, September 20, 2013 4:50 PM
> Subject: [Tutor] AntiSpam measures circumventing
>
> Hello,
>
> I shared some assembly code (microcontrollers) and I had a comment wit
> my e-mail address for contact purposes.
>
> Supposing my name is John Doe and the e-mail is john.doe at hotmail.com, my
> e-mail was written like this:
>
> REMOVEMEjohn.doSPAMeSPAM at REMOVEMEhotmail.com'
>
> With a note saying to remove the capital letters.
>
> Now, I wrote this :
>
> for character in my_string:
> ... if (character == character.upper()) and (character !='@') and
> (character != '.'):
> ... my_string = my_string.replace(character,'')
>
>
> And the end result was john.doe at hotmail.com.
>
> Is there a better way to do that ? Without using regular expressions
> (Looked *really* ugly and it doesn't really make sense, unlike the few
> lines I've written, which are obvious even to a beginner like me).
I used this a while ago. It's not Python, but it's effective: http://www.jottings.com/obfuscator/
More information about the Tutor
mailing list