Skip to content

Instantly share code, notes, and snippets.

@acuros
Created April 23, 2015 05:42
Show Gist options
  • Save acuros/8a0bec2352ce6c5e8f5e to your computer and use it in GitHub Desktop.
Save acuros/8a0bec2352ce6c5e8f5e to your computer and use it in GitHub Desktop.
<?php
if($_SERVER[REMOTE_ADDR]==$_SERVER[SERVER_ADDR] && $_GET['getflag']==1){
mysql_connect("localhost","rpg2_flag","rpg2_flag");
mysql_select_db("rpg2_flag");
$q = mysql_fetch_array(mysql_query("select flag from flag_table"));
echo("FLAG=".$q['flag']);
}
else{
mysql_connect("localhost","rpg2","rpg2");
mysql_select_db("rpg2");
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment