Posts tagged with "Ruby"
Creating a personal wiki with Vimwiki and Gollum

One of the reasons for the Web’s triumph over the Gophernet in the early 90s is its superior organisational structure. Hypertext links allow any one page to be linked from any other page without regard for hierarchy or location, but you can still define hierarchy and location like you would in a filesystem. Early on, in 1994, Ward Cunningham invented the wiki, a sort of mini-web that leveraged the associative power of hypertext linking within a single website. This was good, and it paved...

Directory persistence hack for webshells

The scenario: you’re busy pen testing a webapp and you get code execution somehow. Probably with a dinky little webshell like <?php echo shell_exec($_GET['e']); ?>. For whatever reason, you can’t get or don’t feel like getting something more sophisticated. But the one thing that really irritates you is having to cd through to the directory you want with every new command. Well, here’s a little Ruby script that will do that for you, literally by remembering every single one of your cds and prepending them, in order, to all...

Automated file upload in Ruby with Net::HTTP and MultipartBody

The Internet is full of great blog post tutorials on specific little programming and sysadmin tasks, but sometimes what’s already out there isn’t quite specific or helpful enough for what you’re trying to do. That was the case with something I had to do today, namely uploading a file with an HTTP POST request using Ruby. I wanted my method of accomplishing this to be abstract enough that I didn’t have to manually craft my HTTP request with a text editor, but flexible enough that I was able to set the...

This is the first post

The only thing sadder than a blog with a single introductory post is a forum site with more than twenty subforums, each with cutesy name and description, and about three posts between them, all by the same guy. I’ve had this domain for a while, but the usual combination of laziness and overambition stopped me from really doing much with it. There was a little static HTML thingie with some links and writing here at some point a few months ago, but it was boring and sorta ugly so I took...