Mar 012010
 

So, the folks over at Fubar Labs made a challenge to themselves and anyone else who wants to participate. Basically, write one program every day throughout the month of march. Any language, any function, but be creative. I doubt I can keep up the entire month, but it sounds like a really fun way to expand ones coding horizons and do some neat stuff. So anyways, here’s my first code for March Madness.

For my first madness script, I wrote a quick script to grab the most recent posts made to pastebin.com and grep their contents for any references to passwords. Then I display the URL to the posting and the line that matched. Pretty simple, and pretty fun. Watch what you put in those pastebins kids.

 Posted by at 1:04 pm
  • http://www.facebook.com/rolan Rolan Yang

    How about turning the above into a unix one-liner? I'm sure someone shrink/simplify it further. Here is a start:

    lynx –source http://pastebin.com/archive/1 | grep “<td><a href=” | cut -f2 -d'”' | cut -f2 -d”/” | xargs -I {} -i ksh 'echo “http://pastebin.com/{}:”; lynx –source “http://pastebin.com/raw.php?i={}” | egrep -i “passwd|password”;'

  • hudson

    Yeah! warnings -and- strict!

    But why write to a temp file? It doesn't get cleaned up and the only reason seems to be to iterate over the URLs.