Advertisement
Guest User

Untitled

a guest
Apr 16th, 2013
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 12.59 KB | None | 0 0
  1. private void Hashtags(object eml1)
  2.         {
  3.             Hasht:
  4.             Email eml = (Email)eml1;
  5.                 _totalAccs++;
  6.                 string prox = "";
  7.                 try
  8.                 {
  9.                     prox = _proxies[new Random().Next(0, _proxies.Count)];
  10.                     _proxies.Remove(prox);
  11.                 }
  12.                 catch
  13.                 {
  14.                     foreach (var proxy in _proxyBox.Lines)
  15.                     {
  16.                         _proxies.Add(proxy);
  17.                     }
  18.                     goto Hasht;
  19.                 }
  20.                 TwAnswer rd;
  21.                 TwAnswer mfsCheck = null;
  22.                 Match authenticity_token;
  23.  
  24.             Login:
  25.                 try
  26.                 {
  27.                     // if (_start)
  28.                     //   Thread.CurrentThread.Abort();
  29.                     //Email eml = (Email)eml1;
  30.                     TwiCon _bc = new TwiCon(null);
  31.                     //Log(eml.login + " парсим информацию для логина");
  32.                     rd = _bc.Proceed("GET", "https://mobile.twitter.com/session/new", null, prox, null, 15);
  33.                     mfsCheck = _bc.Proceed("GET", "http://geshout.com/unfollowtool.php", null, prox, null, 15);
  34.                     Match m = Regex.Match(mfsCheck.ResponseBody, "<a href=\"https://twitter\\.com/oauth/authorize\\?oauth_token=(.*?)\">");
  35.                     string auth_key = m.Groups[1].Value;
  36.                     mfsCheck = _bc.Proceed("GET", "https://twitter.com/oauth/authorize?oauth_token=" + auth_key, null, prox, null, 15);
  37.                     authenticity_token = Regex.Match(mfsCheck.ResponseBody, @"name=""authenticity_token"" type=""hidden"" value=""(.*?)""");
  38.                     //mfsCheck = _bc.Proceed("POST", "https://twitter.com/oauth/authorize", "authenticity_token=" + authenticity_token.Groups[1].Value + "&oauth_token=" + auth_key + "&session%5Busername_or_email%5D=" + eml.login + "&session%5Bpassword%5D=" + eml.password, prox, null, 15);
  39.                     //TwAnswer rd = _bc.Proceed("GET", "https://twitter.com", null, prox, null, 15);
  40.                     //authenticity_token = Regex.Match(rd.ResponseBody, @"name=""authenticity_token"" type=""hidden"" value=""(.*?)""");
  41.                     //Log(eml.login + " авторизуемся");
  42.                     //Log(eml.login + " авторизуемся");
  43.                     // rd = _bc.Proceed("POST", "https://mobile.twitter.com/session", "authenticity_token=" + authenticity_token.Groups[1].Value + "&username=" + eml.login + "&password=" + eml.password + "&commit=Einloggen", prox, null, 15);
  44.                     rd = _bc.Proceed("POST", "https://twitter.com/oauth/authorize", "authenticity_token=" + authenticity_token.Groups[1].Value + "&oauth_token=" + auth_key + "&session%5Busername_or_email%5D=" + eml.login + "&session%5Bpassword%5D=" + eml.password, prox, null, 15);
  45.                     //Log(eml.login + " авторизовались");
  46.                     rd = _bc.Proceed("GET", "https://twitter.com/AsyncCallback", null, prox, null, 15);
  47.                     //rd = rd;
  48.                     //RestClient rc = new RestClient();
  49.                     //rc.AddDefaultHeader("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8");
  50.                     //rc.AddDefaultHeader("Accept-Charset", "ISO-8859-1,utf-8;q=0.7,*;q=0.3");
  51.                     //rc.AddDefaultHeader("User-Agent", "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0");
  52.                     //rc.AddDefaultHeader("Referrer", "https://twitter.com/oauth/authorize?oauth_token=" + auth_key);
  53.                     //rc.CookieContainer = _bc._cookies;
  54.                     //IRestRequest req = new RestRequest("https://twitter.com", Method.GET);
  55.                     //IRestResponse resp = rc.Execute(req);
  56.                     //resp = resp;
  57.  
  58.                     //rd = _bc.Proceed("POST", "https://twitter.com/sessions", "session%5Busername_or_email%5D=" + eml.login + "&session%5Bpassword%5D=" + eml.password + "&return_to_ssl=true&scribe_log=&redirect_after_login=%2F%3Flang%3Dru&authenticity_token=" + authenticity_token.Groups[1].Value, prox, null, 15);
  59.                     bool capt = false;
  60.                     //if (rd.ResponseBody.Contains("captcha"))
  61.                     //{
  62.                     //    capt = true;
  63.                     //    //rd = _bc.Proceed("GET", "https://twitter.com/login/captcha?username_or_email" + eml.login, null, prox, null, 15);
  64.                     //    Match image_link = Regex.Match(rd.ResponseBody, @"src=""https://www.google.com/recaptcha/api/challenge?k=(.*?)&lang=de""></script>");
  65.                     //    rd = _bc.Proceed("GET", "https://www.google.com/recaptcha/api/challenge?k=" + image_link.Groups[1].Value + "&lang=en", null, null, null, 15);
  66.                     //    image_link = Regex.Match(rd.ResponseBody, @"challenge : ''(.*?)''");
  67.                     //    ConnectionManager cm = new ConnectionManager();
  68.                     //    HttpWebResponse cap = cm.Proceed("GET", "https://www.google.com/recaptcha/api/image?c=" + image_link.Groups[1].Value, null, null, null, 100500);
  69.  
  70.                     //    PostData pd = new PostData();
  71.                     //    pd.AntigateEvent += LogAGEvent;
  72.                     //    pd.Captcha("3387b524515ce7dcac7cb424bbfb9057", cap, false, null, 0, "captcha.png");
  73.                     //    string cap_good = pd._captcha;
  74.                     //    rd = _bc.Proceed("POST", "https://twitter.com/sessions", "session%5Busername_or_email%5D=" + eml.login + "&session%5Bpassword%5D=" + eml.password + "&return_to_ssl=true&scribe_log=&redirect_after_login=%2F%3Flang%3Dru&recaptcha_challenge_field=" + image_link.Groups[1].Value + "&recaptcha_response_field=" + cap_good + "&authenticity_token=" + authenticity_token.Groups[1].Value, prox, null, 15);
  75.                     //}
  76.                     //  TwAnswer rd = _bc.Proceed("POST", "https://mobile.twitter.com/session", "authenticity_token=" + authenticity_token.Groups[1].Value + "&username=" + eml.login + "&password=" + eml.password + "&commit=Einloggen", prox, null, 15);
  77.                     //if (!capt)
  78.                     //{
  79.                     //    rd = _bc.Proceed("GET", "https://twitter.com/" + eml.login, null, prox, null, 15);
  80.                     //}
  81.                     //authenticity_token = Regex.Match(rd.ResponseBody, @"value=""(.*?)"" name=""authenticity_token""");
  82.                     //Log(eml.login + " авторизовались");
  83.                     //_loggedCount++;
  84.                     //Invoke((MethodInvoker)delegate
  85.                     //{
  86.                     //    _loggedLabel.Text = "Залогинено: " + _loggedCount.ToString() + "/" + _totalAccs.ToString();
  87.                     //});
  88.                     //Log(eml.login + " ретвитим");
  89.                     //if (_start)
  90.                     //    Thread.CurrentThread.Abort();
  91.                    // rd = _bc.Proceed("GET", _rtBox.Text, null, prox, null, 15);
  92.                     //Match tw_id = Regex.Match(_rtBox.Text, @"/([\d]+)$");
  93.                     string twid = eml.twStatus.ToString();
  94.                     rd = _bc.Proceed("GET", "https://twitter.com/menko_kirill/status/" + twid, null, prox, null, 15);
  95.                     authenticity_token = Regex.Match(rd.ResponseBody, @"type=""hidden"" value=""(.*?)"" name=""authenticity_token""");
  96.                     rd = _bc.Proceed("POST", "https://twitter.com/i/tweet/retweet", "authenticity_token=" + authenticity_token.Groups[1].Value + "&id=" + twid, prox, null, 15);
  97.                     //_retweets++;
  98.                     //Invoke((MethodInvoker)delegate
  99.                     //{
  100.                     //    _rtLabel.Text = "Retweets: " + _retweets.ToString();
  101.                     //});
  102.                     Log("Success : " + eml.login + " ретвитнули");
  103.                     //_retweets++;
  104.                     //Invoke((MethodInvoker)delegate
  105.                     //{
  106.                     //    _rtLabel.Text = "Ретвитов: " + _retweets.ToString();
  107.                     //});
  108.                     //return;
  109.                     //for (; ; )
  110.                     //{
  111.                     //    if (_start)
  112.                     //    {
  113.                     //        break;
  114.                     //    }
  115.                     //    else
  116.                     //    {
  117.                     //        Log(eml.login + " залогинены, ждем 5 секунд, пока программу не запустят");
  118.                     //        Thread.Sleep(5000);
  119.                     //    }
  120.                     //}
  121.                     //for (; ; )
  122.                     //{
  123.                     //    Random rand = new Random();
  124.                     //    string randomTweet = _tweets[rand.Next(0, _tweets.Count)];
  125.                     //    _tweets.Remove(randomTweet);
  126.                     //    //TwAnswer rd = _bc.Proceed("GET", "https://mobile.twitter.com/compose/tweet", null, prox, null, 15);
  127.                     //    TwAnswer rd = _bc.Proceed("GET", "https://twitter.com/AsyncCallback", null, prox, "https://twitter.com/?lang=ru", 15);
  128.                     //    authenticity_token = Regex.Match(rd.ResponseBody, @"value=""(.*?)"" name=""authenticity_token""");
  129.                     //    //authenticity_token = Regex.Match(rd.ResponseBody, @"name=""authenticity_token"" type=""hidden"" value=""(.*?)""");
  130.                     //    Log(eml.login + " пишем твит");
  131.                     //    rd = _bc.Proceed("POST", "https://twitter.com/i/tweet/create",
  132.                     //                             "authenticity_token=" + authenticity_token.Groups[1].Value + "&place_id=" +
  133.                     //                             eml.geotag + "&status=" +
  134.                     //                             System.Web.HttpUtility.UrlEncode(_hashBox.Text + " " + randomTweet),
  135.                     //                             prox, null, 15);
  136.                     //    Log(eml.login + " твит отправлен");
  137.                     //   // rd = _bc.Proceed("POST", "https://mobile.twitter.com", "authenticity_token=" + authenticity_token.Groups[1].Value + "&tweet%5Btext%5D=" + System.Web.HttpUtility.UrlEncode(_hashBox.Text + " " + randomTweet) + "&commit=Tweet", prox, null, 15);
  138.                     //    //try
  139.                     //    //{
  140.                     //    //    rd = _bc.Proceed("POST", "https://twitter.com/i/tweet/create", "authenticity_token=" + authenticity_token.Groups[1].Value + "&lang=ru&place_id=&status=" + System.Web.HttpUtility.UrlEncode(randomTweet + " #БольшойТелевизор"), null, null, 15);
  141.                     //    //}
  142.                     //    //catch
  143.                     //    //{
  144.                     //    //    goto Login;
  145.                     //    //}
  146.                     //    //rd = _bc.Proceed("GET", "https
  147.                     //    _hashtags++;
  148.                     //    Invoke((MethodInvoker)delegate
  149.                     //    {
  150.                     //        _htLabel.Text = "Хештегов: " + _hashtags.ToString();
  151.                     //    });
  152.                     //    Log(eml.login + " твит отправлен");
  153.                     //    //Log(eml.login + " ретвитим");
  154.                     //    //rd = _bc.Proceed("GET", "https://mobile.twitter.com/statuses/315510669753581569/retweet", null, null, null, 15);
  155.                     //    //authenticity_token = Regex.Match(rd.ResponseBody, @"name=""authenticity_token"" type=""hidden"" value=""(.*?)""");
  156.                     //    //rd = _bc.Proceed("POST", "https://mobile.twitter.com/statuses/315510669753581569/retweet", "authenticity_token=" + authenticity_token.Groups[1].Value + "&tweet_id=315510669753581569&_method=POST&return_url=%2FAsyncCallback%23tweet_315510669753581569&commit=Retweeten", null, null, 15);
  157.                     //    //Log(eml.login + " ретвитнули");
  158.                     //    Log(eml.login + " спим 40 секунд");
  159.                     //   // return;
  160.                     //    System.Threading.Thread.Sleep(40000);
  161.                     //}
  162.                 }
  163.                 catch
  164.                 {
  165.                     try
  166.                     {
  167.                         prox = _proxies[new Random().Next(0, _proxies.Count)];
  168.                         _proxies.Remove(prox);
  169.                     }
  170.                     catch
  171.                     {
  172.                         foreach (var proxy in _proxyBox.Lines)
  173.                         {
  174.                             _proxies.Add(proxy);
  175.                         }
  176.                     }
  177.                     goto Login;
  178.                 }
  179.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement