CashCamel GreaseMonkey


SUBMITTED BY: Guest

DATE: May 13, 2013, 11:06 a.m.

FORMAT: Text only

SIZE: 11.3 kB

HITS: 1870

  1. // ==UserScript==
  2. // @name cashcamel
  3. // @namespace cashcamel
  4. // @include *://*cashcamel.net/index.php?view=click*
  5. // @include *://*cashcamel.net/index.php?view=account&ac=click*
  6. // @include *://*cashcamel.net/index.php?view=account&ac=ptra*
  7. // @include *://*cashcamel.net/gpt.php?v=entry*
  8. // @include *://*cashcamel.net/gpt.php?v=read*
  9. // @include *://*cashcamel.net/view.php?id=*
  10. // @require http://userscripts.org/scripts/source/159898.user.js
  11. // @include *://*.*cks.com/
  12. // @include *://*cl.my/*
  13. // @include *://*link.com/*
  14. // @include *://*oc.us/*
  15. // @include *://*df.ly/*
  16. // @version 1
  17. // ==/UserScript==
  18. //
  19. if((wparent.location.href.indexOf('index.php?view=click') != -1 ||
  20. wparent.location.href.indexOf('index.php?view=account&ac=click') != -1 ||
  21. wparent.location.href.indexOf('index.php?view=account&ac=ptra') != -1) &&
  22. top == self){
  23. var arr = [],ctr = 0;
  24. var div = $('<div>');
  25. var clickNum = ctr + 1 ;
  26. var loading = 0;
  27. div.css({color:'#000',zIndex:1000000000,textAlign:'center',padding:5,position:'fixed',width:399,height:20,background:'#AFFFAF',border:'2px solid green',bottom:10,right:10})
  28. .text('clicking: '+clickNum+' loading : '+ loading);
  29. $('body').css({position:'relative'}).append(div);
  30. setTimeout(function(){
  31. // bot detector deleter
  32. $.each($('table tr img'),function(){
  33. if($(this).attr('src')){
  34. if($(this).attr('src').indexOf('/hidesite') != -1){
  35. $(this).parents('tr:first').remove();
  36. return false;
  37. }
  38. }
  39. });
  40. if($('.texttitle').size()){
  41. if($('.texttitle').text().indexOf('D O , N O T , C L I C K')>=0){
  42. $('.texttitle').parents('.ptclink:last').remove()
  43. }
  44. }
  45. var clickSrc = ($('.ptcWrapper li center').size()) ? $('.ptcWrapper li center') : $('.ptcWrapper td');
  46. if(!clickSrc.size())clickSrc = $('td',$('.section-line').nextAll('table'));
  47. if(!clickSrc.size())clickSrc = $('.ads h3');
  48. if(!clickSrc.size())clickSrc = $('div .text');
  49. if($('.ptclink > a').size()){clickSrc=$('.ptclink')}
  50. $.each(clickSrc,function(k,v){
  51. objj[k];
  52. var thisItem = $('> a:last',$(v));
  53. if(thisItem.attr('href')){
  54. if( ( thisItem.attr('href').indexOf('gpt.php?v=entry&type=ptc') >= 0 || thisItem.attr('href').indexOf('gpt.php?v=read') >= 0 ) && thisItem.text().indexOf('Cheat Check') == -1){
  55. var obj = {
  56. href : thisItem.attr('href'),
  57. jObj : thisItem
  58. }
  59. arr.push(obj);
  60. }
  61. }
  62. });
  63. if($('.ptclink > a').size()){
  64. }
  65. if(!arr.length){
  66. $.each($('a,div'),function(k,v){
  67. objj[k];
  68. var thisItem = $(v);
  69. $
  70. if(thisItem.attr('href')){
  71. if( (thisItem.attr('href').indexOf('gpt.php?v=entry&type=ptc') >= 0 || thisItem.attr('href').indexOf('gpt.php?v=read') >= 0 ) && thisItem.text().indexOf('Cheat Check') == -1){
  72. var obj = {
  73. href : thisItem.attr('href'),
  74. jObj : thisItem
  75. }
  76. arr.push(obj);
  77. }
  78. }
  79. else if (thisItem.attr('onclick')){
  80. if( (thisItem.attr('onclick').toString().indexOf('entry&type=ptc') >= 0 ) && thisItem.text().indexOf('Cheat Check') == -1){
  81. var obj = {
  82. href : 'gpt.php?v='+thisItem.attr('onclick').toString().split(',')[1].match(/'[^]+'/)[0].replace(/'/g,''),
  83. jObj : thisItem
  84. }
  85. arr.push(obj);
  86. }
  87. }
  88. });
  89. }
  90. console.log(arr.length);
  91. console.log(arr);
  92. function rec(ctr){
  93. loading = 0;
  94. if(arr[ctr]){
  95. if(typeof adsWind == 'undefined')
  96. adsWind = wparent.open(arr[ctr].href,"janbee","width=100,height=50,top=1000,left=20000");
  97. else
  98. adsWind.location.href = arr[ctr].href;
  99. $(adsWind).ready(function(){adsWind.resizeTo(600,600)}).error(function(){wparent.success('fail');})
  100. div.text('clicking : '+clickNum+' / '+ arr.length +' - loading : '+ loading);
  101. }
  102. else{
  103. var timeReload=120000;
  104. var inters = setInterval(function(){
  105. timeReload-=1000;
  106. div.text("reloading :"+timeReload);
  107. if(timeReload == 0){
  108. clearInterval(inters)
  109. window.location.reload()
  110. }
  111. },1000);
  112. adsWind.close()
  113. }
  114. }
  115. rec(ctr);
  116. wparent.success = function(r){
  117. if(r == 'retry'){
  118. setTimeout(function(){rec(ctr);});
  119. }
  120. else if(r == 'fail'){
  121. arr[ctr].jObj.css({border: '2px solid red'})
  122. ctr++;
  123. clickNum = ctr + 1;
  124. setTimeout(function(){rec(ctr);});
  125. }
  126. else{
  127. arr[ctr].jObj.text('done').css({background: '#000',color:'#FFF'});
  128. ctr++;
  129. clickNum = ctr + 1;
  130. setTimeout(function(){rec(ctr);});
  131. }
  132. }
  133. },5000)
  134. }
  135. if(wparent.location.href.indexOf('gpt.php?v=read') != -1 && self == top){
  136. var div = $('<div>');
  137. div.css({font:'bold 10px arial',zIndex:1000000,textAlign:'center',padding:5,position:'fixed',width:85,height:20,background:'#AFFFAF',border:'2px solid green',top:10,left:10})
  138. .text('');
  139. $('html').css({position:'relative'}).append(div);
  140. var inters = setInterval(function(){
  141. div.text($('#countbutton').val())
  142. if(!$('#countbutton').is(':disabled')){
  143. clearInterval(inters);
  144. var read = window.location.href.replace('read','entry');
  145. window.location.href = read;
  146. }
  147. },1000)
  148. }
  149. if(wparent.location.href.indexOf('gpt.php?v=entry') != -1 &&
  150. self == top){
  151. if($('frameset frame:last').size()){
  152. if($('frameset frame:last').attr('src').indexOf('adf.ly') >= 0){
  153. wparent.opener.success('fail');
  154. }
  155. }
  156. var div = $('<div>');
  157. div.css({font:'bold 10px arial',zIndex:1000000,textAlign:'center',padding:5,position:'fixed',width:85,height:20,background:'#AFFFAF',border:'2px solid green',top:10,left:10})
  158. .text('');
  159. $('html').css({position:'relative'}).append(div);
  160. var thisFrame = ($('frameset frame:first').size()) ? $('frameset frame:first') : $('iframe:first')
  161. thisFrame.error(function(){wparent.opener.success('fail');})
  162. if($('frame:last').attr('src').indexOf('cheat') >= 0 ){
  163. var cheatCheck = []//1;
  164. if(wparent.location.host.indexOf('cashcamel')!=-1)cheatCheck = [49,27,51,32,35,8,39,60,46,22,65];
  165. var inters = setInterval(function(){
  166. var doc1 = $( $('frame:first')[0].contentDocument );
  167. var doc = $( $('frame:last')[0].contentDocument );
  168. if($('input[type=radio]',doc).size()){
  169. clearInterval(inters);
  170. div.text($('#timer',doc1).text())
  171. $.each(cheatCheck,function(k,v){
  172. if($('input[value='+v+']',doc).size()){
  173. $('input[value='+v+']',doc).attr('checked',true);
  174. $('input[value=Answer]',doc).trigger('click');
  175. setTimeout(function(){
  176. wparent.opener.success('retry');
  177. },200);
  178. }
  179. });
  180. }
  181. },2000);
  182. }
  183. else{
  184. var iframeLoad = 50;
  185. var intersAds = setInterval(function(){
  186. iframeLoad--;
  187. if(iframeLoad == 0){
  188. clearInterval(intersAds);
  189. wparent.opener.success('fail');
  190. }
  191. if(iframeLoad == 20){
  192. $('frame:last').attr('src','http://google.com');
  193. }
  194. },1000)
  195. var fulltimer;
  196. var inters = setInterval(function(){
  197. var doc = $( $('frame:first')[0].contentDocument );
  198. var win = $('frame:first')[0].contentWindow;
  199. var btnKey = '';
  200. if(!fulltimer)
  201. fulltimer = (win.fulltimer)?win.fulltimer:win.timer ;
  202. $('#buttons',doc).show();
  203. div.text('wait: '+ (fulltimer--)+ ' - timeout: '+ iframeLoad);
  204. if(fulltimer == -10 ){
  205. $('frame:last').remove();
  206. setTimeout(function(){
  207. wparent.opener.success('');
  208. },1000);
  209. }
  210. if($('#timer',doc).text().indexOf('Click') >= 0 || $('#timer img:visible',doc).size()){
  211. clearInterval(intersAds);
  212. function ajaxRec(btnKey){
  213. $.ajax({
  214. url : 'gpt.php?v=verify&buttonClicked='+btnKey+'&id='+win.id+'&type='+win.type+'&pretime='+win.pretime+'&'+win.url_variables
  215. }).complete(function(a,b){
  216. console.log(a)
  217. console.log(b)
  218. if(a.responseText.indexOf('You clicked the wrong number')>=0){
  219. btnKey++;
  220. ajaxRec(btnKey)
  221. }
  222. else if(wparent.location.href.indexOf('type=ce') != -1){
  223. wparent.location.reload()
  224. }
  225. else{
  226. $('frame:last').remove();
  227. setTimeout(function(){
  228. wparent.opener.success('');
  229. },5000);
  230. }
  231. })
  232. }
  233. var primeImg = $('#timer img',doc);
  234. if(primeImg.size()){
  235. function gameClick(){
  236. function decode(img,pos){
  237. var canvas = document.createElement('canvas');
  238. canvas.width = primeImg.width();
  239. canvas.height = primeImg.height();
  240. var ctx = canvas.getContext('2d');
  241. // Draw image on canvas to get its pixel data
  242. ctx.drawImage(img, pos, 0);
  243. // Get image pixels
  244. var imageData = ctx.getImageData(0, 0, canvas.width, canvas.height);
  245. var pixels = imageData.data;
  246. return pixels;
  247. }
  248. var arrPos = [];
  249. if($('#buttons > img',doc).size()){
  250. var imgsrc = ($('#buttons > div',doc).attr('style').match(/url\([^]+\)/)[0].replace('url(','').replace(')',''))
  251. var imgobj = $('<img>').attr({src:imgsrc})
  252. $.each($('#buttons .highlight',doc),function(k,v){
  253. if(k == 0)
  254. arrPos.push(decode(imgobj[0],0))
  255. else
  256. arrPos.push(decode(imgobj[0],'-'+(primeImg.width()*k)))
  257. })
  258. }
  259. else{
  260. $.each($('#buttons img',doc),function(k,v){
  261. arrPos.push(decode(v,0))
  262. });
  263. }
  264. var img1 = decode(primeImg[0],0);
  265. var checker = [];
  266. $.each(arrPos,function(k,v){
  267. var v = 0;
  268. for(i=0;i<img1.length;i++){
  269. if(img1[i] == arrPos[k][i]){
  270. v++;
  271. }
  272. }
  273. checker.push(v)
  274. });
  275. btnKey = checker.indexOf(Math.max.apply(Math, checker)) ;
  276. console.log(checker)
  277. console.log(btnKey)
  278. ajaxRec(btnKey);
  279. }
  280. primeImg.load(function(){gameClick();}).ready(function(){gameClick();}).error(function(){wparent.opener.success('fail');});
  281. }
  282. else{
  283. var key = $('#timer',doc).text().replace('Click ','');
  284. $.each($('#buttons img',doc),function(k,v){
  285. if($(v).attr('src').indexOf(key) >= 0){
  286. btnKey = k;
  287. }
  288. });
  289. console.log(btnKey)
  290. ajaxRec(btnKey);
  291. }
  292. }
  293. },1000);
  294. }
  295. }

comments powered by Disqus