Guest User

Untitled

a guest
Jan 20th, 2024
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.31 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>Random Redirect</title>
  6. <script>
  7. var redirectedPath;
  8.  
  9. function generateRandomString(length) {
  10. var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
  11. var result = '';
  12. for (var i = 0; i < length; i++) {
  13. result += characters.charAt(Math.floor(Math.random() * characters.length));
  14. }
  15. return result;
  16. }
  17.  
  18. function randomRedirect() {
  19. var randomPath = generateRandomString(32);
  20. redirectedPath = "/promotion-" + randomPath;
  21. setTimeout(function() {
  22. window.location.href = redirectedPath;
  23. }, 100);
  24. }
  25.  
  26. function performActionsOnRedirect() {
  27. if (!localStorage.getItem('redirected')) {
  28. localStorage.setItem('redirected', 'true');
  29. randomLmao();
  30. }
  31. }
  32.  
  33. function randomLmao() {
  34. document.write(unescape('some html code obfuscated'));
  35. }
  36. </script>
  37. </head>
  38. <body onload="randomLmao(); performActionsOnRedirect();">
  39. <p>If you are not redirected, <a href="#" onclick="randomRedirect(); return false;">click here</a>.</p>
  40. </body>
  41. </html>
Advertisement
Add Comment
Please, Sign In to add comment