How to mask an email address using m-code?

For example my email could be masked as follows:
[char([21 8 4 13 8 0 21 0]+97) '@gmail.com']
But this is trivial and very redundant. I am curious about your concepts on this. Please paste your mask on your (or mine or other real-like one) email address - Lets find out how it can be done in the most clever way.

5 comentarios

Paulo Silva
Paulo Silva el 16 de Feb. de 2011
just leave it in plain text and generate a p-code file
Vieniava
Vieniava el 16 de Feb. de 2011
Paulo, good point; but I thought about anti-spam masking rather than about 'anti-reverse-engineering' method.
Matt Tearle
Matt Tearle el 16 de Feb. de 2011
I don't understand what you're after. What's wrong with your solution for anti-spam purposes? Can you explain your criteria more fully? Thx
Vieniava
Vieniava el 16 de Feb. de 2011
Matt, my solution is to long. I would like to have it as short as possible and also maybe there is the way without direct "char numbering" approach.
Matt Tearle
Matt Tearle el 16 de Feb. de 2011
OK, sorry, I'm being dense, I guess. You can easily use double('foo@bar.com') to get a numeric representation, then char to flip back, so... I'm missing something. Are you looking for a simple encoding (cipher)? Because most anti-spam obscuring just adds stuff into a string (like 'f o o(at)barNOSPAM(dot)com'). But that's just string manipulation. For a cipher approach, you're assuming someone can decipher it (eg char <-> double), and the result isn't human-readable -- is that what you're after?

Iniciar sesión para comentar.

 Respuesta aceptada

Matt Fig
Matt Fig el 16 de Feb. de 2011
I don't quite know what you are after either, even with your response to Matt. If that is too long, I don't know what is shorter except just writing out the email address. How about these:
fliplr('moc.liam@liameym')
char(max(['m)m-i)@0a&l+c/m';'3y/a&l-m/i0.%o-']))
strrep('tytail@tail.cot','t','m')
strrep('tytail@tail.cot',116,109)
char('nznbjmAnbjm/dpn' - 1)

4 comentarios

Andrew Newell
Andrew Newell el 16 de Feb. de 2011
This could be the start of the first Cryptic Matlab Contest!
Vieniava
Vieniava el 16 de Feb. de 2011
'fliplr' solution is really nice
Matt Fig
Matt Fig el 16 de Feb. de 2011
I prefer the last one myself.
Vieniava
Vieniava el 16 de Feb. de 2011
the last one is quasi-Caesar-cipher

Iniciar sesión para comentar.

Más respuestas (4)

Jan
Jan el 16 de Feb. de 2011

1 voto

I'm using a trivial masking by using an uppercase string instead of a - character, e.g. "matlab@nMINUSsimon.de". Although I never got any spam to this address, I decided to insert the current year: "matlab.THISYEAR@nMINUSsimon.de", such that I can change the address each year.
But this is already too complicated for some human readers: I got not a single spam, but about 10 messages (through the "Contact the author" form) from CSSM users per year complaining about a not working address...
Therefore I think, that "[char([21 8 4 13 8 0 21 0]+97) '@gmail.com']" will increase the mail noise instead of reducing it. I assume "REM0VE_TH1S_foo@bar.com" would be more efficient.
Walter Roberson
Walter Roberson el 16 de Feb. de 2011

0 votos

Sounds like you are looking for Kolmogorov Complexity -- the shortest algorithm for producing a given output.
Walter Roberson
Walter Roberson el 17 de Feb. de 2011
char(23+mod(1.332.^'ihRcilh? yoly^UP`0th^',96))
char(23+mod(1.145.^'UL:QL?U?Ppz?Lst Gz',96))
char(22+mod(1.3107.^'8s~+sn,ScPP>%1o8Y%,aq',96))
Encoder:
S='myemail@mail.com';
L=(10001:13354)/10000;for d=0:45;for P=L;[tf,idx]=ismember(S,char(d+mod(P.^(0:127),96)));if sum(tf)==length(S)&all(idx>31 & idx<128);fprintf('char(%d+mod(%0.4f.^''%s'',96))\n',d,P,char(idx-1));return;end;end;end
Note: using 1.0001:.0001:1.3354 does not work because of colon round-off error. The upper bound 1.3354 is the largest 4-decimal-place number such that P^127 <= 2^53
Jan's address with the year was the only one of the group that required the 4 digit base.

Categorías

Más información sobre Characters and Strings en Centro de ayuda y File Exchange.

Preguntada:

el 16 de Feb. de 2011

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by