6 ms·
Well, there's always something like this Finger-to-Twitter proxy: https://gist.github.com/mcroydon/519344 https://gist.github.com/mcroydon/519344
by nandhp 10y ago
Well, there's always something like this Finger-to-Twitter proxy:
https://gist.github.com/mcroydon/519344 https://gist.github.com/mcroydon/519344
- AckSyn 10y agobut then i'd have to use node.js
- nandhp 10y agoTrue. So maybe it would be better to stick this one-liner in your inetd.conf. perl -MLWP::Simple -MCGI=escape -MHTML::Entities -MEncode -e '$u="";read(STDIN,$u,1,length($u)) while length($u)<128 and $u!~/\n/;$u=~s/^\/w//i;$u=~s/\s//g;if(!$u){print "This server cannot enumerate users.\r\n";exit}elsif(length($u)>128){exit}elsif($u=~/@/){print "Finger forwarding denied.\n";exit}foreach (split /\r?\n/,get("https://twitrss.me/twitter_user_to_rss/?user=".escape($u))) { if(/<title>([^<]+)/){$title=decode_entities($1)}elsif(/<dc:creator>.*\(@([^)<]+)\)/){$author=decode_entities($1)}elsif(/<\/item>/){print encode("utf8","$author: $title\r\n")}}' On the bright side, Finger is a simple enough protocol you can implement a full-featured RFC1288-compliant server (except for some optional features) in under 600 characters. Remind me again why nobody uses it anymore?
- AckSyn 10y agoThat's one heck of a 1-liner! I like it. >. Remind me again why nobody uses it (finger) anymore? People wanted "shiny" for their things.