Skip to content

Instantly share code, notes, and snippets.

@rverton
Created April 9, 2017 13:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rverton/7f94b907a39ec2e063f843bdd80dc754 to your computer and use it in GitHub Desktop.
Save rverton/7f94b907a39ec2e063f843bdd80dc754 to your computer and use it in GitHub Desktop.
ASIS CTF 2017, Tar Bomb Challenge
<?php
header('Access-Control-Allow-Origin: *');
$remote = $_SERVER['REMOTE_ADDR'];
if ($remote === '127.0.0.1' || $remote === '::1') {
$flag = fopen("/flag", "r") or die("Unable to open file!");
echo fread($flag,filesize("/flag"));
fclose($flag);
} else {
echo 'what do you expect to see here?';
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment