Trophoon7867

Untitled

Nov 2nd, 2021
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.80 KB | None | 0 0
  1. // ==UserScript==
  2. // @name Linkvertise Bypass
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.4.3
  5. // @description Bypass links that cannot be bypassed by Universal Bypass
  6. // @author FireMasterK
  7. // @match *://*.linkvertise.com/*
  8. // @match *://*.linkvertise.net/*
  9. // @match *://*.link-to.net/*
  10. // @match *://*.linkvertise.download/*
  11. // @match *://*.file-link.net/*
  12. // @match *://*.direct-link.net/*
  13. // @grant GM.xmlHttpRequest
  14. // ==/UserScript==
  15.  
  16. var url = window.location.href.toString();
  17.  
  18. if (url.indexOf("?r=") != -1) {
  19. window.location = atob(decodeURIComponent(url.substr(url.indexOf("?r=") + 3)));
  20. } else {
  21.  
  22. // iframe check
  23. if (window.parent.location != window.location) { return }
  24.  
  25. var paths = ["/captcha", "/countdown_impression?trafficOrigin=network", "/todo_impression?mobile=true&trafficOrigin=network"]
  26.  
  27. paths.map(path => {
  28. GM.xmlHttpRequest({
  29. method: "GET",
  30. headers: {
  31. "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1 Mobile/15E148 Safari/604.1"
  32. },
  33. url: "https://publisher.linkvertise.com/api/v1/redirect/link" + window.location.pathname + path
  34. });
  35. })
  36.  
  37.  
  38. let o = {
  39. timestamp: new Date().getTime(),
  40. random: "6548307"
  41. };
  42. var bypass_url = "https://publisher.linkvertise.com/api/v1/redirect/link/static" + window.location.pathname;
  43. GM.xmlHttpRequest({
  44. method: "GET",
  45. headers: {
  46. "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1 Mobile/15E148 Safari/604.1"
  47. },
  48. url: bypass_url,
  49. onload: function (response) {
  50. var json = JSON.parse(response.responseText);
  51. o.link_id = json.data.link.id
  52. o = { serial: btoa(JSON.stringify(o)) }
  53. bypass_url = "https://publisher.linkvertise.com/api/v1/redirect/link" + window.location.pathname + "/target?X-Linkvertise-UT=" + localStorage.getItem("X-LINKVERTISE-UT");
  54.  
  55. GM.xmlHttpRequest({
  56. method: "POST",
  57. headers: {
  58. "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1 Mobile/15E148 Safari/604.1",
  59. "Content-Type": "application/json"
  60. },
  61. data: JSON.stringify(o),
  62. url: bypass_url,
  63. onload: function (response) {
  64. var json = JSON.parse(response.responseText);
  65. window.location = json.data.target;
  66. }
  67. });
  68. }
  69. });
  70. }
Add Comment
Please, Sign In to add comment