File: test.cs.gold

package info (click to toggle)
clearsilver 0.10.5-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,304 kB
  • sloc: ansic: 24,586; python: 4,233; sh: 2,502; cs: 1,429; ruby: 819; java: 735; makefile: 589; perl: 120; lisp: 34; sql: 21
file content (212 lines) | stat: -rw-r--r-- 4,840 bytes parent folder | download | duplicates (9)
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
Parsing test.cs

Start of File


  Blah == wow






wow (true)



  This is True





  wow



I'm in test2.cs


wow2


I'm in test2.cs


wow2


escape: not used
UrlArg: Secret Password~!@#$%^&*()+=-_|\[]{}:";'<>,.?
BlahJs: quote ' backslash \ semicolon ; end tag </script>
Title:  </title><script>alert(1)</script>


escape: none
UrlArg: Secret Password~!@#$%^&*()+=-_|\[]{}:";'<>,.?
BlahJs: quote ' backslash \ semicolon ; end tag </script>
Title:  </title><script>alert(1)</script>



escape: html
UrlArg: Secret Password~!@#$%^&amp;*()+=-_|\[]{}:&quot;;&#39;&lt;&gt;,.?
BlahJs: quote &#39; backslash \ semicolon ; end tag &lt;/script&gt;
Title:  &lt;/title&gt;&lt;script&gt;alert(1)&lt;/script&gt;



escape: js
UrlArg: Secret Password~!@#$%^\x26*()+=-_|\x5C[]{}:\x22\x3B\x27\x3C\x3E,.?
BlahJs: quote \x27 backslash \x5C semicolon \x3B end tag \x3C\x2Fscript\x3E
Title:  \x3C\x2Ftitle\x3E\x3Cscript\x3Ealert(1)\x3C\x2Fscript\x3E



escape: url
UrlArg: Secret+Password%7E!%40%23%24%25%5E%26*()%2B%3D-_%7C%5C%5B%5D%7B%7D%3A%22%3B%27%3C%3E%2C.%3F
BlahJs: quote+%27+backslash+%5C+semicolon+%3B+end+tag+%3C%2Fscript%3E
Title:  %3C%2Ftitle%3E%3Cscript%3Ealert(1)%3C%2Fscript%3E



Nested escaping: html
The internal calls should take precedence
url  -> UrlArg: Secret+Password%7E!%40%23%24%25%5E%26*()%2B%3D-_%7C%5C%5B%5D%7B%7D%3A%22%3B%27%3C%3E%2C.%3F
js   -> BlahJs: quote \x27 backslash \x5C semicolon \x3B end tag \x3C\x2Fscript\x3E
html -> Title:  &lt;/title&gt;&lt;script&gt;alert(1)&lt;/script&gt;


Defining the macro echo_all inside of a "html" escape.


Calling echo_all() macro:

not used: </title><script>alert(1)</script>quote ' backslash \ semicolon ; end tag </script>
none:     </title><script>alert(1)</script>quote ' backslash \ semicolon ; end tag </script>
url:      %3C%2Ftitle%3E%3Cscript%3Ealert(1)%3C%2Fscript%3Equote+%27+backslash+%5C+semicolon+%3B+end+tag+%3C%2Fscript%3E
js:       \x3C\x2Ftitle\x3E\x3Cscript\x3Ealert(1)\x3C\x2Fscript\x3Equote \x27 backslash \x5C semicolon \x3B end tag \x3C\x2Fscript\x3E
html:     &lt;/title&gt;&lt;script&gt;alert(1)&lt;/script&gt;quote &#39; backslash \ semicolon ; end tag &lt;/script&gt;



Calling echo_all() macro from within "html":

not used: &lt;/title&gt;&lt;script&gt;alert(1)&lt;/script&gt;quote &#39; backslash \ semicolon ; end tag &lt;/script&gt;
none:     </title><script>alert(1)</script>quote ' backslash \ semicolon ; end tag </script>
url:      %3C%2Ftitle%3E%3Cscript%3Ealert(1)%3C%2Fscript%3Equote+%27+backslash+%5C+semicolon+%3B+end+tag+%3C%2Fscript%3E
js:       \x3C\x2Ftitle\x3E\x3Cscript\x3Ealert(1)\x3C\x2Fscript\x3Equote \x27 backslash \x5C semicolon \x3B end tag \x3C\x2Fscript\x3E
html:     &lt;/title&gt;&lt;script&gt;alert(1)&lt;/script&gt;quote &#39; backslash \ semicolon ; end tag &lt;/script&gt;




Calling echo_all() macro from within "js":

not used: \x3C\x2Ftitle\x3E\x3Cscript\x3Ealert(1)\x3C\x2Fscript\x3Equote \x27 backslash \x5C semicolon \x3B end tag \x3C\x2Fscript\x3E
none:     </title><script>alert(1)</script>quote ' backslash \ semicolon ; end tag </script>
url:      %3C%2Ftitle%3E%3Cscript%3Ealert(1)%3C%2Fscript%3Equote+%27+backslash+%5C+semicolon+%3B+end+tag+%3C%2Fscript%3E
js:       \x3C\x2Ftitle\x3E\x3Cscript\x3Ealert(1)\x3C\x2Fscript\x3Equote \x27 backslash \x5C semicolon \x3B end tag \x3C\x2Fscript\x3E
html:     &lt;/title&gt;&lt;script&gt;alert(1)&lt;/script&gt;quote &#39; backslash \ semicolon ; end tag &lt;/script&gt;




Calling echo_all() macro from within "url":

not used: %3C%2Ftitle%3E%3Cscript%3Ealert(1)%3C%2Fscript%3Equote+%27+backslash+%5C+semicolon+%3B+end+tag+%3C%2Fscript%3E
none:     </title><script>alert(1)</script>quote ' backslash \ semicolon ; end tag </script>
url:      %3C%2Ftitle%3E%3Cscript%3Ealert(1)%3C%2Fscript%3Equote+%27+backslash+%5C+semicolon+%3B+end+tag+%3C%2Fscript%3E
js:       \x3C\x2Ftitle\x3E\x3Cscript\x3Ealert(1)\x3C\x2Fscript\x3Equote \x27 backslash \x5C semicolon \x3B end tag \x3C\x2Fscript\x3E
html:     &lt;/title&gt;&lt;script&gt;alert(1)&lt;/script&gt;quote &#39; backslash \ semicolon ; end tag &lt;/script&gt;




not used: &lt;/title&gt;&lt;script&gt;alert(1)&lt;/script&gt;
none:     </title><script>alert(1)</script>
url:      %3C%2Ftitle%3E%3Cscript%3Ealert(1)%3C%2Fscript%3E
js:       \x3C\x2Ftitle\x3E\x3Cscript\x3Ealert(1)\x3C\x2Fscript\x3E
html:     &lt;/title&gt;&lt;script&gt;alert(1)&lt;/script&gt;



  x = zero
  x.num = #0


  This is True.

wow

  x = one
  x.num = 


  This is True.

wow

  x = two
  x.num = #2


  This is True.

wow

  x = three
  x.num = 


  This is True.

wow




  This is False.



  Outside 0
  
    Inside = 0
  
    Inside = 1
  

  Outside 1
  
    Inside = 2
  
    Inside = 3
  

  Outside 2
  
    Inside = 2
  
    Inside = 3
  

  Outside 3
  



  TestIf == 0



Correct, "1" == "1"




between comments



More?