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 个评论

just leave it in plain text and generate a p-code file
Paulo, good point; but I thought about anti-spam masking rather than about 'anti-reverse-engineering' method.
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
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.
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?

请先登录,再进行评论。

 采纳的回答

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 个评论

This could be the start of the first Cryptic Matlab Contest!
'fliplr' solution is really nice
I prefer the last one myself.
the last one is quasi-Caesar-cipher

请先登录,再进行评论。

更多回答(4 个)

Jan
Jan 2011-2-16
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.
Sounds like you are looking for Kolmogorov Complexity -- the shortest algorithm for producing a given output.
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.

类别

帮助中心File Exchange 中查找有关 Characters and Strings 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by