Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $mac="00:1d:92:23:45:d5";
- $ip=$_SERVER['REMOTE_ADDR'];
- $mac=shell_exec("ping $ip -c 1 1>/dev/null && /usr/sbin/arp | grep $ip | grep -oh [0-9a-f][0-9a-f][:-][0-9a-f][0-9a-f][:-][0-9a-f][0-9a-f][:-][0-9a-f][0-9a-f][:-][0-9a-f][0-9a-f][:-][0-9a-f][0-9a-f]");
- $maccheck=shell_exec("cat /var/www/IPs | grep $mac");
- echo $ip;
- echo $mac;
- ob_end_clean();
- if ( $maccheck == '' ) {
- echo("you may pass! please click the button below");
- echo("<form method='post' action='$PORTAL_ACTION$'>
- <input type='hidden' name='redirurl' value='$PORTAL_REDIRURL$'>
- <input name='accept' type='submit' value='Start browsing the web!'>
- </form>");
- echo $mac;
- $file=fopen("/var/www/IPs", "a");
- $output=fwrite($file, $mac);
- } else {
- echo("YOU MAY NOT PASS!");
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement