-
Notifications
You must be signed in to change notification settings - Fork 5
/
builds.php
344 lines (321 loc) · 13.8 KB
/
builds.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
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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
<?php
@session_start();
$title = 'Stub Builds';
include_once 'includes/layout/header.php';
include_once 'includes/checks.php';
$getRank = pdoQuery($db, "SELECT `rank` FROM `users` WHERE `id`=?", [htmlspecialchars($_SESSION['ID'])])->fetchColumn();
$banned = pdoQuery($db, "SELECT `banned` FROM `users` WHERE `id`=?", [htmlspecialchars($_SESSION['ID'])])->fetchColumn(0);
if($banned != 0){
header("location: support");
exit();
}
if(checkMaintenance() == 'Maintenance' && $getRank != "Admin"){
header('Location: dashboard');
die();
}
if($getRank != "Premium"){
if($getRank != "Admin"){
header('Location: dashboard');
die();
}
}
if (!empty($_POST['removeBuild'])){
$user = htmlspecialchars($_SESSION['username']);
$zip = htmlspecialchars($_POST['zipName']);
if (checkstubLog($zip) != 0){
$PDORemove = $db -> prepare('DELETE FROM `stub_logs` WHERE `zipname` = :zipname');
$PDORemove -> execute(array(':zipname' => $zip));
$success = "Successfully removed build!";
}else{
$error = "Unauthorized!";
}
}
if(isset($_SESSION['username'])){
$username = htmlspecialchars($_SESSION['username']);
}else{
$username = "Unknown";
}
?>
<body class="bg-dark">
<!--Main Navigation-->
<header>
<!-- Sidenav -->
<nav id="sidenav-1" class="sidenav bg-dark" data-hidden="false" data-accordion="true">
<a class="ripple d-flex justify-content-center py-4" href="#!" data-ripple-color="primary">
<img id="IXWARE Logo" src="resources/img/ixwarelogogif.gif" alt="IX Logo" draggable="false" style="width: 170px;" />
</a>
<ul class="sidenav-menu">
<li class="sidenav-item ml-4 mt-2 mb-1 text-white">
<span>General</span>
</li>
<li class="sidenav-item">
<a class="sidenav-link" href="dashboard">
<i class="fas fa-tachometer-slow fa-fw mr-3"></i><span>Dashboard</span>
</a>
</li>
<?php
if ($getRank == "User" || $getRank == "Admin"){
echo "<li class='sidenav-item'>
<a class='sidenav-link' href='purchase'>
<i class='fas fa-shopping-basket fa-fw mr-3'></i><span>Purchase</span>
</a>
</li>";
}
?>
<li class="sidenav-item ml-4 mt-4 mb-1 text-white">
<span>Managing</span>
</li>
<li class="sidenav-item">
<a class="sidenav-link">
<i class="fas fa-users fa-fw mr-3"></i><span>Bots</span>
</a>
<ul class="sidenav-collapse">
<?php
if ($getRank == "Premium" || $getRank == "Admin"){
echo "<li class='sidenav-item'>
<a class='sidenav-link' href='bots'>Stubs <span class='badge bg-danger ml-2' id='bot-logs'>0</span></a>
</li>";
echo "<li class='sidenav-item'>
<a class='sidenav-link' href='jsBots'>Javascript <span class='badge bg-danger ml-2' id='cookie-logs'>0</span></a>
</li>";
echo "<li class='sidenav-item'>
<a class='sidenav-link' href='psBots'>Phishing <span class='badge bg-danger ml-2' id='ps-logs'>0</span></a>
</li>";
}elseif($getRank == "User"){
echo "<li class='sidenav-item'>
<a class='sidenav-link' href='jsBots'>Javascript <span class='badge bg-danger ml-2' id='cookie-logs'>0</span></a>
</li>";
}
?>
</ul>
</li>
<li class="sidenav-item">
<a class="sidenav-link">
<i class="fas fa-shield-virus fa-fw mr-3"></i><span>Builder</span>
</a>
<ul class="sidenav-collapse">
<?php
if ($getRank == "Premium" || $getRank == "Admin"){
echo "<li class='sidenav-item'>
<a class='sidenav-link' href='builder'>Stub</a>
</li>";
echo "<li class='sidenav-item'>
<a class='sidenav-link' href='jsBuilder'>Javascript</a>
</li>";
echo "<li class='sidenav-item'>
<a class='sidenav-link' href='psBuilder'>Phishing</a>
</li>";
echo "<li class='sidenav-item'>
<a class='sidenav-link' href='bmBuilder'>Bookmark</a>
</li>";
}elseif($getRank == "User"){
echo "<li class='sidenav-item'>
<a class='sidenav-link' href='jsBuilder'>Javascript</a>
</li>";
}
?>
</ul>
</li>
<li class="sidenav-item">
<a class="sidenav-link">
<i class="fas fa-file-download fa-fw mr-3"></i><span>Builds</span>
</a>
<ul class="sidenav-collapse">
<?php
if ($getRank == "Premium" || $getRank == "Admin"){
echo "<li class='sidenav-item'>
<a class='sidenav-link active' href='builds'>Stub</a>
</li>";
echo "<li class='sidenav-item'>
<a class='sidenav-link' href='jsBuilds'>Javascript</a>
</li>";
echo "<li class='sidenav-item'>
<a class='sidenav-link' href='psBuilds'>Phishing</a>
</li>";
echo "<li class='sidenav-item'>
<a class='sidenav-link' href='bmBuilds'>Bookmark</a>
</li>";
}elseif($getRank == "User"){
echo "<li class='sidenav-item'>
<a class='sidenav-link' href='jsBuilds'>Javascript</a>
</li>";
}
?>
</ul>
</li>
<li class="sidenav-item">
<a class="sidenav-link">
<i class="fas fa-tools fa-fw mr-3"></i><span>Tools</span>
</a>
<ul class="sidenav-collapse">
<li class='sidenav-item'>
<a class='sidenav-link' href='watchlist'>Watchlist</a>
</li>
</ul>
</li>
<li class="sidenav-item ml-4 mt-4 mb-1 text-white">
<span>Account</span>
</li>
<li class="sidenav-item">
<a class="sidenav-link">
<i class="fas fa-sliders-h fa-fw mr-3"></i><span>Settings</span>
</a>
<ul class="sidenav-collapse">
<li class="sidenav-item">
<a class="sidenav-link" href="settings">General</a>
</li>
<li class="sidenav-item">
<a class="sidenav-link" href="builder-settings">Builder</a>
</li>
</ul>
</li>
<li class="sidenav-item">
<a class="sidenav-link" href="ix-licenses">
<i class="fab fa-keycdn fa-fw mr-3"#></i><span>Licenses</span>
</a>
</li>
<li class="sidenav-item">
<a class="sidenav-link" href="support">
<i class="fas fa-question-circle fa-fw mr-3"#></i><span>Support</span>
</a>
</li>
<li class="sidenav-item">
<a class="sidenav-link" href="logout">
<i class="fal fa-sign-out fa-fw mr-3"></i><span>Logout</span>
</a>
</li>
</ul>
</nav>
<!-- Sidenav -->
<!-- Navbar -->
<nav
id="main-navbar"
class="navbar navbar-expand-lg navbar-light fixed-top bg-dark"
>
<!-- Container wrapper -->
<div class="container-fluid">
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item text-white">Stub Builds</li>
</ol>
</nav>
<!-- Toggler -->
<button
data-toggle="sidenav"
data-target="#sidenav-1"
class="btn shadow-0 p-0 mr-3 d-block d-xxl-none"
aria-controls="#sidenav-1"
aria-haspopup="true"
>
<i class="fas fa-bars fa-lg"></i>
</button>
<!-- Right links -->
<ul class="navbar-nav ml-auto d-flex flex-row">
<!-- Icon -->
<li class="nav-item">
<a class="nav-link mr-3 mr-lg-0 mt-2 text-white">
<?= $username ?>
</a>
</li>
<!-- Icon -->
<li class="nav-item">
<a class="nav-link mr-3 mr-lg-0 mt-2">
<?php
if ($getRank == "User"){
echo "<span class='badge bg-light text-dark'>Default</span>";
}elseif ($getRank == "Admin"){
echo "<span class='badge bg-danger'>Administrator</span>";
}elseif ($getRank == "Premium"){
echo "<span class='badge bg-warning text-dark'>Premium</span>";
}
?>
</a>
</li>
<!-- Icon -->
<li class="nav-item">
<a class="nav-link mr-3 mr-lg-0">
<?php
$getAvatar = pdoQuery($db, "SELECT `avatarURL` FROM `users` WHERE `id`=?", [htmlspecialchars($_SESSION['ID'])])->fetchColumn();
$av = htmlspecialchars($getAvatar);
if ($av == '0' || empty($av)){
echo "<img src='resources/img/logo.png' class='img-fluid rounded-circle profile-size' alt='' />";
}else{
echo "<img src='$av' class='img-fluid rounded-circle profile-size' alt='' />";
}
?>
</a>
</li>
</ul>
</div>
<!-- Container wrapper -->
</nav>
<!-- Navbar -->
</header>
<!--Main Navigation-->
<!--Main layout-->
<main style="margin-top: 100px" class="d-flex ml-5 mr-5">
<div class="container-fluid">
<div class="row">
<div class="col-xl-8">
<?php
if(!empty($error)){
echo '<div class="animated fadeIn ml-3">'.error(htmlspecialchars($error)).'</div>';
}
if(!empty($success)){
echo '<div class="animated fadeIn ml-3">'.success(htmlspecialchars($success)).'</div>';
}
?>
</div>
</div>
<div class="row">
<div class="col-xl-12">
<div class="card bg-dark table" style="display:table;">
<div class="card-body d-flex flex-column">
<?php
$get = pdoQuery($db, "SELECT * FROM `stub_logs` WHERE `user`=? order by `date` desc", [htmlspecialchars($_SESSION['username'])]);
$results = $get->fetchAll(PDO::FETCH_ASSOC);
$row = $get->rowCount();
echo "<div class='table-responsive'>";
echo "<table id='table-dataTable-builds' class='table table-hover text-darkwhite'>";
echo "<thead class='text-nowrap'>
<tr>
<th scope='col' class='font-weight-bolder'>Stub Name</th>
<th scope='col' class='font-weight-bolder'>ZIP Name</th>
<th scope='col' class='font-weight-bolder'>ZIP Password</th>
<th scope='col' class='font-weight-bolder'>Date</th>
<th scope='col' class='font-weight-bolder'>Actions</th>
</tr>
</thead>
<tbody>";
foreach($results as $result){
$stubname = htmlspecialchars($result['stubname']);
$zipname = htmlspecialchars($result['zipname']);
$dl = htmlspecialchars($result['download']);
$zippw = htmlspecialchars($result['zipPW']);
$date = htmlspecialchars($result['date']);
echo "<tr>
<td scope=\"row\" style='word-break:break-all;'>$stubname</td>
<td scope=\"row\" style='word-break:break-all;'>$zipname</td>
<td scope=\"row\" style='word-break:break-all;'>$zippw</td>
<td scope=\"row\" style='word-break:break-all;'>$date</td>
<form method='POST'>
<td scope=\"row\" style='word-break:break-all;'>
<div class='btn-group-vertical' role='group' aria-label='Vertical button group'>
<button type='submit' name='removeBuild' value='build' class='btn btn-outline-danger btn-sm bot-action-button bot-delete-button' data-ripple-color='dark'><i class='fas fa-trash-alt mr-2'></i> Delete Build</button>
<button type='button' class='btn btn-outline-secondary btn-sm bot-action-button' onclick=\"window.open('$dl')\" data-ripple-color='dark'><i class='fas fa-download mr-2'></i> Download</button>
</div>
</td>
<input type=\"hidden\" name=\"zipName\" value=\"$zipname\" />
</form>
</tr>";
}
echo "</tbody></table>";
?>
</div>
</div>
</div>
</div>
</div>
</main>
<!--Main layout-->
<?php require_once 'includes/layout/footer.php'; require_once 'includes/realtime.php';?>