-
Notifications
You must be signed in to change notification settings - Fork 476
/
Default.aspx
74 lines (64 loc) · 2.12 KB
/
Default.aspx
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
<%@ Page Language="C#" %>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<link rel="stylesheet" type="text/css" href="https://bootswatch.com/4/sketchy/bootstrap.min.css">
<style type="text/css">
.form-control-borderless {
border: none;
}
.form-control-borderless:hover, .form-control-borderless:active, .form-control-borderless:focus {
border: none;
outline: none;
box-shadow: none;
}
</style>
</head>
<body>
<div class='container'>
<br>
<br>
<div class='row justify-content-center'>
<h1><font style="font-size: 200%">Buggy .Net</font></h1>
</div>
<div class='row justify-content-center'>
<i> Here is the source for you: <a href='Default.txt'>Default.txt</a></i>
</div>
<br>
<div class='row justify-content-center'>
<div class="col-12 col-md-10 col-lg-12">
<form class="card card-sm" method="POST" action="">
<div class="card-body row no-gutters align-items-center">
<div class="col">
<input class="form-control form-control-lg form-control-borderless" type="text" name="filename" placeholder="filename...">
</div>
<div class="col-auto">
<button class="btn btn-lg btn-success" type="submit">Send</button>
</div>
</div>
</form>
</div>
</div>
<br>
<br>
<div class='row justify-content-center'>
<h3><font color='red'><%
bool isBad = false;
try {
if ( Request.Form["filename"] != null ) {
isBad = Request.Form["filename"].Contains("..") == true;
}
} catch (Exception ex) {
}
try {
if (!isBad) {
Response.Write(System.IO.File.ReadAllText(@"C:\inetpub\wwwroot\" + Request.Form["filename"]));
}
} catch (Exception ex) {
}
%></font></h3>
</div>
</div>
</body>
</html>