hoodwink.d enhanced
RSS
2.0
XHTML
1.0

RedHanded

Trimming Off the Internet #

by why in inspect

Anyone wondering about MouseHole 2? Rany Keddo has posted some instructions for winding it up. And, along with that, he posts one of the first MouseHole 2 scripts out there.

Whitelist.rb, for using Mr. T to stop you from wandering when you’re working.

 class Whitelist < MouseHole::App
   name "whitelist" 
   namespace "purzelbaumcorp.de" 
   description "fend off the time thieves!" 
   version "0.1" 

   %w{mail.google.com corelib.rubyonrails.org blog.purzelbaumcorp.de}.
   each do |site|
     - url("http://#{site}/*")
   end

   + url("http://*")

   # the pages flow through here
   def rewrite(page)
     page.document.at("html").innerHTML= %{
       <body>
         <div style='text-align: center; margin-top:40px;'>
         <img src='http://www.doyouremember.co.uk/images/mr-t.gif' />
         <div style='font-size:27pt; color:#aaa;'>
           Pity the fool!
         </div></div>
       </body>
     }
   end
 end

If I may interject, the rewrite method could also be written:

  def rewrite(page)
    page.html do
      body do
        div :style => 'text-align: center; margin-top: 40px;' do
          img :src => 'http://www.doyouremember.co.uk/images/mr-t.gif'
          div "Pity the fool!", :style => 'font-size:27pt; color:#aaa;'
        end
      end
    end
  end

Oh, and, if you use this: please consider unblocking RedHanded! It’s not that distracting and it’s super-helpful. Right, guys?

said on 31 Aug 2006 at 13:41

You aint got no time for the jibba-jabba!

said on 31 Aug 2006 at 18:45

Cool! Does Mousehole 2 allow Hoodwink’d? My JS hoodwinking gear has been broke for ages. (Latest version, lest ye ask.)

said on 31 Aug 2006 at 19:02

I don’t see why not. It’s just a script injection really, right?

said on 31 Aug 2006 at 20:14

Well, there’s a bit more than that (some HTML injection too), but basically yeah. Anyway, it’s certainly within Mousehole’s capabilities.

Mousehole-the-classic-version (nee hoodlum) was actually born of a desire to wink without greasy monkeys loitering about.

said on 31 Aug 2006 at 21:18

I’ve just been waiting for things to come together. You know: hpricot had to be born. But it’s about time to wrap things up.

said on 01 Sep 2006 at 01:23

well said why :_) does it mean that Camping 1.5 will be released soon ?

said on 11 Sep 2006 at 14:57

i’m actually just testing mouse hole (1.2) capturing of POSTs.

11 Jul 2010 at 21:25

* do fancy stuff in your comment.

PREVIEW PANE