Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
official-notfishvr authored Aug 31, 2024
1 parent 6ef989c commit 02ebbf3
Show file tree
Hide file tree
Showing 3 changed files with 190 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Fish Tools/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public static void MainMenu()
Console.ReadKey();
break;
case ConsoleKey.D0:
Console.Clear();
Console.Clear();
MainMenu();
break;
}
Expand Down Expand Up @@ -180,8 +180,7 @@ public static void MainMenu()
case ConsoleKey.D3:
Console.Clear();
Logger.PrintArt();
//DiscordTools.DiscordToolsMenu(Logger);
Remove_Stuff.doit();
DiscordTools.DiscordToolsMenu(Logger);
break;
case ConsoleKey.D4:
Console.Clear();
Expand Down
76 changes: 76 additions & 0 deletions Fish Tools/core/Misc Tools/Alphabetical Text.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
/*
------------------------------------------------------------
Made By notfishvr
github: https://github.com/official-notfishvr/Fish-Tools
------------------------------------------------------------
*/
namespace Fish_Tools.core.MiscTools
{
// not done
internal class Alphabetical_Text
{
public static void Main()
{
string filePath = @"C:\Users\notfishvr\Downloads\test.txt";

try
{
var lines = File.ReadAllLines(filePath);
var sortedLines = lines.OrderBy(line => line).ToArray();

File.WriteAllLines(filePath, sortedLines);

Console.WriteLine("The file has been sorted alphabetically.");
Console.ReadKey();
}
catch (Exception ex)
{
Console.WriteLine($"An error occurred: {ex.Message}");
Console.ReadKey();
}
}
public static void Main2()
{
string filePath = @"C:\Users\notfishvr\Downloads\test.txt";

try
{
string content = File.ReadAllText(filePath);
var lines = content.Split('\n')
.Select(line => line.Trim())
.Where(line => !string.IsNullOrWhiteSpace(line))
.ToList();

var entries = new Dictionary<string, string>();

foreach (var line in lines)
{
var parts = line.Split(':', 2);
if (parts.Length == 2)
{
var key = parts[0].Trim();
var value = parts[1].Trim();
if (!entries.ContainsKey(key))
{
entries[key] = value;
}
}
}

var sortedEntries = entries
.OrderBy(entry => entry.Key)
.Select(entry => $"{entry.Key}: {entry.Value}")
.ToArray();


File.WriteAllLines(filePath, sortedEntries);

Console.WriteLine("The file has been sorted alphabetically and formatted.");
}
catch (Exception ex)
{
Console.WriteLine($"An error occurred: {ex.Message}");
}
}
}
}
112 changes: 112 additions & 0 deletions Fish Tools/core/Misc Tools/Combo Editer.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
/*
------------------------------------------------------------
Made By notfishvr
github: https://github.com/official-notfishvr/Fish-Tools
------------------------------------------------------------
*/

using Fish_Tools.core.Utils;
using System;
using System.IO;
using System.Linq;

namespace Fish_Tools.core.MiscTools
{
internal class ComboEditor
{
private static bool _comboLoaded = false;
private static string[] _combos;
private static string _combosPath;

public static void Main(Logger logger)
{
Console.Clear();
Console.Title = "Fish Tools";
logger.PrintArt();

if (!_comboLoaded)
{
logger.Info("Path to Combos:");
_combosPath = Console.ReadLine();

if (File.Exists(_combosPath))
{
_combos = File.ReadAllLines(_combosPath);
_comboLoaded = true;
Main(logger);
}
else
{
logger.Error("File not found. Please check the path and try again.");
Console.ReadKey();
return;
}
}
else
{
Console.Clear();
Console.Title = "Fish Tools";
logger.PrintArt();
logger.WriteBarrierLine("1", "Remove Spaces");
logger.WriteBarrierLine("2", "Remove That Is Not email:pass");
logger.WriteBarrierLine("3", "Add ':' After email");
logger.WriteBarrierLine("0", "Save Combos");
Console.Write("-> ");

ConsoleKey Choice = Console.ReadKey().Key;
switch (Choice)
{
case ConsoleKey.D1:
_combos = _combos
.Select(line => line.Trim())
.Where(line => !string.IsNullOrWhiteSpace(line))
.ToArray();
Console.WriteLine();
logger.Success("Spaces removed from combos.");
Console.ReadKey();
Main(logger);
break;
case ConsoleKey.D2:

if (_combos != null) { for (int i = 0; i < _combos.Length; i++) { int index = _combos[i].IndexOf(" "); if (index != -1) { _combos[i] = _combos[i].Substring(0, index); } } }

Console.WriteLine();
logger.Success("Non email:pass parts removed and saved to output file.");
Console.ReadKey();
Main(logger);
break;
case ConsoleKey.D3:
string fileContent = File.ReadAllText(_combosPath);
string updatedContent = fileContent.Replace(".com", ".com:");
logger.Success("add ':' After email.");
Console.ReadKey();
Main(logger);
break;
case ConsoleKey.D0:
if (!string.IsNullOrEmpty(_combosPath) && _combos != null)
{
string directory = Path.GetDirectoryName(_combosPath);
string fileName = Path.GetFileName(_combosPath);
string newFileName = "new_" + fileName;
string newFilePath = Path.Combine(directory, newFileName);

File.WriteAllLines(newFilePath, _combos);
Console.WriteLine();
logger.Success("Combos saved successfully.");
Console.ReadKey();
Main(logger);
}
else
{
logger.Error("No combos loaded or invalid path.");
Console.ReadKey();
}
break;
default:
logger.Warn("Invalid option selected.");
break;
}
}
}
}
}

0 comments on commit 02ebbf3

Please sign in to comment.