Skip to content

Instantly share code, notes, and snippets.

@Techdaan
Created January 15, 2019 15:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Techdaan/f4732658b68dd37854e5c5d14c31efd5 to your computer and use it in GitHub Desktop.
Save Techdaan/f4732658b68dd37854e5c5d14c31efd5 to your computer and use it in GitHub Desktop.
NXT Apache files
Options +FollowSymLinks
RewriteEngine on
RewriteRule ^client client.php
RewriteRule ^jav_config.ws config.php
<?php
$binaryType = $_GET["binaryType"];
$fileName = $_GET["fileName"];
$crc = $_GET["crc"];
if($fileName !== "rs2client.exe")
die("Cannot download files other than 'rs2client.exe'");
if($fileName === "rs2client.exe" && file_exists($fileName)){
header("Content-type: application/octet-stream");
header("Server: JAGeX/3.1");
header("Content-Disposition: filename=rs2client.exe");
header("Content-Length: " . filesize($fileName));
readfile("rs2client.exe");
} else {
echo "File not found";
}
?>
<?php
header("Content-type: text/plain; charset=ISO-8859-1");
header("Server: JAGeX/3.1");
// Paste the configuration Jagex returned below the PHP end block
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment