How to mask an email address using m-code?

3 ビュー (過去 30 日間)
Vieniava
Vieniava 2011 年 2 月 16 日
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 件のコメント
Vieniava
Vieniava 2011 年 2 月 16 日
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 2011 年 2 月 16 日
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?

サインインしてコメントする。

採用された回答

Matt Fig
Matt Fig 2011 年 2 月 16 日
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 件のコメント
Matt Fig
Matt Fig 2011 年 2 月 16 日
I prefer the last one myself.
Vieniava
Vieniava 2011 年 2 月 16 日
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.

Sean de Wolski
Sean de Wolski 2011 年 2 月 16 日
  1 件のコメント
Vieniava
Vieniava 2011 年 2 月 16 日
'cumsum' is tricky

サインインしてコメントする。


Walter Roberson
Walter Roberson 2011 年 2 月 16 日
Sounds like you are looking for Kolmogorov Complexity -- the shortest algorithm for producing a given output.

Walter Roberson
Walter Roberson 2011 年 2 月 17 日
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.

カテゴリ

Help Center および File ExchangeGraph and Network Algorithms についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by