-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
121 lines (97 loc) · 2.32 KB
/
index.html
File metadata and controls
121 lines (97 loc) · 2.32 KB
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
<html>
<head>
<title>Web Encoding Utility</title>
<style type="text/css"><!--
BODY {
margin-top:20px;
margin-bottom:20px;
}
INPUT.submit,SPAN,BODY, TH, TD, UL, LI, P {
font-family:verdana;
font-size:10pt;
}
A:hover {
color:#ce0000;
}
.small {
font-size:8pt;
}
IMG {
border-color:#000000;
}
TEXTAREA,INPUT,PRE {
font-family:monospace;
}
INPUT.submit {
cursor:hand;
background-color:#ffffff;
}
//--></style>
</head>
<body>
<script>
<!--//
function Foo() {
if (document && document.F1 && document.F1.input) {
document.F1.HO.value = html_encode(document.F1.input.value);
document.F1.UO.value = escape(document.F1.input.value);
return false;
}
}
function html_encode(in_str) {
var str_obj = new String(in_str);
str_obj = str_obj.replace( /&/g, '&' );
str_obj = str_obj.replace( /"/g, '"' );
str_obj = str_obj.replace( />/g, '>' );
str_obj = str_obj.replace( /</g, '<' );
return str_obj.toString();
}
//-->
</script>
<p><b>Web-Encoding Tool</b></p>
<form method="POST" action="#" name="F1" onsubmit="return Foo();">
<table border="0" cellpadding="4" cellspacing="1" bgcolor="#000000">
<tr bgcolor="#9eb3c7">
<th>Input: Enter text here:</th>
</tr>
<tr bgcolor="#d5d2bb">
<td><textarea name="input" rows="5" cols="40" placeholder="input xss payload here!"></textarea></td>
</tr>
<tr bgcolor="#d5d2bb">
<td align="center"><input type="submit" class="submit" value="Translate">
<script>
<!--//
function ShowEx() {
if (document && document.F1 && document.F1.input) {
document.F1.input.value = "<B>Hello World!</B>";
Foo();
}
}
document.write(' - <A HREF=javascript:ShowEx();>show example</A>');
//-->
</script></td>
</tr>
</table>
<p><br></p>
<table border="0" cellpadding="4" cellspacing="1" bgcolor="#000000">
<tr bgcolor="#9eb3c7">
<th>Output: HTML-Encoded Text:</th>
</tr>
<tr bgcolor="#d5d2bb">
<td><textarea name="HO" rows="8" cols="40"></textarea></td>
</tr>
</table>
<p><br></p>
<table border="0" cellpadding="4" cellspacing="1" bgcolor="#000000">
<tr bgcolor="#9eb3c7">
<th>Output: URL-Encoded Text:</th>
</tr>
<tr bgcolor="#d5d2bb">
<td><textarea name="UO" rows="8" cols="40"></textarea></td>
</tr>
</table>
</td></tr></table>
<p><br></p>
</div></center>
</body>
</html>