Web Images Videos Maps News Shopping Gmail more »
Recently Visited Groups | Help | Sign in
Google Groups Home
urirequire: I got yer Web 2.0 right here
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  Messages 1 - 25 of 26 - Collapse all  -  Translate all to Translated (View all originals)   Newer >
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Francis Hwang  
View profile  
 More options Nov 1 2005, 10:17 pm
Newsgroups: comp.lang.ruby
From: "Francis Hwang" <s...@fhwang.net>
Date: 1 Nov 2005 19:17:23 -0800
Local: Tues, Nov 1 2005 10:17 pm
Subject: [ANN] urirequire: I got yer Web 2.0 right here
Fellow Rubyists! How many times have you thought to yourself: "If only
there was a more elegant way to download and execute code from all over
the internets!" Well, urirequire is the lib for you. By hijacking
Kernel.require, urirequire makes it a snap to include code from
anywhere on the World Wide Whatever. Sure, eval'ing code that you don't
own might be dangerous; for all you know, that remote Ruby file could
be undefining Class or emailing your ex-girlfriends. But I say it's
time to get with the bleeding edge! Control of your own code is so
February 2005.

http://rubyforge.org/projects/urirequire/

== EXAMPLE 1: THE ABSURDLY RISKY 'HELLO WORLD' ==

require 'urirequire'
require 'http://fhwang.net/urirequire_test'

Run this, if you feel lucky. Do ya, punk?

== EXAMPLE 2: INSTALL HOBIX IN SEVEN LESS KEYSTROKES ==

ruby -rurirequire -e "require 'http://go.hobix.com/'"

This installs Hobix, that fantabulous blahhg engine by your friend and
mine, why the lucky stiff. Sure, it looks like there's a lot of code at
that URI, but if you can't trust _why, who can you trust? I mean, you
trust your mom, and she couldn't draw a cartoon fox if her life
depended on it.

== TAGLINES WHICH WILL PROBABLY MAKE NOBODY DOWNLOAD MY LIB BUT I THINK
ARE FUNNY ANYWAY ==

urirequire: The network Pwns the computer!

urirequire: Now I'll never get that job working for Bruce Schneier.

urirequire: It's not just a solution looking for a problem. It's a
solution looking for a victim.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
James Edward Gray II  
View profile  
 More options Nov 1 2005, 10:30 pm
Newsgroups: comp.lang.ruby
From: James Edward Gray II <ja...@grayproductions.net>
Date: Wed, 2 Nov 2005 12:30:01 +0900
Local: Tues, Nov 1 2005 10:30 pm
Subject: Re: [ANN] urirequire: I got yer Web 2.0 right here
On Nov 1, 2005, at 9:22 PM, Francis Hwang wrote:

> urirequire: It's not just a solution looking for a problem. It's a
> solution looking for a victim.

That's so damn classy.  Makes me want to download it right now!

James Edward Gray II


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Gregory Brown  
View profile  
 More options Nov 1 2005, 10:43 pm
Newsgroups: comp.lang.ruby
From: Gregory Brown <gregory.t.br...@gmail.com>
Date: Wed, 2 Nov 2005 12:43:21 +0900
Local: Tues, Nov 1 2005 10:43 pm
Subject: Re: [ANN] urirequire: I got yer Web 2.0 right here
On 11/1/05, Francis Hwang <s...@fhwang.net> wrote:

> urirequire: It's not just a solution looking for a problem. It's a
> solution looking for a victim.

Francis, you are my hero.

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Wayne Vucenic  
View profile  
 More options Nov 1 2005, 11:08 pm
Newsgroups: comp.lang.ruby
From: Wayne Vucenic <nightpho...@gmail.com>
Date: Wed, 2 Nov 2005 13:08:17 +0900
Local: Tues, Nov 1 2005 11:08 pm
Subject: Re: [ANN] urirequire: I got yer Web 2.0 right here
Hi Francis,

On 11/1/05, Francis Hwang <s...@fhwang.net> wrote:

> Fellow Rubyists! How many times have you thought to yourself: "If only
> there was a more elegant way to download and execute code from all over
> the internets!"

urirequire is really nice!!!   Thanks!

Wayne


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jeff Wood  
View profile  
 More options Nov 1 2005, 11:33 pm
Newsgroups: comp.lang.ruby
From: Jeff Wood <jeff.darkli...@gmail.com>
Date: Wed, 2 Nov 2005 13:33:07 +0900
Local: Tues, Nov 1 2005 11:33 pm
Subject: Re: [ANN] urirequire: I got yer Web 2.0 right here

lib ???

shouldn't that be like 4 lines???

def net_eval( url )
require 'open-uri'
eval open( url ).readlines.join
end

???!??!?!? ( or something similar to that ) ... and yeah, it takes real guts
to run code you don't own.

BTW, your test URL ... is 404.

j.

On 11/1/05, Wayne Vucenic <nightpho...@gmail.com> wrote:

> Hi Francis,

> On 11/1/05, Francis Hwang <s...@fhwang.net> wrote:
> > Fellow Rubyists! How many times have you thought to yourself: "If only
> > there was a more elegant way to download and execute code from all over
> > the internets!"

> urirequire is really nice!!! Thanks!

> Wayne

--
"http://ruby-lang.org -- do you ruby?"

Jeff Wood


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Daniel Sheppard  
View profile  
 More options Nov 1 2005, 11:35 pm
Newsgroups: comp.lang.ruby
From: "Daniel Sheppard" <dani...@pronto.com.au>
Date: Wed, 2 Nov 2005 13:35:13 +0900
Local: Tues, Nov 1 2005 11:35 pm
Subject: Re: [ANN] urirequire: I got yer Web 2.0 right here
Could security be as easy as:

require 'urirequire'
uri_require
'http://fhwang.net/urirequire_test','SHA1:413ABF4Dxxxxxxxxxxx'

go to the internet, grab that code, trust it only if it's the same as
when I said to get it.

Gems - fah! For suckers. Just send me that .rb file, chock full of
uri's, and be done with it.

########################################################################### ##########
This email has been scanned by MailMarshal, an email content filter.
########################################################################### ##########

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Francis Hwang  
View profile  
 More options Nov 1 2005, 11:43 pm
Newsgroups: comp.lang.ruby
From: "Francis Hwang" <s...@fhwang.net>
Date: 1 Nov 2005 20:43:28 -0800
Local: Tues, Nov 1 2005 11:43 pm
Subject: Re: urirequire: I got yer Web 2.0 right here

Jeff Wood wrote:
> lib ???

> shouldn't that be like 4 lines???

> def net_eval( url )
> require 'open-uri'
> eval open( url ).readlines.join
> end

Yeah, something like that. Actually right now urirequire clocks in at
23 lines, because of certain edge cases, and the fact that it uses
Kernel.require, not a new method. Of course, the utility and elegance
of such an override is quite debatable.

At any rate, it's definitely quite small. Sometimes I package small
seeds of functionality into libs, because Rubygems makes managing tiny
libs easy, and because copy-and-paste makes the baby Jesus cry.

> ???!??!?!? ( or something similar to that ) ... and yeah, it takes real guts
> to run code you don't own.

> BTW, your test URL ... is 404.

Remember that when you require open-uri the file isn't actually
"open-uri" -- it usually ends with an ".rb". Apply this analogously to
a URI, and you'll get around that little 404 hurdle.

f.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Gavin Kistner  
View profile  
 More options Nov 1 2005, 11:58 pm
Newsgroups: comp.lang.ruby
From: Gavin Kistner <ga...@refinery.com>
Date: Wed, 2 Nov 2005 13:58:22 +0900
Local: Tues, Nov 1 2005 11:58 pm
Subject: Re: [ANN] urirequire: I got yer Web 2.0 right here
On Nov 1, 2005, at 8:22 PM, Francis Hwang wrote:

> == TAGLINES WHICH WILL PROBABLY MAKE NOBODY DOWNLOAD MY LIB BUT I  
> THINK
> ARE FUNNY ANYWAY ==

> urirequire: The network Pwns the computer!

> urirequire: Now I'll never get that job working for Bruce Schneier.

> urirequire: It's not just a solution looking for a problem. It's a
> solution looking for a victim.

ROFL. You made me wake up my wife with my giggling. :D

No more laptop ruby-talk for me :)


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Daniel Sheppard  
View profile  
 More options Nov 2 2005, 12:33 am
Newsgroups: comp.lang.ruby
From: "Daniel Sheppard" <dani...@pronto.com.au>
Date: Wed, 2 Nov 2005 14:33:31 +0900
Local: Wed, Nov 2 2005 12:33 am
Subject: Re: [ANN] urirequire: I got yer Web 2.0 right here
This'll make uri_require a nice safe place to live.... sort of.

require 'open-uri'

module UriRequire
        Version = '0.1.1'

        @@orig_require = Kernel.method :require

        def self.orig_require; @@orig_require; end
end

def require( library_name )
        if library_name =~ /^(http|https|ftp):\/\//
            uri_require( library_name )
        else
          UriRequire.orig_require.call library_name
        end
end

def uri_require( library_name, expected_digest )
        begin
                contents = open( library_name ) do |f| f.gets( nil );
end
        rescue OpenURI::HTTPError
                library_name += '.rb'
                contents = open( library_name ) do |f| f.gets( nil );
end
        end
        require 'digest/sha1'
        digest = Digest::SHA1.hexdigest('xx')
        if expected_digest
           raise "Wrong Hash - Expected '#{expected_digest}', recieved
'#{digest}'"
        else
           warn "Requiring a uri without a hash? Are you freakin'
crazy?"
           warn "The hash is '#{digest}' for '#{library_name}'"
        end
        eval contents
end

########################################################################### ##########
This email has been scanned by MailMarshal, an email content filter.
########################################################################### ##########


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Francis Hwang  
View profile  
 More options Nov 2 2005, 12:41 am
Newsgroups: comp.lang.ruby
From: "Francis Hwang" <s...@fhwang.net>
Date: 1 Nov 2005 21:41:19 -0800
Local: Wed, Nov 2 2005 12:41 am
Subject: Re: urirequire: I got yer Web 2.0 right here
Cool! Thanks so much for this. I'll definitely fold this into the next
release.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Daniel Sheppard  
View profile  
 More options Nov 2 2005, 12:53 am
Newsgroups: comp.lang.ruby
From: "Daniel Sheppard" <dani...@pronto.com.au>
Date: Wed, 2 Nov 2005 14:53:24 +0900
Local: Wed, Nov 2 2005 12:53 am
Subject: Re: [ANN] urirequire: I got yer Web 2.0 right here
>    if expected_digest
>       raise "Wrong Hash - Expected '#{expected_digest}', recieved

'#{digest}'"

what sort of drugs am I on? Seemingly not the good ones.

if expected_digest
        raise "Wrong Hash - Expected '#{expected_digest}', received
'#{digest}'" unless digest == expected_digest

I actually think this has the potential of being a damn useful library.
Once you put in the hashing, I don't see why this is any more dangerous
than a gem. The only problem is that you'd need to modify your code to
upgrade to a newer version of a library, but there's not too much wrong
with that. If you're hashing the code, it's not allowed to be modified,
so you can keep a local cache of files and only download once.

Or, if you're just doing it with somewhere you can trust, you can just
use it within your own scripts and let them download the latest version
from a constantly-changing source.

########################################################################### ##########
This email has been scanned by MailMarshal, an email content filter.
########################################################################### ##########


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
James Britt  
View profile  
 More options Nov 2 2005, 12:54 am
Newsgroups: comp.lang.ruby
From: James Britt <jame...@neurogami.com>
Date: Wed, 2 Nov 2005 14:54:47 +0900
Local: Wed, Nov 2 2005 12:54 am
Subject: Re: [ANN] urirequire: I got yer Web 2.0 right here

Jeff Wood wrote:
> lib ???

> shouldn't that be like 4 lines???

> def net_eval( url )
> require 'open-uri'
> eval open( url ).readlines.join
> end

Here's a quick variation:

require 'open-uri'
def require( resource )
   begin
     super
   rescue LoadError
     $:.each do |lp|
       if lp =~ /http:\/\//i
         begin
           s = open( "#{lp}/#{resource}" ) { |f| f.read}
           eval s
           return
         rescue; end
       end
     end
     raise LoadError.new( "Cannot find '#{resource}'")
   end
end

# Now you can add select Web sites to the load path
$:.unshift 'http://trust.me/no/really/this/is/safe'

Mix in MouseHole for more fun.

James

--

http://www.ruby-doc.org - The Ruby Documentation Site
http://www.rubyxml.com  - News, Articles, and Listings for Ruby & XML
http://www.rubystuff.com - The Ruby Store for Ruby Stuff
http://www.jamesbritt.com  - Playing with Better Toys


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kev Jackson  
View profile  
 More options Nov 2 2005, 1:04 am
Newsgroups: comp.lang.ruby
From: Kev Jackson <kevin.jack...@it.fts-vn.com>
Date: Wed, 2 Nov 2005 15:04:56 +0900
Local: Wed, Nov 2 2005 1:04 am
Subject: Re: [ANN] urirequire: I got yer Web 2.0 right here

If you could adapt it so that it'll accept svn:// (or https I suppose),
then you could even use it to keep libraries updated from a svn repo -
which would be rather nice

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jeff Wood  
View profile  
 More options Nov 2 2005, 2:25 am
Newsgroups: comp.lang.ruby
From: Jeff Wood <jeff.darkli...@gmail.com>
Date: Wed, 2 Nov 2005 16:25:56 +0900
Local: Wed, Nov 2 2005 2:25 am
Subject: Re: [ANN] urirequire: I got yer Web 2.0 right here

actually, we need to write a ruby-based version control system. that would
be l33t ... just like urirequire ;)
 j.

 On 11/1/05, Kev Jackson <kevin.jack...@it.fts-vn.com> wrote:

--
"http://ruby-lang.org -- do you ruby?"

Jeff Wood


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Gregory Brown  
View profile  
 More options Nov 2 2005, 2:39 am
Newsgroups: comp.lang.ruby
From: Gregory Brown <gregory.t.br...@gmail.com>
Date: Wed, 2 Nov 2005 16:39:53 +0900
Local: Wed, Nov 2 2005 2:39 am
Subject: Re: [ANN] urirequire: I got yer Web 2.0 right here
On 11/2/05, Jeff Wood <jeff.darkli...@gmail.com> wrote:

> actually, we need to write a ruby-based version control system. that would
> be l33t ... just like urirequire ;)

Hmm... I like that idea a lot.  What would you put into a ruby based
RCS that isn't already in SVN?

One neat thing I could see would be integration of a ruby based RCS
with rake, so you can just do rake update or something of the like.

Also... plugging in little ruby scripts to munge the repository in
various ways would be awesome :)


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kroeger, Simon (ext)  
View profile  
 More options Nov 2 2005, 4:33 am
Newsgroups: comp.lang.ruby
From: "Kroeger, Simon (ext)" <simon.kroeger....@siemens.com>
Date: Wed, 2 Nov 2005 18:33:48 +0900
Local: Wed, Nov 2 2005 4:33 am
Subject: Re: [ANN] urirequire: I got yer Web 2.0 right here

> From: Jeff Wood [mailto:jeff.darkli...@gmail.com]

> lib ???

> shouldn't that be like 4 lines???
> [...]

> BTW, your test URL ... is 404.

> j.

You found the/one answer to your own question, look at:

http://fhwang.net/urirequire_test.rb

cheers

Simon


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Edgardo Hames  
View profile  
 More options Nov 2 2005, 9:15 am
Newsgroups: comp.lang.ruby
From: Edgardo Hames <eha...@gmail.com>
Date: Wed, 2 Nov 2005 23:15:42 +0900
Local: Wed, Nov 2 2005 9:15 am
Subject: Re: [ANN] urirequire: I got yer Web 2.0 right here
On 11/2/05, Jeff Wood <jeff.darkli...@gmail.com> wrote:

> actually, we need to write a ruby-based version control system. that would
> be l33t ... just like urirequire ;)
>  j.

>  On 11/1/05, Kev Jackson <kevin.jack...@it.fts-vn.com> wrote:

> > If you could adapt it so that it'll accept svn:// (or https I suppose),
> > then you could even use it to keep libraries updated from a svn repo -
> > which would be rather nice

I would say, we need some sort of "ioslaves" like KDE's. Then,
accessing a different location/protocol would be transparent for
applications.

My AR$ 0.02
Ed

--
Encontrá a "Tu psicópata favorito" http://tuxmaniac.blogspot.com

Thou shalt study thy libraries and strive not to reinvent them without cause,
that thy code may be short and readable and thy days pleasant and productive.
-- Seventh commandment for C programmers


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Adam Sanderson  
View profile  
 More options Nov 2 2005, 12:53 pm
Newsgroups: comp.lang.ruby
From: "Adam Sanderson" <netgh...@gmail.com>
Date: 2 Nov 2005 09:53:55 -0800
Local: Wed, Nov 2 2005 12:53 pm
Subject: Re: urirequire: I got yer Web 2.0 right here
Doesn't putting the hash in kind of defeat the purpose?  If you know
exactly what the file should look like, you've probably downloaded it
already... and now it's local.

Regardless, ruby is fun.
  .adam sanderson


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Christian Neukirchen  
View profile  
 More options Nov 2 2005, 1:15 pm
Newsgroups: comp.lang.ruby
From: Christian Neukirchen <chneukirc...@gmail.com>
Date: Thu, 3 Nov 2005 03:15:06 +0900
Local: Wed, Nov 2 2005 1:15 pm
Subject: Re: [ANN] urirequire: I got yer Web 2.0 right here

"Daniel Sheppard" <dani...@pronto.com.au> writes:
>>        if expected_digest
>>           raise "Wrong Hash - Expected '#{expected_digest}', recieved
> '#{digest}'"

> what sort of drugs am I on? Seemingly not the good ones.

Been wondering about that too...

>    require 'digest/sha1'
>    digest = Digest::SHA1.hexdigest('xx')

Always the same hash... ;-P
--
Christian Neukirchen  <chneukirc...@gmail.com>  http://chneukirchen.org

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
James Britt  
View profile  
 More options Nov 2 2005, 1:20 pm
Newsgroups: comp.lang.ruby
From: James Britt <jame...@neurogami.com>
Date: Thu, 3 Nov 2005 03:20:12 +0900
Local: Wed, Nov 2 2005 1:20 pm
Subject: Re: [ANN] urirequire: I got yer Web 2.0 right here

Christian Neukirchen wrote:
> "Daniel Sheppard" <dani...@pronto.com.au> writes:

> ...

>>what sort of drugs am I on? Seemingly not the good ones.

> Been wondering about that too...

> ...

> Always the same hash... ;-P

That's the problem. Need better hash.

James

--

http://www.ruby-doc.org - The Ruby Documentation Site
http://www.rubyxml.com  - News, Articles, and Listings for Ruby & XML
http://www.rubystuff.com - The Ruby Store for Ruby Stuff
http://www.jamesbritt.com  - Playing with Better Toys


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Edward Faulkner  
View profile  
 More options Nov 2 2005, 1:31 pm
Newsgroups: comp.lang.ruby
From: Edward Faulkner <e...@alum.mit.edu>
Date: Thu, 3 Nov 2005 03:31:15 +0900
Local: Wed, Nov 2 2005 1:31 pm
Subject: Re: urirequire: I got yer Web 2.0 right here

On Thu, Nov 03, 2005 at 02:57:08AM +0900, Adam Sanderson wrote:
> Doesn't putting the hash in kind of defeat the purpose?  If you know
> exactly what the file should look like, you've probably downloaded it
> already... and now it's local.

Yes.  But you could salvage the situation with PKI.  So you'd specify
a public key to trust, perhaps by fingerprint:

require 'http://foo', 'A5EA B010 448C D0B9 FD2A  287C 9E15 33D7 5A7D 3120'

And require would fail unless the code is properly signed.

-Ed

  signature.asc
< 1K Download

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Adam Sanderson  
View profile  
 More options Nov 2 2005, 1:49 pm
Newsgroups: comp.lang.ruby
From: "Adam Sanderson" <netgh...@gmail.com>
Date: 2 Nov 2005 10:49:34 -0800
Local: Wed, Nov 2 2005 1:49 pm
Subject: Re: urirequire: I got yer Web 2.0 right here
I was looking at the open-uri code, and I think it is pretty easy to
expand.  Well... maybe not easy, but it's doable.

Create a new URI Scheme class (example uri/ftp.rb) and add it to the
URI schemes defined in the URI module (defined in uri/common.rb).
Ensure that the URI defines direct_open(...)  (see open-uri.rb) and
include open-uri's OpenRead module.

It would be conceivable to implement open-uri suppot for SSH for
example with the net-ssh library.

Anyways it's a thought, and that's all the spots to look in.
  .adam sanderson


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rob Rypka  
View profile  
 More options Nov 2 2005, 4:44 pm
Newsgroups: comp.lang.ruby
From: Rob Rypka <rascal1...@gmail.com>
Date: Thu, 3 Nov 2005 06:44:07 +0900
Local: Wed, Nov 2 2005 4:44 pm
Subject: Re: [ANN] urirequire: I got yer Web 2.0 right here
On 11/1/05, Daniel Sheppard <dani...@pronto.com.au> wrote:

> >       if expected_digest
> >          raise "Wrong Hash - Expected '#{expected_digest}', recieved
> '#{digest}'"

> what sort of drugs am I on? Seemingly not the good ones.

I'm just guessing, but you were probably smoking hash, albeit the wrong hash.

--
Rob


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
dave.b...@gmail.com  
View profile  
 More options Nov 3 2005, 9:41 pm
Newsgroups: comp.lang.ruby
From: dave.b...@gmail.com
Date: 3 Nov 2005 18:41:56 -0800
Local: Thurs, Nov 3 2005 9:41 pm
Subject: Re: urirequire: I got yer Web 2.0 right here

Jeff wrote:
> shouldn't that be like 4 lines???

> def net_eval( url )
> require 'open-uri'
> eval open( url ).readlines.join
> end

A haiku's only 3:

def ur(url) require \
'open-uri'; eval (
open(url).read) end

* "url" is pronounced like "earl"
* proc = people's republic of china = autumn

Cheers,
Dave


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Steven Arnold  
View profile  
 More options Nov 5 2005, 10:18 am
Newsgroups: comp.lang.ruby
From: Steven Arnold <stev...@neosynapse.net>
Date: Sun, 6 Nov 2005 00:18:43 +0900
Local: Sat, Nov 5 2005 10:18 am
Subject: Re: [ANN] urirequire: I got yer Web 2.0 right here

On Nov 1, 2005, at 11:35 PM, Daniel Sheppard wrote:

> Could security be as easy as:

> require 'urirequire'
> uri_require
> 'http://fhwang.net/urirequire_test','SHA1:413ABF4Dxxxxxxxxxxx'

> go to the internet, grab that code, trust it only if it's the same as
> when I said to get it.

Probably would be better if I could merely check that it was signed  
by someone I trust.  Heeey.....this is sounding suspiciously like  
Active-X.

steve


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Messages 1 - 25 of 26   Newer >
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google