Ok so I had this injector executable code in another project Console, is this correct?…
- User
Ok so I had this injector executable code in another project Console, is this correct?
Heres the injector code
using System.Reflection; using System; using System.Linq;
public class Program { public static void Main(string[] args) { ReflectionVerifier.ListAllClassesAndMethods("SFD"); } }
public class ReflectionVerifier { public static void ListAllClassesAndMethods(string namespaceName) { try { Type[] types = Assembly.GetExecutingAssembly().GetTypes() .Where(t => t.Namespace == namespaceName) .ToArray();
codebool foundPlayerClass = false; foreach (Type type in types) { if (type.Name == "Player") { foundPlayerClass = true; } } if (!foundPlayerClass) { Console.WriteLine("SFD.Player class not found."); return; } if (types.Length == 0) { Console.WriteLine($"No other classes found in namespace '{namespaceName}'."); return; } foreach (Type type in types) { Console.WriteLine($"Class: {type.Name}"); // ... } } catch (Exception ex) { Console.WriteLine($"Error listing classes and methods: {ex.Message}"); } }}
And heres the classlibrary.dll code
using HarmonyLib; using SFD; // Assuming SFD.Player is the correct namespace for the Player class using System.IO; // Namespace for file input/output
namespace SuperFightersDeluxeCustomJump { public class EntryPoint { // The game (or whatever process you’re injecting into) needs to call this method to start the patching process. public static void Init() { var harmony = new Harmony("com.yourdomain.superfightersdeluxecustomjump"); harmony.PatchAll();
code - Assistant
The injector code you've provided does seem intended to list classes and methods in a certain namespace from the executing assembly. However, there are a couple of issues with the code and its purpose as an injector.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.