Skip to content

Instantly share code, notes, and snippets.

@kanazux
Last active November 17, 2016 16:35
Show Gist options
  • Save kanazux/8680b66b3f0ceff6c2504225a82a645d to your computer and use it in GitHub Desktop.
Save kanazux/8680b66b3f0ceff6c2504225a82a645d to your computer and use it in GitHub Desktop.
gadi__ | kanazuchi cat 1gb_file.txt | telnet server 80
<?php
if ($_GET["redirurl"]) {
$redir_url = $_GET["redirurl"];
} else {
$redir_url = 'http://www.kanazuchi.com';
}
echo '<center><br/><br/><br/>';
$form_post = '<form method="post" action="/index.php?zone=teste_gadi&redirurl=' . $redir_url . '">';
echo $form_post;
echo '<input name="email" type="text"><br/>';
echo '<input name="check_email" type="submit" value="Check email">';
$portal_action = <<<EOD
<form method="post" action="#PORTAL_ACTION#">
<input name="redirurl" type="hidden" value="#PORTAL_REDIRURL#"><br/>
<input name="zone" type="hidden" value="#PORTAL_ZONE#"><br/>
<input name="accept" type="submit" value="Continue"><br/>
</form>
EOD;
if ($_POST['check_email']) {
if (preg_match("/.*@kanazuchi.com/", $_POST['email'])) {
$data_to_save = $_POST['email'] . '|' . $_SERVER['REMOTE_ADDR'];
file_put_contents('/usr/local/etc/email_logged', $data_to_save, FILE_APPEND);
echo $portal_action . "<br/>";
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment