cert.php 607 B

123456789101112131415161718192021
  1. <?php
  2. // by 请勿倒卖,已申请软著,否则追究法律责任
  3. namespace app\download;
  4. class cert
  5. {
  6. function index()
  7. {
  8. $_var_0 = explode(".", @bees_decrypt($this->action));
  9. $_var_1 = $_var_0[0] ?: "";
  10. $_var_2 = $_var_0[1] ?? "";
  11. $_var_3 = $_var_0[2] ?? 0;
  12. if (!$_var_1 || $_var_3 < strtotime("-5 minutes") || !($_var_4 = db("super_cert")->where("id", $_var_1)->find())) {
  13. header("HTTP/1.1 404 NOT FOUND");
  14. exit("file not exists");
  15. }
  16. certMoveToNew($_var_4);
  17. downloadFile(IN_CERT_PATH . getCert($_var_4["iss"], $_var_4["kid"], "p" . $_var_2), $this->action . ".p" . $_var_2);
  18. }
  19. }