Monthly Archives: February 2012

Remote command execution using only wget

I have discovered a method to get remote command execution using only wget. To show you how this works I first want you to wget this url like this: wget www.google.com/support/forum/p/AdSense/thread?tid=;ls;#09dbf3733ec9b44d&hl=en Do you see what I did there? Remote command execution using only wget! If you didn’t catch it, theres an “ls” inside the url, [...]

How to count the lines of code in your project

My friend http://christian.tellnes.com/ challenged me to write a one liner for determining the number of lines of code in his project, in bash. This is what I came up with: i=0;for file in `ls`;do if ! [ -d "$file" ]; then ((i=$i+`cat $file | wc -l`)); fi; done ; echo $i Counts all files which [...]

Ultra fast upload script for screenshots

I wanted to take a screenshot of a region of my screen, and upload it as fast as possible, so I can share it instantly. With this bash script, I have a shareable url to the screenshot in a matter of seconds. You need ssh access to a host where you can store files in [...]