Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- </head>
- <body>
- <div id="text"></div>
- <script type="text/javascript">
- -->Browser detection code by Relys modified by pwsincd
- browserInfo = "<p>Browser CodeName: " + navigator.appCodeName + "</p>";
- browserInfo+= "<p>Browser Name: " + navigator.appName + "</p>";
- browserInfo+= "<p>Browser Version: " + navigator.appVersion + "</p>";
- browserInfo+= "<p>Cookies Enabled: " + navigator.cookieEnabled + "</p>";
- browserInfo+= "<p>Platform: " + navigator.platform + "</p>";
- browserInfo+= "<p>User-agent header: " + navigator.userAgent + "</p>";
- -->Get platform and version number
- platform = String(navigator.platform);
- var version = navigator.appVersion;
- /*Check to see if we're running on a Wii U*/
- if(platform == "Nintendo WiiU")
- {
- -->If we are then parse out the exact browser version
- var versionRE = version.match("NX\/(.*) NintendoBrowser\/");
- -->Ensure we were able to get browser version
- if(versionRE.length==2)
- {
- -->Store the exact browser version to a string
- versionNumber=versionRE[1];
- -->See if browser is for Wii U version 5.5.1
- if(versionNumber == "3.0.4.2.12")
- {
- -->Display message and redirect to payload URL
- document.getElementById("text").innerHTML="Detected Wii U Firmware version 5.5.1";
- window.location = "compliant page due to valid browser / f/w";
- }
- }
- /*If we couldn't parse the browser version, throw an error message*/
- else
- {
- window.location = "error page or redirect";
- }
- }
- /*If we couldn't detect the Wii U browser, throw an error message.*/
- else
- {
- window.location = "error page or redirect";
- }
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement