[QUIZ] Obfuscated Email

_If you want to ignore the introduction and just get to the task, skip down
to the last paragraph._

Ah, yes... I remember the good ol' days of Usenet, when the signal to noise
ratio was high, very high... certainly much higher than the 1-to-100 ratio
that is the curse of many newsgroups today.

Back then we had rules! And etiquette! And people felt compelled to adhere
to such rules, because... well, that was how things were done. For the most
part, we didn't have to deal with the unrestrained spam that now pervades
the Internet net like the lingering smell of boiled cabbage.

Where was I? ..... Oh yes, signatures! We had signatures for our posts and
email, restricted to a narrow space of no more than four lines and no wider
than the terminal. We'd put our names, email, phone... even funny quotes (or
angry, political quotes for those angry, political folks). But it always fit
within four terminal lines: never more.

But nowadays... What sane person would put his email address in his
signature file, out in plain view for spammers to see? It is folly, I say.
Insanity. Lunacy. I would sooner code in BASIC than publicly divulge my
email address to the world.

Now, I hear you say, "So, genius, how do you provide such information if not
in the signature?" Well, you are right to ask and also right to call me a
genius. Pay attention, and I shall reveal to you how such is accomplished
(best viewed in monospaced font):

x = ("swDlw ms > mMm.hh@ttaiog" + ## Matthew D Moss, 888-555-1234
"<.cMmssoottaaee").split(//); z = ## Department of Fine Ruby Studies
[""] * x.size; puts x.map {z = x. ## University of Wherever I Like
zip(z).sort }.last[9].join + "\n" ## "He that runs Ruby, runs well."

Do you see it? You don't, do you? Look again after I run this signature
through the Ruby interpreter:

   Matthew D Moss <matthew.moss@gmail.com>

The silence suggests to me that you are stunned beyond words. I think you
are needing such a challenge...

For your task this week, I ask that you make your own signature such that
displays your email address when run through the Ruby interpreter. The
signature must fit within four lines of no more than 80 characters per line.
(If you still want to avoid outputting an email address, your script may
produce something else: a phone number, a funny quote, vCard, a poem to your
love, whatever...)

Google catches my spam for me.

Pretty interesting idea. The only catch is, anybody can run it through the Ruby interpreter to turn it into a useable readable email address...
that said, here's my super simple obfuscation, enough that a bot not looking for it would probably not know what to do with it:

puts "[]#*$e+w!^^+ob!*so*[]#*$e+@$===#!^.co===".gsub('*','n').gsub('+','r').gsub('!','i').gsub('$','g').gsub('^','l').gsub('#','a').gsub('===','m').gsub('[]','d')

For your task this week, I ask that you make your own signature such that
displays your email address when run through the Ruby interpreter. The
signature must fit within four lines of no more than 80 characters per line.
(If you still want to avoid outputting an email address, your script may
produce something else: a phone number, a funny quote, vCard, a poem to your
love, whatever...)

Here is my solution.
The rule says max 4 lines of 80 characters each.
That's what I have.

w,h,y=" .<>@HKaceghiklmoprstuy",3.14,"A Look into Japanese Ruby List in English"
a,l,l="@5axa@18aXaxxxa@0a@6aa@13a@21a@9axxxaXXa@0a","","http://www.kakueki.com/&quot;
o,f="xa@14aXXXa@19aa@1a@17axxxaXXXa@11a@4a@10a@15a@7a@12axa@1a@8a@16aXXa@3a",255
t,h,i,s="junk in my sig?",9,7 ;print"\n"+y+"\n"+l+"\n"+w.unpack(a+o).join+"\n\n"

Here is my 2nd solution.
It converts a fake address into my address.

a="xa@20a@11aXaxxxxxa@5aa@20aXXXXXa@2a@10axxxxxaXXXa@5a"
b="@0a@15aXXa@8aa@18axxa@2a@8aXXXXXa@12a@3a@13a@20a@14aaxxaa@7axxxxxa@22a"
print"\nA Look into Japanese Ruby List in English\nhttp://www.kakueki.com/"
print"ruby/list.html\n"+"<Hugh Koster@milky.cap>".unpack(a+b).join+"\n\n"

Harry

···

--
A Look into Japanese Ruby List in English

This is my first submission to a quiz, so excuse me if I mess up the process.

My submission tried to include some easily-readable signature info, while having all the “real” Ruby code as obfuscated as possible. The last statement is just for fun. It's also completely monospace (all lines are of equal width). It only seems to work in 1.8, and I haven't had an opportunity to see why it fails in 1.9.

Name = "Mikael Høilund"; Email = Name.gsub %r/\s/,%#=?,# ## My current
*a=e=?=,!???,:??,?,Email.downcase![eval(%["\\%o\\%o"]% ## phone num.
[?**2+?o,?\\*2])]="o";Email.gsub! %%\%c%*3%a, %?%c? % ?@ ## is: 1-800-
def The(s)%%\%s.%%s+%.org\n.end; :Go and print The Email ## STAR-WARS.

I'm sorry about the parenthesizing warning, but it's inevitable while having that last statement.

Is there an upper limit to the amount of submissions a person can make?

Regards
Mikael Høilund

···

On May 16, 2008, at 17:24, Matthew Moss wrote:

For your task this week, I ask that you make your own signature such that
displays your email address when run through the Ruby interpreter. The
signature must fit within four lines of no more than 80 characters per line.
(If you still want to avoid outputting an email address, your script may
produce something else: a phone number, a funny quote, vCard, a poem to your
love, whatever...)

For your task this week, I ask that you make your own signature such that
displays your email address when run through the Ruby interpreter. The
signature must fit within four lines of no more than 80 characters per line.
(If you still want to avoid outputting an email address, your script may
produce something else: a phone number, a funny quote, vCard, a poem to your
love, whatever...)

Here's my solution... (longest line is 78 characters)

## Machines take me by surprise with great frequency. -- Alan Turing
m=Hash[*"z_ymly_xolx_wclw_v.lv_uslu_ttlt_scls_r@lr_qklq_pllp_ollo_niln_mbl".
scan(/(..)(...)/).flatten];t=Hash.new("_");i,s=0,"z";loop{v=m[s+t[i]] or break
s,t[i],d=v.split(//);i+=(d=="r")?1:-1};p t.keys.sort.map{|k|t[k]}.join

As I missed last week's quiz, I decided to combine the two and implement a Turing Machine which would execute a program to
write my email address to the tape, the print the tape contents.

The Turing Machine program looks like this:

# state, character_under_tape_head, new_state, char_to_write, move_left_right
z_yml
y_xol
x_wcl
w_v.l
v_usl
u_ttl
t_scl
s_r@l
r_qkl
q_pll
p_oll
o_nil
n_mbl

A slightly less obfuscated version of the solution follows. (In the
signature, I omitted using temporary variables when reading and writing
the tape head t[i] .)

···

From: "Matthew Moss" <matthew.moss@gmail.com>

##--

m=Hash[*"z_ymly_xolx_wclw_v.lv_uslu_ttlt_scls_r@lr_qklq_pllp_ollo_niln_mbl".scan(/(..)(...)/).flatten]

t=Hash.new("_") # the tape

i=0 # tape index (negative index is OK)

s="z" # current state register

loop {
  c = t[i]
  v = m[s+c] or break
  s,c,d = v.split(//)
  t[i] = c
  i += (d=="r")?1:-1
}

p t.keys.sort.map{|k|t[k]}.join

##--

Regards,

Bill

Interesting,

···

On Fri, May 16, 2008 at 9:24 AM, Matthew Moss <matthew.moss@gmail.com> wrote:

For your task this week, I ask that you make your own signature such
that displays your email address when run through the Ruby
interpreter. The signature must fit within four lines of no more than
80 characters per line.

--
m=("zffx1r9ulq27es9qaejucelut2"+ ######################################
"cwrs5loser6kq5").send"+0-1".tr( # This space available for rent. All
"-1+0","_ito"),0x24;a="";a,m=a<< # 111 characters of it. Inquiries to
m%256,m>>8 while m>0; p a ######## the email address on the left please

Y'know... I debated with myself whether I should have run this quiz.
Not because it wouldn't be fun or interesting, but because I'd
actually have to read the solutions in order to write a reasonable
summary.

I feel Wednesday will be a pain in the brain.

This quiz was a lot of fun. Thanks.

z = (Math.atan(1) * 4).to_s; x = "Suiwjw\"X%Kfpw'EvtfzfwqcnsCmw}tjll/gprG"
0.upto(x.size-1) {|y| x[y] = (x[y] - z[(y+1)%z.size].chr.to_i).chr};puts x

···

_________________________________________________________________
Change the world with e-mail. Join the i’m Initiative from Microsoft.
http://im.live.com/Messenger/IM/Join/Default.aspx?source=EML_WL_ChangeWorld

Here's mine. I avoided unpack and gsub and zip so that I could write
something I can't rely on working in the future.

srand 0; a=if defined?(RUBY_ENGINE);%w(r c y . i g i c r h r .
e t k @ a s r b - o u); elsif RUBY_PLATFORM=='java';%w(r s - t
i r u r k . @ r i c . o h e b c g y a); else; %w(y e t b s i @
. r i r u . o h r c c - k g a r);end;puts a.sort_by{rand}.join

Chris

···

On May 16, 9:24 am, Matthew Moss <matthew.m...@gmail.com> wrote:

[Note: parts of this message were removed to make it a legal post.]

_If you want to ignore the introduction and just get to the task, skip down
to the last paragraph._

Ah, yes... I remember the good ol' days of Usenet, when the signal to noise
ratio was high, very high... certainly much higher than the 1-to-100 ratio
that is the curse of many newsgroups today.

Back then we had rules! And etiquette! And people felt compelled to adhere
to such rules, because... well, that was how things were done. For the most
part, we didn't have to deal with the unrestrained spam that now pervades
the Internet net like the lingering smell of boiled cabbage.

Where was I? ..... Oh yes, signatures! We had signatures for our posts and
email, restricted to a narrow space of no more than four lines and no wider
than the terminal. We'd put our names, email, phone... even funny quotes (or
angry, political quotes for those angry, political folks). But it always fit
within four terminal lines: never more.

But nowadays... What sane person would put his email address in his
signature file, out in plain view for spammers to see? It is folly, I say.
Insanity. Lunacy. I would sooner code in BASIC than publicly divulge my
email address to the world.

Now, I hear you say, "So, genius, how do you provide such information if not
in the signature?" Well, you are right to ask and also right to call me a
genius. Pay attention, and I shall reveal to you how such is accomplished
(best viewed in monospaced font):

x = ("swDlw ms > mMm.hh@ttaiog" + ## Matthew D Moss, 888-555-1234
"<.cMmssoottaaee").split(//); z = ## Department of Fine Ruby Studies
[""] * x.size; puts x.map {z = x. ## University of Wherever I Like
zip(z).sort }.last[9].join + "\n" ## "He that runs Ruby, runs well."

Do you see it? You don't, do you? Look again after I run this signature
through the Ruby interpreter:

   Matthew D Moss <matthew.m...@gmail.com>

The silence suggests to me that you are stunned beyond words. I think you
are needing such a challenge...

For your task this week, I ask that you make your own signature such that
displays your email address when run through the Ruby interpreter. The
signature must fit within four lines of no more than 80 characters per line.
(If you still want to avoid outputting an email address, your script may
produce something else: a phone number, a funny quote, vCard, a poem to your
love, whatever...)

Just thought I'd throw another one out there:

a,b=%Q=Z,O^NPO\r4_PV\\PI\x15^-\x0\v=,email=%\%%%c\%115%%# Mikael Hoilund, CTO
okay=%#;hmm=(0...a.size).map{|i|((a[i]-email[i]+2)%128).# of Meta.io ApS from
chr}.join;!email.gsub!'o',"%c%c"%[3+?0.<<(2),?G.~@];aha=########### Denmark!!
hmm.scan /#{'(.)'*5}/;puts(email[1..-12]+aha.shift.zip(*aha).join)# Ruby rox!

Among the hacks are:

  * The first comment isn't a comment, but a %#...#-style string. It's used as a mask over `a`, by subtracting the sequential characters of the two strings, adding two, and modulo 128'ing.
  * The string `a` is the Caesar-square rotated plain-text email. `b` is a dummy, incidentally assigned the same string as `email`.
  * foo.<<(bar) instead of foo << bar, foo.~@ instead of ~foo
  * It re-uses the `email` string to print the name before the email address, cropping the ", CTO\nokay=".
  * It assumes UTF-8, and replaces the 'o' in `email` with "\303\270" for your viewing pleasure
  * It uses excessive punctuation in the comments to achieve equal line length. So sue me. :frowning:

···

--
Mikael Hoilund, CTO
of Meta.io ApS from
######### Denmark!!

For your task this week, I ask that you make your own signature such that
displays your email address when run through the Ruby interpreter. The
signature must fit within four lines of no more than 80 characters per line.
(If you still want to avoid outputting an email address, your script may
produce something else: a phone number, a funny quote, vCard, a poem to your
love, whatever...)

Is this solution OK?

require 'net/http'
r=Net::HTTP.get_response('www.kakueki.com’,'/ruby/q163.html')
p r.body[/Ha.+sh/].gsub("&lt;","<")+"@gmail.com>"

Harry

···

--
A Look into Japanese Ruby List in English

Mine is at the bottom (2 lines).
Comment:
Same code is used to encode and decode text:

def codeco s, i=0
    s.gsub(/[$-{]/){%$$<<36+($&[0]-?$)*(%q<<Rj~Th>>[(i+=1)%7]-39)%88}
end
# Assert: s == codeco(codeco(s,n),n)

Knowing this, you can easily create your own obfuscated signature,
just encode you text and substitute it in s=q%|..| in signature below,
use the same initial i value for encoding and decoding;

BRs

#!/bin/env ruby
s=%q|7gF99i * v]l5CV <{_Z*lKJ`eW?=4Z']Wb|
i=6;puts s.gsub(/[$-{]/){%$$<<36+($&[0]-?$)*(%q<<Rj~Th>>[(i+=1)%7]-39)%88}

···

----- Original Message ----- From: "Matthew Moss" <matthew.moss@gmail.com>
To: "ruby-talk ML" <ruby-talk@ruby-lang.org>
Sent: Friday, May 16, 2008 11:24 AM
Subject: [QUIZ] Obfuscated Email

..
For your task this week, I ask that you make your own signature such that
displays your email address when run through the Ruby interpreter. The
signature must fit within four lines of no more than 80 characters per line.
(If you still want to avoid outputting an email address, your script may
produce something else: a phone number, a funny quote, vCard, a poem to your
love, whatever...)

I'm bored;

def method_missing(m, a=0) a +
m.to_s[/[a-z]+/].size * 2; end
p What is the meaning of life?

Hi,

This is my solution. I just converted each letter in my email address
into the binary
representation of its ASCII value. The solution just reverts that process:

puts ("01101010011001110110000101100010011100100110100101100101011011000111100"+
"1011001110110000101101100011000010110111001000000011001110110110101100001011"+
"010010110110000101110011000110110111101101101").
scan(/.{8}/).map{|x| x.to_i(2).chr}.join

I planned to compress the string using run-length, but I don't the
time right now.

Jesus.

···

On Fri, May 16, 2008 at 5:24 PM, Matthew Moss <matthew.moss@gmail.com> wrote:

For your task this week, I ask that you make your own signature such that
displays your email address when run through the Ruby interpreter. The
signature must fit within four lines of no more than 80 characters per line.
(If you still want to avoid outputting an email address, your script may
produce something else: a phone number, a funny quote, vCard, a poem to your
love, whatever...)

Hi,

Here is my solution (I know, it's too late, right ?) :

"ERoPHFwYCxUTGyIeHxQLFVwWDRQ=
\n".unpack("m*").shift.unpack("C*").zip(("ruby"*5).unpack("C*")).map{|
a> a[0] ^ a[1] }.pack("C*")

Come

···

On 16 mai, 17:24, Matthew Moss <matthew.m...@gmail.com> wrote:

For your task this week, I ask that you make your own signature such that
displays your email address when run through the Ruby interpreter. The
signature must fit within four lines of no more than 80 characters per line.
(If you still want to avoid outputting an email address, your script may
produce something else: a phone number, a funny quote, vCard, a poem to your
love, whatever...)

I want you guys to know that I have read all fifteen entries... Some
of the code had me confused at times, but with persistence, I managed
to figure out everything that was presented.

Well, *almost* everything. Mikael... I have a headache because of
you. :wink:

Summary coming tomorrow.

Optimism is the root of all evil :wink: and BTW do you really want to keep
them *extra busy*.
This said, Google catches my spam pretty well too and thanks for that !
Robert

···

On Fri, May 16, 2008 at 9:25 PM, DJ Jazzy Linefeed <john.d.perkins@gmail.com> wrote:

Google catches my spam for me.

--
http://ruby-smalltalk.blogspot.com/

---
Whereof one cannot speak, thereof one must be silent.
Ludwig Wittgenstein

True. And it does for me as well.

But that's not the point. The quiz description was exaggeration,
satire even. I thought I had laid it on thick enough to be obvious,
especially considering that (a) security through obscurity is not at
all security, and (b) I just told spammers how to defeat this
technique: run the sig through Ruby.

Honestly, this is more an exercise in creative obfuscation and golfing.

···

On May 16, 2:25 pm, DJ Jazzy Linefeed <john.d.perk...@gmail.com> wrote:

Google catches my spam for me.

Here's mine :slight_smile:

c=0;(a="414112113123211112131141422224212312113141231215".gsub(
/(\d)/){|k| "#{((c+=1)%2)}" * k.to_i }).gsub(Regexp.new("\\d{#{
v="";l=a.size/5}}")){|k|v+=(k+"|"+k.reverse+"\n").gsub("0"," ")
};puts v + "-#{"-"*l*2}" + v.reverse # Spx2 took the red pill

···

On Sun, May 18, 2008 at 4:32 PM, Mikael Høilund <mikael@hoilund.org> wrote:

On May 16, 2008, at 17:24, Matthew Moss wrote:

For your task this week, I ask that you make your own signature such that
displays your email address when run through the Ruby interpreter. The
signature must fit within four lines of no more than 80 characters per
line.
(If you still want to avoid outputting an email address, your script may
produce something else: a phone number, a funny quote, vCard, a poem to
your
love, whatever...)

This is my first submission to a quiz, so excuse me if I mess up the
process.

My submission tried to include some easily-readable signature info, while
having all the "real" Ruby code as obfuscated as possible. The last
statement is just for fun. It's also completely monospace (all lines are of
equal width). It only seems to work in 1.8, and I haven't had an opportunity
to see why it fails in 1.9.

Name = "Mikael Høilund"; Email = Name.gsub %r/\s/,%#=?,# ## My current
*a=e=?=,!???,:??,?,Email.downcase![eval(%["\\%o\\%o"]% ## phone num.
[?**2+?o,?\\*2])]="o";Email.gsub! %%\%c%*3%a, %?%c? % ?@ ## is: 1-800-
def The(s)%%\%s.%%s+%.org\n.end; :Go and print The Email ## STAR-WARS.

I'm sorry about the parenthesizing warning, but it's inevitable while
having that last statement.

Is there an upper limit to the amount of submissions a person can make?

Regards
Mikael Høilund

--
Go outside! The graphics are amazing!