forked from hmoog/riot-decode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexplorer.php
61 lines (51 loc) · 1.22 KB
/
explorer.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<html>
<head>
<script src="google-code-prettify/run_prettify.js"></script>
</head>
<body onload="prettyPrint();">
<?php
use riotDecode\raf\ExtractedRiotArchiveFileEntry;
// setup php environment
set_time_limit(0);
spl_autoload_register();
// create game folder object
//$gameFolder = new \riotDecode\GameFolder('D:\\9_Perso\\jeux\\Riot\\League of Legends\\');
$gameFolder = 'D:\\9_Perso\\LOL\\GlobalDumped';
$p = null;
$dir = $gameFolder;
if (isset($_REQUEST["current"]))
{
$p = $_REQUEST["current"];
$dir = $gameFolder. DIRECTORY_SEPARATOR . $p;
}
echo("ROOT :". $dir . "<br><br>");
if (is_dir($dir))
{
$cdir = scandir($dir);
foreach ($cdir as $key => $value)
{
$cur = $value;
if (isset($_REQUEST["current"]))
$cur = $p. DIRECTORY_SEPARATOR . $cur;
if (!in_array($value,array(".","..")))
{
if (is_dir($dir . DIRECTORY_SEPARATOR . $value))
{
echo "<a href='explorer.php?current=". urlencode($cur)."'>DIR:".$value."</a><br>";
}
else
{
echo "<a href='explorer.php?current=". urlencode($cur)."'>FIL:".$value."</a><br>";
}
}
}
}
else
{
$gameFile = new ExtractedRiotArchiveFileEntry(null, $dir, 0, 0, null);
$decodedFile = $gameFile->decode();
echo $decodedFile;
}
?>
</body>
</html>