Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading;
- using System.Net;
- using System.Net.Http;
- namespace nigger
- {
- class Program
- {
- static void Main(string[] args)
- {
- string[] proxies = GetProxies();
- string state = "dislike";
- string id = "121056";
- foreach (var proxy in proxies)
- {
- new Thread(async () =>
- {
- CookieContainer cookies = new CookieContainer();
- HttpClientHandler handler = new HttpClientHandler();
- handler.Proxy = new WebProxy(proxy);
- handler.CookieContainer = cookies;
- HttpClient client = new HttpClient(handler);
- try
- {
- await client.GetAsync("https://speedporn.net/");
- Rate(client, id, state);
- Console.WriteLine(state + "d!");
- }
- catch (HttpRequestException)
- {
- Console.WriteLine("Proxy error");
- }
- catch
- {
- Console.WriteLine("Unknown error");
- }
- }).Start();
- }
- }
- private static async void Rate(HttpClient client, string postId, string state)
- {
- try
- {
- string doc = await client.GetStringAsync("https://speedporn.net/?p=" + postId);
- string nonce = GetNonce(doc);
- var content = new StringContent($"action=post-like&nonce={nonce}&post_like={state}&post_id={postId}", Encoding.UTF8, "application/x-www-form-urlencoded");
- await client.PostAsync("https://speedporn.net/wp-admin/admin-ajax.php", content);
- }
- catch (HttpRequestException)
- {
- Console.WriteLine("Proxy error");
- }
- }
- private static string GetNonce(string doc)
- {
- string subStr = "\"nonce\":\"";
- string sub = doc.Substring(doc.IndexOf(subStr) + subStr.Length);
- sub = sub.Split('"')[0];
- return sub;
- }
- private static string[] GetProxies()
- {
- HttpClient client = new HttpClient();
- string resp = client.GetStringAsync("https://api.proxyscrape.com/?request=getproxies&proxytype=http").Result;
- return resp.Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement