Advertisement
Guest User

Untitled

a guest
Apr 11th, 2017
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.75 KB | None | 0 0
  1. <html>
  2. <head>
  3. </head>
  4. <body>
  5. <div id="text"></div>
  6. <script type="text/javascript">
  7. -->Browser detection code by Relys modified by pwsincd
  8. browserInfo = "<p>Browser CodeName: " + navigator.appCodeName + "</p>";
  9. browserInfo+= "<p>Browser Name: " + navigator.appName + "</p>";
  10. browserInfo+= "<p>Browser Version: " + navigator.appVersion + "</p>";
  11. browserInfo+= "<p>Cookies Enabled: " + navigator.cookieEnabled + "</p>";
  12. browserInfo+= "<p>Platform: " + navigator.platform + "</p>";
  13. browserInfo+= "<p>User-agent header: " + navigator.userAgent + "</p>";
  14. -->Get platform and version number
  15. platform = String(navigator.platform);
  16. var version = navigator.appVersion;
  17. /*Check to see if we're running on a Wii U*/
  18. if(platform == "Nintendo WiiU")
  19. {
  20. -->If we are then parse out the exact browser version
  21. var versionRE = version.match("NX\/(.*) NintendoBrowser\/");
  22. -->Ensure we were able to get browser version
  23. if(versionRE.length==2)
  24. {
  25. -->Store the exact browser version to a string
  26. versionNumber=versionRE[1];
  27. -->See if browser is for Wii U version 5.5.1
  28. if(versionNumber == "3.0.4.2.12")
  29. {
  30. -->Display message and redirect to payload URL
  31. document.getElementById("text").innerHTML="Detected Wii U Firmware version 5.5.1";
  32. window.location = "compliant page due to valid browser / f/w";
  33. }
  34.  
  35. }
  36. /*If we couldn't parse the browser version, throw an error message*/
  37. else
  38. {
  39.  
  40. window.location = "error page or redirect";
  41. }
  42. }
  43. /*If we couldn't detect the Wii U browser, throw an error message.*/
  44. else
  45. {
  46.  
  47. window.location = "error page or redirect";
  48. }
  49. </script>
  50. </body>
  51. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement