pakson

kurwoskrypt

Jan 23rd, 2020
285
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.46 KB | None | 0 0
  1. // ==UserScript==
  2. // @name New Userscript
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description try to take over the world!
  6. // @author You
  7. // @match https://zspzuromin.edupage.org/timetable/
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. (function() {
  12.  
  13. /** * Made by kurwa Kerai * chcesz rozpowszechniac? podawaj źródło * chcesz cos zmieniac? wszystkie komentarze pisz * w komentarzach wieloliniowych, bo sie moze popsuc pod chrome i opera... */
  14. var whitespace = "-\/|.,!:;'\" \t\n\r{}[]()";
  15. var stack = [];
  16. var curNIndex = 0;
  17. var curNode = null;
  18. var curIndex = -1;
  19. var state = 1;
  20. var lastword = '';String.prototype.startsWith = function(prefix) {
  21. return this.indexOf(prefix) === 0;
  22. };String.prototype.endsWith = function(suffix) {
  23. return this.match(suffix + "$") == suffix;
  24. }; /* Nie moge tak robić niestety */
  25. function kurwizeLink(url) {
  26. if (url.startsWith('javascript:')) return url; /* chyba niewiele moge zrobic kurwa */
  27. if (url.startsWith('#')) return url;
  28. if (url.startsWith('https://kurwa.keray.eu/?url=')) return url; /* no, bo kurwa, bez jaj ;p */
  29. var base = '';
  30. if (!url.startsWith('http')) {
  31. base = location.protocol + "://" + location.host;
  32. if (!url.startsWith('/')) {
  33. var pathname = location.pathname;
  34. base += pathname.substring(0, pathname.lastIndexOf('/'));
  35. }
  36. }
  37. return 'https://kurwa.keray.eu/?url=' + base + url;
  38. };
  39.  
  40. function nextLetter() {
  41. if (curNode == null) return null;
  42. if (curIndex >= curNode.data.length) {
  43. curNode = stack[++curNIndex];
  44. curIndex = -1;
  45. if (curNode == null) return null;
  46. }
  47. curIndex++;
  48. if (curIndex >= curNode.data.length) {
  49. return ' ';
  50. }
  51. return curNode.data[curIndex];
  52. };
  53.  
  54. function nextAfterWord() {
  55. /* lastword = ''; */
  56. /* szukamy poczatku kurwa wyrazu */
  57. dupa: while (true) {
  58. do {
  59. var
  60. let = nextLetter();
  61. if (let == null) return false;
  62. } while (whitespace.indexOf(let) != -1);
  63. if (state == 1) {
  64. /* byliszmy na poczatku, teraz kurwa bedziemy szukac konca wyrazu */
  65. state = 2;
  66. return true;
  67. };
  68. state = 3;
  69. var starting = curIndex;
  70. do {
  71. var
  72. let = nextLetter();
  73. if (let == null) return false;
  74. if (state == 1) continue dupa;
  75. } while (whitespace.indexOf(let) == -1); /* ostatni wyraz, moze sie kurwa przydac pozniej zeby nasz algorytm byl bardziej inteligentny */ /* trza to jeszcze kurwa usprawnic */
  76. lastword = curNode.data.substr(starting, curIndex - starting).toLowerCase();
  77. return true;
  78. }
  79. };
  80.  
  81. function putHere(text) {
  82. if (curNode == null) return; /** oj, trzeba to kurwa fixnąć kiedyś */
  83. curNode.data = curNode.data.substr(0, curIndex) + (state != 2 ? ' ' : '') + text + (state == 2 ? ' ' : '') + curNode.data.substr(curIndex);
  84. curIndex += text.length + 2;
  85. };
  86.  
  87. function replaceLast(text) {
  88. var s2 = curNode.data.substr(curIndex);
  89. curIndex -= lastword.length;
  90. var s1 = curNode.data.substr(0, curIndex);
  91. curIndex += text.length;
  92. curNode.data = s1 + text + s2;
  93. } /** rekurencyjnie szukamy tylko tekstu kurwa */
  94. function przelec(node) {
  95. if (typeof node != "object" || typeof node.childNodes != "object") return;
  96. var children = node.childNodes;
  97. for (var i = 0; i < children.length; i++) {
  98. var child = children[i]; /* nie IFRAME, bo sie moze kurwa crashnąć, nie SCRIPT... wiadomo, nie PRE - bo to moze byc kurwa kod źródłowy... chociaż może fajnie by było widzieć coś w stylu std:kurwa:cout */
  99. if (child.nodeType == 1 && child.tagName != "SCRIPT" && child.tagName != "IFRAME" /*&& child.tagName!="PRE"*/ ) {
  100. przelec(child);
  101. };
  102. if (child.nodeType == 3) {
  103. stack.push(child);
  104. };
  105. if (child.tagName == "A") {
  106. /* child.href=kurwizeLink(child.href+''); */
  107. };
  108. };
  109. };przelec(document.body);curNode = stack[0];
  110. var i = Math.floor(Math.random() * 9);
  111. var forpe = window.location.href.indexOf("4programmers") > -1; /* a tak se sprawdzimy :D if(forpe){while(nextAfterWord()) {var word = 'Adam Boduch';var rnd = Math.random() * 5;if(rnd<1)word = "Adam";else if(rnd<2) word = "Boduch";else if(rnd<3)word = "klacze";replaceLast(word);}return;} */
  112. while (nextAfterWord()) {
  113. if (i-- <= 0) {
  114. if (lastword == 'na') continue;
  115. if (lastword == 'do') continue;
  116. if (lastword == 'jak') continue;
  117. if (forpe) {
  118. if (lastword == 'i') continue;
  119. if (lastword == 'o') continue;
  120. if (lastword == 'w') continue;
  121. if (lastword == 'z') continue;
  122. if (lastword == 'a') continue;
  123. if (lastword == 'u') continue;
  124. if (lastword == 'się') continue;
  125. if (lastword.startsWith('niekt')) continue;
  126. if (lastword.startsWith('różn')) continue;
  127. if (lastword == 'boduch') {
  128. replaceLast('( ͡° ͜ʖ ͡°)');
  129. } else {
  130. replaceLast('Adam Boduch');
  131. }
  132. } else {
  133. if (lastword == 'nie') continue;
  134. if (lastword == 'kurwa') continue;
  135. putHere('kurwa');
  136. }
  137. var i = 2 + Math.floor(Math.random() * 8);
  138. };
  139. }; /** * Finalnie zamiast pobierac skrypt ze strony, sprawdzamy jedynie wersje */
  140. function reqListener() {
  141. var ver = this.responseText;
  142. if (ver > 2.8) {
  143. var cnf = confirm("Nowa wersja skryptu KURWA jest dostępna!\nUsuń starą i ustaw nową\n\n");
  144. if (cnf) window.location = 'https://kurwa.keray.eu/?new';
  145. }
  146. };
  147. var oReq = new XMLHttpRequest();oReq.onload = reqListener;
  148. try {
  149. oReq.open("get", "https://kurwa.keray.eu/kurwa.ver", true);
  150. oReq.send();
  151. } catch (e) {}
  152.  
  153. void 0;
  154. })();
Advertisement
Add Comment
Please, Sign In to add comment