Skip to content
This repository has been archived by the owner on Sep 9, 2022. It is now read-only.

Commit

Permalink
Bugfixes and QOL changes
Browse files Browse the repository at this point in the history
  • Loading branch information
anqueue committed Sep 29, 2021
1 parent c80b3b7 commit 95d1ba7
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions Toolerino/Toolerino.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ namespace Toolerino
{
public partial class Toolerino : Form
{
string version = "1.3.0";
string version = "1.3.1";
string accessToken = "";

[DllImport("kernel32.dll", SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
Expand Down Expand Up @@ -191,15 +192,18 @@ private async void b_runList_Click(object sender, EventArgs e)
return;
}
}
string[] loginList = tb_list.Text.Split(new char[] { '\r', '\n' }).Where(x => !String.IsNullOrEmpty(x)).ToArray();

string[] loginList = tb_list.Text.Split(new char[] { '\r', '\n' }).Select(x => x.Trim()).Where(x => !String.IsNullOrEmpty(x)).ToArray();

HttpClient httpClient = new HttpClient();
httpClient.DefaultRequestHeaders.Clear();


System.Diagnostics.Process.Start("https://toolerino-oauth.mrauro.dev");
string accessToken = Interaction.InputBox("Please enter the access token the webpage that just opened (https://toolerino-oauth.mrauro.dev/)", "Toolerino", "");
if (string.IsNullOrWhiteSpace(accessToken)) return;
if (string.IsNullOrWhiteSpace(accessToken))
{
System.Diagnostics.Process.Start("https://toolerino-oauth.mrauro.dev");
accessToken = Interaction.InputBox("Please enter the access token the webpage that just opened (https://toolerino-oauth.mrauro.dev/)", "Toolerino", "");
if (string.IsNullOrWhiteSpace(accessToken)) return;
}


httpClient.DefaultRequestHeaders.Add("Authorization", $"Bearer {accessToken}");
Expand Down Expand Up @@ -244,6 +248,7 @@ private async void b_runList_Click(object sender, EventArgs e)

// Console.WriteLine("USERIDS");
// Console.WriteLine(String.Join("\n", userIds));
Console.WriteLine($"{DateTime.Now.ToString("HH:mm:ss.fff")} Found {userIds.Count} valid user IDs");

// block each user
Console.WriteLine($"{DateTime.Now.ToString("HH:mm:ss.fff")} Blocking users");
Expand Down

0 comments on commit 95d1ba7

Please sign in to comment.