How to mask an email address using m-code?

10 vues (au cours des 30 derniers jours)
Vieniava
Vieniava le 16 Fév 2011
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 commentaires
Vieniava
Vieniava le 16 Fév 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 le 16 Fév 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?

Connectez-vous pour commenter.

Réponse acceptée

Matt Fig
Matt Fig le 16 Fév 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 commentaires
Matt Fig
Matt Fig le 16 Fév 2011
I prefer the last one myself.
Vieniava
Vieniava le 16 Fév 2011
the last one is quasi-Caesar-cipher

Connectez-vous pour commenter.

Plus de réponses (4)

Jan
Jan le 16 Fév 2011
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.

Sean de Wolski
Sean de Wolski le 16 Fév 2011
  1 commentaire
Vieniava
Vieniava le 16 Fév 2011
'cumsum' is tricky

Connectez-vous pour commenter.


Walter Roberson
Walter Roberson le 16 Fév 2011
Sounds like you are looking for Kolmogorov Complexity -- the shortest algorithm for producing a given output.

Walter Roberson
Walter Roberson le 17 Fév 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.

Catégories

En savoir plus sur Characters and Strings dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by