Skip to content

Instantly share code, notes, and snippets.

@orangetw
orangetw / babyfirst.php
Created Oct 19, 2015
HITCON CTF 2015 Quals Babyfirst
View babyfirst.php
<?php
highlight_file(__FILE__);
$dir = 'sandbox/' . $_SERVER['REMOTE_ADDR'];
if ( !file_exists($dir) )
mkdir($dir);
chdir($dir);
$args = $_GET['args'];
for ( $i=0; $i<count($args); $i++ ){