Skip to content

Instantly share code, notes, and snippets.

@SamuelTulach
Created January 24, 2020 18:44
Show Gist options
  • Save SamuelTulach/233e88b53d9c94eb63fcfa84d3995351 to your computer and use it in GitHub Desktop.
Save SamuelTulach/233e88b53d9c94eb63fcfa84d3995351 to your computer and use it in GitHub Desktop.
using RestSharp;
using RestSharp.Authenticators;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace fbspam
{
class Program
{
private static Random random = new Random();
public static string RandomString(int length)
{
const string chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
return new string(Enumerable.Repeat(chars, length)
.Select(s => s[random.Next(s.Length)]).ToArray());
}
static int requests = 0;
static int orequests = 0;
static int second = 0;
static string status = "";
static string oneline = "";
static int threadnum = 0;
static void LoopThread()
{
threadnum++;
int thisth = threadnum;
while (true)
{
var client = new RestClient("https://new.appvideososc.com/");
var request = new RestRequest("login.php", DataFormat.Json);
request.AddParameter("email", RandomString(20) + "@gmail.com");
request.AddParameter("pass", RandomString(50));
request.AddParameter("wkr", "sofoke");
var response = client.Get(request);
requests++;
string lstatus = response.StatusCode.ToString();
string loneline = response.Content.Replace("\n", "").Replace(" ", "");
status = lstatus;
status = loneline;
//Console.WriteLine(response.StatusCode);
//Console.WriteLine("R: " + requests);
Console.Write("\rID: " + thisth + " S: " + lstatus + " T: " + requests + " O: " + second + "/second ");
}
}
static void Main(string[] args)
{
Console.Write("Threads: ");
int threads = Int32.Parse(Console.ReadLine());
for (int i = 0; i < threads; i++)
{
//Task.Run(() => LoopThread());
var t = new Thread(() => LoopThread());
t.Start();
Thread.Sleep(1);
}
while(true)
{
int total = requests - orequests;
//Console.WriteLine($"R: {requests} O: {total}/second S: {status} C: {oneline}");
orequests = requests;
second = total;
Thread.Sleep(1000);
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment