-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathall-samples.php
178 lines (164 loc) · 7.37 KB
/
all-samples.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
<?php
require '_cred.php';
session_start();
if(isset($_SESSION['username'])){
}
else{
echo("<script>location.href = './?page=signin';</script>");
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
<title>Malware Repository</title>
<link rel="stylesheet" href="assets/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.1/css/all.css">
<link rel="stylesheet" href="./assets/fonts/ionicons.min.css">
<link rel="manifest" href="./manifest.json"/>
<link rel="stylesheet" href="assets/css/Footer-Dark.css">
<style>
body{
color: black;
}
.card-1 {
box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
transition: all 0.3s cubic-bezier(.25,.8,.25,1);
}
.card-1:hover {
box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22);
}
.card-2 {
box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
}
.card-3 {
box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);
}
.card-4 {
box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22);
}
.card-5 {
box-shadow: 0 19px 38px rgba(0,0,0,0.30), 0 15px 12px rgba(0,0,0,0.22);
}
.navbar{
background-color: #282D32;
}
</style>
</head>
<body class="bg-gradient-dark">
<nav class="navbar navbar-light text-light navbar-expand-md sticky-top card-2">
<div class="container-fluid" style="padding: 5px"><a href="javascript:void(0)" class = "text-light" onclick="window.history.back();" style="margin-right: 20px"><i class="fas fa-arrow-left"></i></a>
<a class="navbar-brand text-light" href="./?page=loggedin" style="position: fixed; left: 80px;">Malware Repository</a>
<?php require './account.manager.php';?>
</div>
</nav>
<div class="container">
<div class='card' style='margin:20px 0' ><ul class="nav nav-pills">
<li class="nav-item">
<a class="nav-link " href="./?page=loggedin"><b>Dashboard</b></a>
</li>
<li class="nav-item" >
<a class="nav-link disabled" href="#"><b>|</b></a>
</li>
<li class="nav-item float-right" >
<a class="nav-link" href="./upload-sample.php"><b>Upload Sample</b></a>
</li>
<li class="nav-item" >
<a class="nav-link disabled" href="javascript:void(0)"><b>|</b></a>
</li>
<li class="nav-item">
<a class="nav-link disabled" href="./all-samples.php"><b>All Sample</b></a>
</li>
</ul></div>
<h3 class="text-light" style="margin: 20px 0">All Samples
<div class="nav-item dropdown no-arrow float-right"><a data-toggle="dropdown" aria-expanded="false" class="dropdown-toggle text-white" href="#"><i class="fas fa-sort-alpha-down fa-fw"></i> Sort</a>
<div role="menu" class="dropdown-menu dropdown-menu-right dropdown-list dropdown-menu-right animated--grow-in">
<h6 class="dropdown-header">Choose a sorting Criteria</h6>
<a class="d-flex align-items-center dropdown-item" href="#">
<div>
Ascending Alphabetically
</div>
</a>
<a class="d-flex align-items-center dropdown-item" href="#">
<div>
Descending Alphabetically
</div>
</a>
<a class="d-flex align-items-center dropdown-item" href="#">
<div>
Type of Malware
</div>
</a>
<a class="d-flex align-items-center dropdown-item" href="#">
<div>
Date Uploaded Ascending
</div>
</a>
<a class="d-flex align-items-center dropdown-item" href="#">
<div>
Date Uploaded Descending
</div>
</a>
</div>
<form class="form-inline d-none d-sm-inline-block mr-auto ml-md-3 my-2 my-md-0 mw-100 navbar-search">
<div class="input-group"><input type="text" class="bg-light form-control border-0 small" placeholder="Search for Sample" />
</div>
</form>
</h3>
<div class="row" style="margin: 20px 0">
<?php
$sql = "SELECT * FROM malware_samples";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {
$malware_category = $row['category_malware'];
$sqlcat = "SELECT * FROM malware_categories where id_malware_categories='$malware_category'";
$resultcat = $conn->query($sqlcat);
if ($resultcat->num_rows > 0) {
while($rowcat = $resultcat->fetch_assoc()) {
$categoryName =$rowcat["name_of_category"];
}
echo '<div class="col-md-6 col-xl-4 mb-4">
<div class="card shadow border-left-danger py-2">
<div class="card-body">
<div class="row align-items-center no-gutters">
<div class="col mr-2">
<div class="text-uppercase text-danger font-weight-bold text-xs mb-1"><span>'.$categoryName.'</span></div>
<div class="text-dark font-weight-bold h5 mb-0"><span>'. $row["malware_name"].'</span></div><br>
<a href="'. $row["url_file"].'" download><i class="fas fa-download"></i> Download</a>
<a href="javascript:void(0)"><i class="fas fa-arrow-right"></i> Details</a>
</div>
<div class="col-auto"><i class="fas fa-bug fa-2x text-gray-300"></i></div>
</div>
</div>
</div>
</div>';
//echo "id: - Name: " . $row["firstname"]. " " . $row["lastname"]. "<br>";
}
} }
else {
echo "<div class=\"card shadow border-left-warning py-2\">
<div class=\"card-body\">
<div class=\"row align-items-center no-gutters\">
<div class=\"col mr-2\">
<div class=\"text-dark font-weight-bold h5 mb-0\"><span>⚠ No Malware Samples Found!</span></div>
</div>
</div>
</div>
</div>";
}
?>
</div>
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.3.1/js/bootstrap.bundle.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.8.0/Chart.bundle.min.js"></script>
<script src="assets/js/bs-init.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.4.1/jquery.easing.js"></script>
<script src="./manup.js"></script>
<script src="assets/js/theme.js"></script>
</body><?php