-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpathchange.php
More file actions
37 lines (28 loc) · 1020 Bytes
/
pathchange.php
File metadata and controls
37 lines (28 loc) · 1020 Bytes
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
<?php
header('Location:./index.php?pesan=4');
include 'path.php';
$today = date("F-j-Y-g-i");
$str = time();
$result = md5($str);
echo $result;
$pathsesudah = "backup/$today$result.enkripsi26190";
$pathconfigusersudah = "backup/$today$result.enksipsi.config";
$pathsebelum = $pathnya;
$pathconfigsebelum = $pathconfig;
$k = '$';
$searchnamess = "//pathconfigmantap26190//";
$total_epsedit = "<?php ".$k."pathnya = '$pathsesudah'; ".$k."pathconfig = '$pathconfigusersudah'; //pathconfigmantap26190//?>
";
$lineztotaltotal = file("path.php");
$linetotaltotal = preg_replace('/^[\r]*[\n\t]+/m', '', $lineztotaltotal);
$searchtotaltotal = $searchnamess;
$resulttotaltotal = $total_epsedit;
foreach($linetotaltotal as $uniqtotal) {
if(stripos($uniqtotal, $searchtotaltotal) === false) {
$resulttotaltotal .= $uniqtotal;
}
}
file_put_contents("path.php", $resulttotaltotal);
rename("./$pathsebelum", "./$pathsesudah");
rename("./$pathconfigsebelum", "./$pathconfigusersudah");
?>