New to RedHanded? About our sections.
Archive
- December 2004
- January 2005
- February 2005
- March 2005
- April 2005
- May 2005
- June 2005
- July 2005
- August 2005
- September 2005
- October 2005
- November 2005
- December 2005
- January 2006
- February 2006
- March 2006
- April 2006
- May 2006
- June 2006
- July 2006
- August 2006
- September 2006
- October 2006
- November 2006
- December 2006
- January 2007
- February 2007
- March 2007
- April 2007
- May 2007
Get your copy of Programming Ruby!
Links
@technorati@del.icio.us
@flickr
@artima
@caboo
@oreilly
ruby
-> docs
-> wares
-> wiki
-> forum
-> quizzes
-> planet
-> irc
rubyweeklynews
rails
-> wiki
-> planet
-> irc
%anarchaia
%projectionist
~audreyt
~black
~britt
~buck
~copeland
~fernandez
~fowler
~hansson
~hodel
~hoy/7
~hwang
~luetke
~matz
~mental
~olson
~pragdave
~premshree
~neukirchen
~robby
~rousette
~topfunky
~voorhis
~weirich
~zenspider
Syndicate
Built upon Hobix
Got a story for us? E-mail it!
IcelandicReggae
In what universe does hoodwink.d exist?
jazzido
I doesn’t exists in my universe, at least.
keith23
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. :(
IcelandicRggae
Sorry for my lack of imagination there.
why
keith23: nicely ask them to add to their dns.
sleeper
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 :(
jazzido
Can’t use it in the transparently proxied universe of my ISP :(
william
hyphens in email addresses are not illegal.
bleything
supar sweet.
why
fixed, thankyou william.
olleolleolle
I like this, it is like… very exciting. Secret levels of Super-Mario world.
MenTaLguY
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.
why
MenTaL: people in winkerland are asking for you. i can’t get them off my back.
MenTaLguY
why: I hear them calling. Like faintly buttered toast.
Perhaps… perhaps…
***
MenTaLguY wanders off to studyWEBrick::HTTPProxyServer
MenTaLguY
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 .
meh
get a real domain name, dammit!
Insurgent
But that wouldn’t be nearly as subversive as the current hosting…
why
If I may pose a question to these bedraggled and heretofore unwink’d proxiers. Do either of the following work? (Fill-in the constants.)
Or try…
You know I will do everything I can to help you. (Except the obvious.)
MrCode
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.
why
Oh, um, and
Net::HTTP.start
won’t work like that. Instead, do:Modify per your login and environment settings. You may need to force the
proxy_*
vars.why
two rss feeds on onslaught.
sleeper
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 :)
brwnx
ok…i got the login and the userscipt installed….wtf next???
sleeper
brwnx: go to one of the hoodwink’d page and click on the hoodwink to add your comments ;)
brwnx
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…
bzzzzzzzzzt
wink.rb:11: uninitialized constant WINKD _IP (NameError)
else
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?
Robby
hoodwinkd on freenode. :-)
sleeper
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 :)
MrCode
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.
saether
This taste like burning
MrCode
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.
brwnx
i cant get it to work…
on mac or winxp…must be some firewall crap???
victor
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.
Weird.
MenTaLguY
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?
?
so, it’s some statler and waldorf commentary thing?
MrCode
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?
MenTaLguY
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.
MenTaLguY
MrCode: OHhh.. incidentally. WEBrick has a proxy built in! I didn’t have to write anything extra. Check out
WEBrick::HTTProxyServer
, available viarequire 'webrick/httpproxy'
...MrCode
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.