SHARE
TWEET

Untitled

a guest Jun 15th, 2017 101 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. $PASSWORD = "uk1331asd";
  4. $STALE = 1; // number of days to store script data
  5.  
  6. $DB_HOST = 'localhost'; $DB_USER = 'z3r0dat'; $DB_PASS = 'uk1331asd';
  7. $DB_NAME = 'z3r0dat_SERVER'; $DB_TABLE = 'scriptgen';
  8.  
  9. $uuid = htmlentities($_POST["uuid"]); $seq = (integer)htmlentities($_POST["seq"]);
  10. $data = htmlentities($_POST["data"]);
  11. $password = htmlentities($_POST["password"]); if ($password != $PASSWORD) exit();
  12.  
  13. $dbcnx = @mysql_pconnect($DB_HOST, $DB_USER, $DB_PASS);
  14. if (!$dbcnx) exit(); if (! @mysql_select_db($DB_NAME)) exit();
  15.  
  16. if ($seq == -1)
  17. {
  18.     mysql_query("DELETE FROM $DB_TABLE WHERE uuid LIKE '$uuid'");
  19.     mysql_query("DELETE FROM $DB_TABLE
  20.             WHERE created < DATE_SUB(CURDATE(), INTERVAL $STALE DAY)");
  21.     echo "ready"; exit();
  22. }
  23.  
  24. $result = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM $DB_TABLE WHERE uuid LIKE '$uuid' AND seq LIKE '$seq'"));
  25. if ($result['COUNT(*)'])
  26.     $results = mysql_query("UPDATE $DB_TABLE SET data = '$data' WHERE uuid LIKE '$uuid' AND seq LIKE '$seq'");
  27. else mysql_query("INSERT INTO $DB_TABLE SET uuid = '$uuid', seq = '$seq', data = '$data', created = NOW()");
  28.  
  29. echo $seq;
  30.  
  31. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top