Guest User

Untitled

a guest
Oct 4th, 2018
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. function enable_code(){
  2. global $mac; global $access_code; global $code; global $tel; global $ip;
  3. $host = 'localhost';
  4. $database = 'datausers';
  5. $user = 'root';
  6. $pass = 'toor';
  7. $link = mysqli_connect($host,$user,$pass,$database);
  8. if(!$link)
  9. {
  10. die("Database connection failed: " . mysqli_error());
  11.  
  12. }
  13.  
  14. $db_secelect = mysqli_select_db($link,$database);
  15. if(!$db_secelect)
  16. {
  17. die("Database connection failed: " .mysqli_error($link));
  18. }
  19. if($access_code == $code)
  20. {
  21. shell_exec("iptables -t mangle -I internet 1 -m mac --mac-source
  22. ".$mac." -j RETURN");
  23. mysqli_query($link,"INSERT INTO dataconnection(phone,ip,mac,enable) VALUE ('$tel'.'$ip','$mac',1)");
  24. sleep(1); header("location:http://".$_GET['add']); exit;
  25. }
Add Comment
Please, Sign In to add comment