Skip to content

Instantly share code, notes, and snippets.

@trungnt2910
Created September 21, 2022 14:47
Show Gist options
  • Save trungnt2910/e5815dba53170611d0f00352e5ad6b09 to your computer and use it in GitHub Desktop.
Save trungnt2910/e5815dba53170611d0f00352e5ad6b09 to your computer and use it in GitHub Desktop.
Fuck phishing
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net48;net6.0</TargetFrameworks>
<LangVersion>Latest</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="System.Net.Http" Version="4.3.4" Condition="'$(TargetFramework)' == 'net48'" />
</ItemGroup>
</Project>
//const string phishingSite = "http://timeshpg.com/";
const string phishingSite = "http://desertdogscycles.com/";
const int numberOfWorkers = 16;
string[] suffix = new[] { "dz", "provip", "2k3", "2k5", "2k4", "90", "91", "92", "93", "97", "vippro", "super", "premium" };
Random rand = new();
HttpClient client = new();
CancellationTokenSource cancellationTokenSource = new();
var accountsSpammed = 0;
var dateStart = DateTime.Now;
var tasks = new List<Task>();
Console.CancelKeyPress += Console_CancelKeyPress;
object writeLock = new();
for (int i = 0; i < numberOfWorkers; ++i)
{
tasks.Add(Work(cancellationTokenSource.Token));
}
async Task Work(CancellationToken? token)
{
token ??= CancellationToken.None;
try
{
while (!token.Value.IsCancellationRequested)
{
var email = $"{RandomString()}{suffix[rand.Next(0, suffix.Length - 1)]}@gmail.com";
var pwd = RandomString();
var response = await client.PostAsync(phishingSite, new FormUrlEncodedContent(
new Dictionary<string, string>()
{
{ "email", email },
{ "pass", pwd },
{ "login", "" }
}
), token.Value);
lock (writeLock)
{
if (response.IsSuccessStatusCode)
{
Console.WriteLine("Spammed phishing server with fake account:");
Console.WriteLine(email);
Console.WriteLine(pwd);
++accountsSpammed;
Console.WriteLine($"Total number of accounts spammed: {accountsSpammed}");
}
else
{
Console.WriteLine("Phishing server spam attempt failed with account:");
Console.WriteLine(email);
Console.WriteLine(pwd);
Console.WriteLine($"Status code: {response.StatusCode}.");
}
}
}
}
catch (TaskCanceledException)
{
return;
}
}
await Task.Delay(-1);
async void Console_CancelKeyPress(object sender, ConsoleCancelEventArgs e)
{
Console.WriteLine("Attempting to stop the spam workers...");
cancellationTokenSource.Cancel();
await Task.WhenAll(tasks);
Console.WriteLine($"Spammed a total of {accountsSpammed} accounts to \"{phishingSite}\" after {DateTime.Now - dateStart}.");
Environment.Exit(0);
}
string RandomString()
{
return new string(Enumerable.Range(0, rand.Next(5, 20)).Select(i => (char)rand.Next('a', 'z')).ToArray());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment