0
mirror of https://github.com/sampletext32/ParkanPlayground.git synced 2025-06-20 08:18:36 +03:00

Fixed DLL name display and console input handling in the disassembler

This commit is contained in:
bird_egop
2025-04-12 18:44:51 +03:00
parent 9b5ec7e0d6
commit d73cccd3c5

View File

@ -50,8 +50,9 @@ internal class Program
DisassembleCodeSections(peFormat); DisassembleCodeSections(peFormat);
Console.WriteLine(); Console.WriteLine();
Console.WriteLine("Press any key to exit..."); Console.WriteLine("Press Enter to exit...");
Console.ReadKey(); Console.Read(); // Use Read instead of ReadKey to avoid errors in redirected console
} }
catch (Exception ex) catch (Exception ex)
{ {
@ -91,7 +92,7 @@ internal class Program
if (peFormat.ExportDirectory != null) if (peFormat.ExportDirectory != null)
{ {
Console.WriteLine("\nExported Functions:"); Console.WriteLine("\nExported Functions:");
Console.WriteLine($"DLL Name: {peFormat.ExportDirectory.Name}"); Console.WriteLine($"DLL Name: {peFormat.ExportDirectory.DllName}");
Console.WriteLine($"Number of Functions: {peFormat.ExportDirectory.NumberOfFunctions}"); Console.WriteLine($"Number of Functions: {peFormat.ExportDirectory.NumberOfFunctions}");
Console.WriteLine($"Number of Names: {peFormat.ExportDirectory.NumberOfNames}"); Console.WriteLine($"Number of Names: {peFormat.ExportDirectory.NumberOfNames}");
@ -111,7 +112,7 @@ internal class Program
for (int i = 0; i < peFormat.ImportDescriptors.Count; i++) for (int i = 0; i < peFormat.ImportDescriptors.Count; i++)
{ {
var descriptor = peFormat.ImportDescriptors[i]; var descriptor = peFormat.ImportDescriptors[i];
Console.WriteLine($" DLL: {descriptor.Name}"); Console.WriteLine($" DLL: {descriptor.DllName}");
for (int j = 0; j < descriptor.Functions.Count; j++) for (int j = 0; j < descriptor.Functions.Count; j++)
{ {