OpenSSL: patch

Hi,

At Wed, 16 Jun 2004 03:44:02 +0900,
Hal Fulton wrote in [ruby-talk:103709]:

> http://jarp.jin.gr.jp/ruby/jarh.rb
>

Very entertaining! Are all these yours?

Almostly written by eban.

···

--
Nobu Nakada

gabriele renzi wrote:

il Mon, 14 Jun 2004 12:37:43 +0900, Jamis Buck <jgb3@email.byu.edu> ha
scritto::

Also, I'm kind of lost as to how to write test cases for something like this. It's hard to (for instance) force the server to send something unexpected without writing your own server... :frowning: Any tips?

weite your own server too? :))

Ha ha. :slight_smile: Yah, just let me whip out an SSH server while I'm at it. :wink:

Although, I have been tinkering with that idea. You could probably do some fun stuff if you had a Net::SSH::Server module for Ruby, to go with the Net::SSH client. I think, for now, that I'll work on solidifying the client, though.

···

--
Jamis Buck
jgb3@email.byu.edu
http://www.jamisbuck.org/jamis

ruby -h | ruby -e 'a=;readlines.join.scan(/-(.)\[e|Kk(\S*)|le.l(..)e|#!(\S*)/) {|r| a << r.compact.first };puts "\n>#{a.join(%q/ /)}<\n\n"'

Gennady wrote:

  str = "aa tut Rnrehoec Jykusbrh"; srand 0; 0.upto(999) {|i|
  x = rand(23); str[x,2] = str[x,2].reverse! }; puts str

Hal

Hmm, I wonder why it does not work in Ruby 1.6.8, it prints

R etJrbrhnotc uhaaku esy

Is it because rand() differs so much in 1.8?

Yes, there was a change in the PRNG.

We discovered that when I first posted this -- you can search the
archives for "Rnrehoec". :slight_smile:

Hal

I managed to make it even more opfuscated

('J t '<<'rabrotehuensk Rhaucy'.reverse).scan(/#{'(.)'*6}/).transpose.join
#=> "Just another Ruby hacker"

BTW: what does 'rabrotehuensk Rhaucy' mean ?

···

On Tuesday 15 June 2004 21:19, Simon Strandgaard wrote:

I have just made my first signature

"J t ycuahR ksneuhetorbar".scan(/#{'(.)'*6}/).transpose.join
#=> "Just another Ruby hacker"

You are also welcome to add that sig too.. :wink:

--
Simon Strandgaard

Hal Fulton wrote:

Gennady wrote:

  str = "aa tut Rnrehoec Jykusbrh"; srand 0; 0.upto(999) {|i|
  x = rand(23); str[x,2] = str[x,2].reverse! }; puts str

Hal

Hmm, I wonder why it does not work in Ruby 1.6.8, it prints

R etJrbrhnotc uhaaku esy

Is it because rand() differs so much in 1.8?

Yes, there was a change in the PRNG.

We discovered that when I first posted this -- you can search the
archives for "Rnrehoec". :slight_smile:

Hal

Thank you, I found it.
Gennady.