| OLD | NEW |
| 1 #!/usr/bin/perl -w | 1 #!/usr/bin/perl -wT |
| 2 | 2 |
| 3 print "content-type: text/html\n"; | 3 print "content-type: text/html\n"; |
| 4 print "\n"; | 4 print "\n"; |
| 5 print <<EOF | 5 print <<EOF |
| 6 <script> | 6 <script> |
| 7 try { | 7 try { |
| 8 var result = document.cookie.split(';')[0].split('=')[1]; | 8 var result = document.cookie.split(';')[0].split('=')[1]; |
| 9 document.cookie = "result=PASS"; // for next time | 9 document.cookie = "result=PASS"; // for next time |
| 10 | 10 |
| 11 var r = new XMLHttpRequest(); | 11 var r = new XMLHttpRequest(); |
| 12 r.open('POST', 'echo-no-store.cgi', false); | 12 r.open('POST', 'echo-no-store.cgi', false); |
| 13 r.send(result); | 13 r.send(result); |
| 14 document.write(r.responseText); | 14 document.write(r.responseText); |
| 15 } catch (e) { | 15 } catch (e) { |
| 16 document.write(e); | 16 document.write(e); |
| 17 } | 17 } |
| 18 </script> | 18 </script> |
| 19 EOF | 19 EOF |
| OLD | NEW |