forked from xsuperbug/g0yg0y
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathacc1.php
55 lines (41 loc) · 967 Bytes
/
acc1.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
<?php
include 'vulnconf.php';
$sql="SELECT * FROM users";
$result=mysqli_query($link,$sql);
$delete= $_GET['delete'];
$sql2="DELETE FROM users WHERE username='$delete'";
$result2=mysqli_query($link,$sql2);
include 'ust.php';
?>
<!-- 1 -->
<div id="page-content-wrapper">
<!-- 2 -->
<div class="container-fluid">
<!-- 3 -->
<div class="row">
<!-- 4 -->
<div class="col-lg-6">
<h1>Missing Access Control</h1>
<br>
<div class="well">
<br>
<h4>Users List</h5>
<div class="table-responsive">
<table class="table">
<tbody>
<?php while($rows = mysqli_fetch_array($result)){ ?>
<tr class="active">
<td><?php echo $rows['username']; if($_SESSION['whoami']=="admin"){ ?> <a href="acc1.php?delete=<?php echo $rows['username']; ?> ">Delete User</a> <?php } ?></td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
<!-- /4 -->
</div>
<!-- /3 -->
</div>
<!-- /2 -->
</div>
<?php include 'alt.php'; ?>