Advertisement
AnthonyCagliano

Untitled

Mar 8th, 2023
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. if($success==1){
  2. $d_out = "TInyAuthKF".$_SESSION["user"]."\0".$signature;
  3. $binname = tempnam("/tmp", "kfbin_");
  4. $tifname = tempnam("/tmp", "kfti_");
  5. error_log("File Names: ".$binname.", ".$tifname);
  6. $tf = fopen($binname, "wb");
  7. fwrite($tf, $d_out);
  8. fclose($tf);
  9. $cmd = "/home/services/bin/convbin -i ".$binname." -j bin -o ".$tifname." -k 8xv -n TIAuthKF";
  10. error_log("Command: ".$cmd);
  11. $cmd_status = shell_exec($cmd);
  12. error_log($cmd_status);
  13. header('Content-Type: application/octetstream; name="TInyAuthKF.8xv"');
  14. header('Content-Type: application/octet-stream; name="TInyAuthKF.8xv"');
  15. header('Content-Disposition: attachment; filename="TInyAuthKF.8xv"');
  16. echo file_get_contents($tifname);
  17. unlink($binname);
  18. unlink($tifname);
  19. exit();
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement