Difference between revisions of "User:Doody/Sandbox"

From Hobowars Wiki
Jump to: navigation, search
m (test)
 
m (test)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
<%
+
<html>
If (Len(Request.QueryString("name")) > 0) Then
+
jQuery( document ).ready( function( $ ) {
    Response.Cookies("name") = Request.QueryString("name")  
+
     
End If
+
  if ($.browser.mozilla && $.browser.version >= "2.0" ){
 +
  alert('Mozilla above 1.9');
 +
  }
 
   
 
   
Response.Write("Welcome " & Response.Cookies("name") & "!") 'this script is vulnerable to XSS, the input has not been encoded (see below)
+
  if( $.browser.safari ){
%>
+
  alert('Safari');
 +
  }
 +
 
 +
  if( $.browser.opera){
 +
  alert('Opera');
 +
  }
 +
 
 +
  if ($.browser.msie && $.browser.version <= 6 ){
 +
  alert('IE 6 or below version');
 +
  }
 +
 
 +
  if ($.browser.msie && $.browser.version > 6){
 +
  alert('IE above 6');
 +
  }
 +
 
 +
 
 +
} );
 +
</html>

Latest revision as of 12:57, 2 December 2012

<html> jQuery( document ).ready( function( $ ) {

 if ($.browser.mozilla && $.browser.version >= "2.0" ){
  alert('Mozilla above 1.9');
 }

 if( $.browser.safari ){
  alert('Safari');
 }
 if( $.browser.opera){
  alert('Opera');
 }
 if ($.browser.msie && $.browser.version <= 6 ){
  alert('IE 6 or below version');
 }
 if ($.browser.msie && $.browser.version > 6){
  alert('IE above 6');
 }


} ); </html>