stuppid_bot

Untitled

Jun 7th, 2013
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (function getPhotos(offset, photos) {
  2.     ajax.post('album84841182_000', {al: 1, offset: offset, part: 1}, {
  3.         onDone: function(a, b) {
  4.             if (b == '') {                
  5.                 // console.log(photos);              
  6.                 var _ = 0, psto = {
  7.                     al: 1,
  8.                     act: 'a_send',
  9.                     hash: cur.tabs[cur.peer].hash,
  10.                     media: '',
  11.                     msg: '',
  12.                     title: '',
  13.                     to: cur.peer,
  14.                     ts: 'хуй'
  15.                 };
  16.  
  17.                 spam = function() {
  18.                     var interval = setInterval(function() {
  19.                         if ( !geByClass('captcha')[0] ) {
  20.                             clearInterval(interval);
  21.                             psto.media = 'photo:' + photos[_];
  22.                             ajax.post('al_im.php', psto, { onDone: function() { console.log('сообщение отправлено'); } });
  23.                            
  24.                             if (++_ < photos.length) {
  25.                                 spam();            
  26.                             }
  27.                         }
  28.                     }, 5000);
  29.                 };
  30.                
  31.                 return spam();
  32.             }
  33.  
  34.             b.replace(/showPhoto\('([^']+)/g, function(c, d) {
  35.                 photos.push(d);
  36.             });
  37.  
  38.             setTimeout(getPhotos, 1000, a, photos);
  39.         },
  40.  
  41.         onFail: function() {
  42.             setTimeout(getPhotos, 1000, offset, photos);
  43.         }
  44.     });
  45. })(0, []);
Advertisement
Add Comment
Please, Sign In to add comment