Skip to content

Commit

Permalink
Update Program.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
ibuckshot5 authored Jul 13, 2017
1 parent 907f4e1 commit 6a5ac22
Showing 1 changed file with 31 additions and 26 deletions.
57 changes: 31 additions & 26 deletions Program.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
using System;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Threading.Tasks;
using Entropy.Captcha;
using Entropy.Proxy.Pool;
using Entropy.Proxy.Schema;
using Newtonsoft.Json;
using Troschuetz.Random;

Expand Down Expand Up @@ -87,35 +88,39 @@ public static async void Run(string[] args)
{
tasks.Add(new Task(async () =>
{
var username = random.Choice(config.Usernames.Prefix) + random.Choice(config.Usernames.Root) +
random.Choice(config.Usernames.Suffix);
var password = config.Password.UseStaticPassword ? config.Password.StaticPassword : String.Empty;
var proxy = proxyPool.NextProxy();
var ui = new AccountCreationOptions
ActiveProxies++;
for (var x = 0; x < 5; x++)
{
CaptchaService = captcha,
Dob = $"{random.Next(1970, 2000)}-{FormatPTCNumber(random.Next(1, 12))}-{FormatPTCNumber(random.Next(1, 27))}",
Proxy = proxy.ToWebProxy(),
Username = username,
Password = password
};
var username = random.Choice(config.Usernames.Prefix) + random.Choice(config.Usernames.Root) +
random.Choice(config.Usernames.Suffix);
var password = config.Password.UseStaticPassword ? config.Password.StaticPassword : String.Empty;
var ui = new AccountCreationOptions
{
CaptchaService = captcha,
Dob = $"{random.Next(1970, 2000)}-{FormatPTCNumber(random.Next(1, 12))}-{FormatPTCNumber(random.Next(1, 27))}",
Proxy = proxy.ToWebProxy(),
Username = username,
Password = password
};
var res = await Creator.Create(ui);
var res = await Creator.Create(ui);
if (res.Successful)
{
Created++;
UpdateStats();
await Creator.HandleAccountAfterCreation(config, res);
}
else
{
Failed++;
UpdateStats();
if (res.Successful)
{
Created++;
UpdateStats();
await Creator.HandleAccountAfterCreation(config, res);
}
else
{
Failed++;
UpdateStats();
}
}
BenchedProxies++;
}));
}

Expand All @@ -133,4 +138,4 @@ public static void UpdateStats()
$"{ActiveProxies}\nBenched proxies: {BenchedProxies}");
}
}
}
}

0 comments on commit 6a5ac22

Please sign in to comment.