forked from LafeLabs/trashbook
-
Notifications
You must be signed in to change notification settings - Fork 0
/
replicator.php
76 lines (49 loc) · 1.59 KB
/
replicator.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<?php
$dnaurl = "https://raw.githubusercontent.com/LafeLabs/trashbook/main/data/dna.txt";
if(isset($_GET["dna"])){
$dnaurl = $_GET["dna"];
}
$baseurl = explode("data/",$dnaurl)[0];
$dnaraw = file_get_contents($dnaurl);
$dna = json_decode($dnaraw);
mkdir("data");
mkdir("php");
mkdir("scrolls");
mkdir("iconsymbols");
copy("https://raw.githubusercontent.com/LafeLabs/trashbook/main/php/replicator.txt","replicator.php");
foreach($dna->html as $value){
copy($baseurl.$value,$value);
}
foreach($dna->iconsymbols as $value){
copy($baseurl."iconsymbols/".$value,"iconsymbols/".$value);
}
foreach($dna->data as $value){
if($value != "scrollset.txt"){
copy($baseurl."data/".$value,"data/".$value);
}
else{
if(!file_exists("data/".$value)){
copy($baseurl."data/".$value,"data/".$value);
}
}
}
foreach($dna->php as $value){
copy($baseurl."php/".$value,"php/".$value);
copy($baseurl."php/".$value,explode(".",$value)[0].".php");
}
foreach($dna->scrolls as $value){
if($value == "home"){
copy($baseurl."scrolls/".$value,"scrolls/".$value);
}
}
?>
<a href = "index.html">CLICK TO GO TO PAGE</a>
<style>
body{
background-color:#9f8767;
font-family:Comic Sans MS;
}
a{
font-size:3em;
}
</style>