hoodwink.d enhanced
RSS
2.0
XHTML
1.0

RedHanded

Hoodwink'd, Day Three: Clearness of Vision #

by why in inspect

Onslaught prizes. I will probably be sending free galoshes to the top winkers. (Thanks to faithful winker timb for the delirious pixels!)

said on 24 Aug 2005 at 08:27

In what universe does hoodwink.d exist?

said on 24 Aug 2005 at 08:33

I doesn’t exists in my universe, at least.

said on 24 Aug 2005 at 08:34

Hey _why – any chance you could remove the need to edit /etc/hosts for hoodwink.d? The sysadmins at work don’t allow us proles to edit hosts, so I can only hoodwink from home. :(

said on 24 Aug 2005 at 08:36

Sorry for my lack of imagination there.

cat >>  WINDIR \system32\drivers\etc\hosts
65.125.236.166  hoodwink.d
said on 24 Aug 2005 at 08:40

keith23: nicely ask them to add to their dns.

said on 24 Aug 2005 at 08:58

I’ve the same problem here .. I can add it to my host file (and it works using telnet for example), but it seems that our proxy is doing it’s own resolution :( and thus do not know hoodwink.d :(

said on 24 Aug 2005 at 09:00

Can’t use it in the transparently proxied universe of my ISP :(

said on 24 Aug 2005 at 09:23

hyphens in email addresses are not illegal.

said on 24 Aug 2005 at 09:31

supar sweet.

said on 24 Aug 2005 at 09:35

fixed, thankyou william.

said on 24 Aug 2005 at 09:45

I like this, it is like… very exciting. Secret levels of Super-Mario world.

said on 24 Aug 2005 at 09:59

Hmm, yet another reason for a winker webrick proxy thing. That could be made proxy-friendly in a way that would be harder for greasemonkey.

said on 24 Aug 2005 at 11:14

MenTaL: people in winkerland are asking for you. i can’t get them off my back.

said on 24 Aug 2005 at 15:09

why: I hear them calling. Like faintly buttered toast.

Perhaps… perhaps…

*** MenTaLguY wanders off to study WEBrick::HTTPProxyServer

said on 24 Aug 2005 at 15:19

Hmm, short of tunneling, it looks like we’re actually at the mercy of the outermost proxy’s name resolution. damn.

Eh well. Proxies weren’t the original problem I was attempting to solve anyway. The original goal was simply not requiring GreaseMonkey.

Thankfully, JSON is YAML .

said on 24 Aug 2005 at 17:08

get a real domain name, dammit!

said on 24 Aug 2005 at 17:13

But that wouldn’t be nearly as subversive as the current hosting…

said on 24 Aug 2005 at 21:19

If I may pose a question to these bedraggled and heretofore unwink’d proxiers. Do either of the following work? (Fill-in the constants.)

 # Does the proxy nuke the Host header?
 require 'net/http'
 Net::HTTP.start(WINKD_IP) do |http|
   r = http.get('/', 'Host' => 'hoodwink.d')
   puts r.body
 end

Or try…

 # Does the proxy mangle the URL?
 require 'net/http'
 Net::HTTP.start(WINKD_IP) do |http|
   r = http.get('http://hoodwink.d/')
   puts r.body
 end

You know I will do everything I can to help you. (Except the obvious.)

said on 24 Aug 2005 at 21:42

The solution for me was to leave the proxified work environ and begin my hoodwink’d exploits at the homestead. I weep for those with similar proxy demons at their home pods. For they shall never know Wonderland.

said on 24 Aug 2005 at 21:49

Oh, um, and Net::HTTP.start won’t work like that. Instead, do:

 require 'net/http'
 require 'uri'

 proxy_host = 'your.proxy.host'
 proxy_port = 8080
 uri = URI.parse(ENV['http_proxy'])
 proxy_user, proxy_pass = uri.userinfo.
   split(/:/) if uri.userinfo
 Net::HTTP::Proxy(proxy_host, proxy_port,
                  proxy_user, proxy_pass).
 start(WINKD_IP) do |http|
   r = http.get('/', 'Host' => 'hoodwink.d')
   puts r.body
 end

Modify per your login and environment settings. You may need to force the proxy_* vars.

said on 24 Aug 2005 at 23:41

two rss feeds on onslaught.

said on 25 Aug 2005 at 01:03

my (transparent) proxy seems to mangle both URL and Host … and I do not have any idea of my proxy IP .. I’m going to dig ;) Thanks :)

said on 25 Aug 2005 at 01:34

ok…i got the login and the userscipt installed….wtf next???

said on 25 Aug 2005 at 05:51

brwnx: go to one of the hoodwink’d page and click on the hoodwink to add your comments ;)

said on 25 Aug 2005 at 10:18

i dont see any hoodwink.d…is it supposed to be on the page (eg boingbong.net) or do i have to add the different “javascleept”s as bookmarks or wtf??? feeling like a jerk here…

said on 25 Aug 2005 at 10:39

wink.rb:11: uninitialized constant WINKD _IP (NameError)

said on 25 Aug 2005 at 10:48

Okay, so this Ruby script spits out a nice little HTML file. What does it have to do with Greasemonkey? GM doesn’t suddenly spring to life or anything when I look at the page.

How about removing the requirement that the GET request include hoodwink.d in a Host header? You could ditch that silly lime green page and go right to the real thing, and spare all of us poor proxy victims having to guess at what this thing does.

Would it really make it any less cool for someone just to write a simple explanation of the whole winky thing?

said on 25 Aug 2005 at 11:54

hoodwinkd on freenode. :-)

said on 25 Aug 2005 at 13:06

Definitively unusable from my work :( My sysadmins just called me: they were unhappy because I was playing with the proxy :( I’d really like to hoodwink’d them all :)

said on 25 Aug 2005 at 14:07

else: sorry the first rule of the Hoodwink’d Club is that you DON ’T talk about the Hoodwink’d Club.

Hehehe, sorry, the old Fight Club rules thing is probably a cliche by now.

Basically hoodwink’d is a server (written in Ruby I assume) that takes requests consisting of URLs and a few commands (hint, hint, look at the hoodwink.d index page) that return JSON content which is put to use by a Greasemonkey user script to insert commentary on arbitrary web pages. Woo, I thinked I pretty much summed it up in one (long-winded) sentence.

Once you get the DNS setting working, get an account, then install Greasemonkey and your customized user script (which embeds some login information), you will finally be “in the club.”

Then you just need to go to here to see a nice list of hoodwink’d pages.

Simple as that…and brilliant as that. _why rocks!

It is just too bad it requires so much JavaScript hackery and the potential security risk Greasemonkey to work. This is why others have suggested WebBrick proxies and the like in the first Hoodwink’d post, so we can have our winks and be in pure-Ruby-land.

said on 25 Aug 2005 at 19:22

This taste like burning

said on 25 Aug 2005 at 22:28

So how badly do we want a Ruby-flavored Greasemonkey replacement? Because I’m writing a prototype for one now…

If anyone has suggestions, speak now or forever hold your peace (OK, maybe not forever, I imagine I could take feedback after the prototype hits the world.)

My main concern is missing some annoying little HTTP thang when doing the proxification. I did a Google search for Ruby proxies and found RPP, but the project seems long dead. If anyone knows of anything useful in this area, please post.

said on 26 Aug 2005 at 02:32

i cant get it to work…

on mac or winxp…must be some firewall crap???

said on 26 Aug 2005 at 07:57

When you’re using it, it’s as if you’re invisible and can communicate with other, invisible and intangible people that are there but normal people cannot see.

Sometimes I see dead people

Weird.

said on 26 Aug 2005 at 09:15

MrCode: I’ve actually got a prototype of a webrick-based proxy thing that basically patches the greasemonkey script to work without greasemonkey, and then injects it into the HTML pages as they go by.

The big remaining problem is that I’ve got to rewrite the hoodwink.d request URLs to look like they’re going to the origin server rather than hoodwink.d. Currently stuck on rewriting the request objects on the webrick end.

Shall I post someplace?

said on 26 Aug 2005 at 09:19

so, it’s some statler and waldorf commentary thing?

said on 26 Aug 2005 at 10:19

MenTaL: Sure, go ahead and post it. I might still keep working on mine, then we can compare notes. Part of my proof-of-concept would of course involve totally replacing the Hoodwink’d Greasemonkey script like you are talking about, but to start of I’ll probably just have a simple URL rewriting example or some such.

Have you looked at the Ruby JSON parsing library yet? I thought it had a bit of a strange interface, but I think we will need it for the Hoodwink’d Greasemonkey replacement. Unless of course _why switches to YAML :)

I also have some clever ideas for how to load the scripts and support automatic reloading. I somehow suspect yours will support similar, so again we can compare notes.

Once we have played with these a bit we can see about combining and then slap something on RubyForge :)

What do you say?

said on 26 Aug 2005 at 10:48

MrCode: JSON happens to be a subset of YAML syntax; you can parse it with YAML .rb

n.b. My approach doesn’t replace the greasemonkey script at all—it just rewrites it very slightly and injects it directly into HTML passing through the proxy, obviating the need for greasemonkey.

why’s actually looking over my script right now, so I think I’ll let him post his version when he’s ready. Mine falls ever-so-short of actually working.

said on 26 Aug 2005 at 11:20

MrCode: OHhh.. incidentally. WEBrick has a proxy built in! I didn’t have to write anything extra. Check out WEBrick::HTTProxyServer, available via require 'webrick/httpproxy' ...

said on 26 Aug 2005 at 11:50

MenTaL: Oh that is awesome. How I failed to see that when browing the WEBrick code is beyond me. But thankfully I’ve been busy hacking the code for loading and running scripts, so I haven’t wasted much time.

Thanks for the info.

Comments are closed for this entry.