Created
January 24, 2020 18:44
-
-
Save SamuelTulach/233e88b53d9c94eb63fcfa84d3995351 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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