Posts

Showing posts with the label perl

Sites That Teach You How to Hack Legally

I'm sure there are more than this, but the two sites I recently discovered are Hack This Site! and Hellbound Hackers . Both are lots are lots of fun and very educational, though I prefer Hackthissite.org more. Lately I've been working on the Programming Missions, which on both sites are timed missions. For example, on hackthissite.org the first programming challenge is something like: Find the original (unscrambled) words, which were randomly taken from a wordlist [linked]. Send a comma separated list of the original words, in the same order as in the list below. You have 30 seconds time to send the solution. List of scrambled words: 1bbabu wtenrae heysehr oeibod siektnr padssw urpeoe lechmil hpiillp oe1ums You then have an input box and a button to click to send in the answer. The actual programming part of this mission is fairly straitforward (though I'm sure there are a number of different approaches), but what ...

Base64 decode to file

The internet sometimes sucks. I spent about 20 minutes searching the internet for an easy way to decode a base64 file in linux. Shouldn't be that hard. In fact, there is a base64 command. But fuck me, I sure couldn't get it to work with the file I had (which was supposed to decode into a .jpg). There is tons of nonsense about the theory and some stupid unhelpful web applications, but no practical examples. That is, until I stumbled upon this little gem - which gave me exactly what I wanted. perl -MMIME::Base64 -ne 'print decode_base64($_)' < file.txt > out A one-liner in Perl (of course). The fact that this info was so easy, yet it was so hard to find pisses me off. I'm sure there are other ways to do this. In fact, if you know of other ways to do this, then please leave me a comment telling me how. I hate when good info gets buried under the load of crap clogging the internet tubes. Technorati Tags: linux , base64 , perl

Getting Perl-Tk installed on Hardy with Anti-Aliased Fonts

Image
First, make sure you turn off compiz - when I had it turned on it lead to all sort of weird errors and freeze-ups. Then I downloaded the package from: http://search.cpan.org/dist/Tk/ Using Synaptic I installed: libperl-dev, libx11-dev, x-dev,and libxft-dev Then, using the command line: tar xvfz Tk-* cd Tk-* perl Makefile.PL XFT=1 make make test sudo make install