Articles tagged with "PHP"

CactusCon 2014 CTF Writeup

This is a write up to the 2014 CactusCon web application (SpookiLeaks) challenge. You can grab the SpookiLeaks-VM here and try the challenge yourself before reading the solution.


The First Clue

The first clue to solving the challenge is hidden in plain sight. Before even logging in if we scan the pre-loaded images on the Spooky Images page there's one image with the ...

Continue Reading

Setting Up an Ubuntu Web Server

Having set up several Debian and Ubuntu web servers in the past I thought it would be a good idea to share my process. The following is a relatively comprehensive guide to installing and configuring an Apache based web server with some optimizations and basic resource monitoring. I primarily work with Ubuntu servers, but most of the commands here should work exactly the same in Debian or Ubuntu. I've tried to note where differences may occur.

Download and Install ...

Continue Reading

First Friday script updated and simplified

NOTE: The latest version of this script can always be found here:

With this update I have drastically reduced and simpified the code to produce the same results. I did some rigorous testing of my own to make sure this script will calculate the correct date, but that doesn’t mean it’s bullet-proof. If you find a bug, please email me so I can fix it.


Somewhere along the lines of moving ...

Continue Reading

Calculate the first Friday of next month with PHP

UPDATE: This script has been updated, see:

While developing, I ran into a slight dilemma. The PHX2600 meetings occur once a month on the first Friday of every month, and we wanted to display that on the site. However, it was becoming a tedious chore to change the date once a month manually. So, being the automation addict I am, I thought, why not write a script. So one night I hammered out ...

Continue Reading

Creating Dynamic Menus with PHP and CSS

Want to pep up your web page with some dynamic menus? Here’s a simple solution that only requires a few lines of PHP and CSS.

UPDATE (11/1/08): Simplified the header code and edited the syntax of the list element echo code.


Add the following to the top of your page (before the DOCTYPE or HTML tag).

    // Get current page file name
    $page = basename($_SERVER["PHP_SELF"]);

Then add the following to your menu item where ...

Continue Reading