From a81b2707c9418aab14e62522b2e28b8746fb6172 Mon Sep 17 00:00:00 2001 From: Katy Coe Date: Thu, 6 Aug 2020 05:29:41 +0200 Subject: [PATCH] Change references to IDA to generic 'Python script' --- Il2CppInspector.CLI/Program.cs | 8 +++---- Il2CppInspector.GUI/MainWindow.xaml | 6 +++--- Il2CppInspector.GUI/MainWindow.xaml.cs | 30 +++++++++++++------------- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/Il2CppInspector.CLI/Program.cs b/Il2CppInspector.CLI/Program.cs index 470c60b..d31a95a 100644 --- a/Il2CppInspector.CLI/Program.cs +++ b/Il2CppInspector.CLI/Program.cs @@ -29,7 +29,7 @@ namespace Il2CppInspector.CLI [Option('c', "cs-out", Required = false, HelpText = "C# output file (when using single-file layout) or path (when using per namespace, assembly or class layout)", Default = "types.cs")] public string CSharpOutPath { get; set; } - [Option('p', "py-out", Required = false, HelpText = "IDA Python script output file", Default = "ida.py")] + [Option('p', "py-out", Required = false, HelpText = "Python script output file", Default = "il2cpp.py")] public string PythonOutFile { get; set; } [Option('h', "cpp-out", Required = false, HelpText = "C++ scaffolding / DLL injection project output path", Default = "cpp")] @@ -84,7 +84,7 @@ namespace Il2CppInspector.CLI [Option("unity-assemblies", Required = false, HelpText = "Path to Unity script assemblies (when using --project). Wildcards select last matching folder in alphanumeric order", Default = @"C:\Program Files\Unity\Hub\Editor\*\Editor\Data\Resources\PackageManager\ProjectTemplates\libcache\com.unity.template.3d-*\ScriptAssemblies")] public string UnityAssembliesPath { get; set; } - [Option("unity-version", Required = false, HelpText = "Version of Unity used to create the input files, if known. Used to enhance IDAPython and C++ output. If not specified, a close match will be inferred automatically.", Default = null)] + [Option("unity-version", Required = false, HelpText = "Version of Unity used to create the input files, if known. Used to enhance Python, C++ and JSON output. If not specified, a close match will be inferred automatically.", Default = null)] public UnityVersion UnityVersion { get; set; } } @@ -269,8 +269,8 @@ namespace Il2CppInspector.CLI new JSONMetadata(appModel).Write(options.JsonOutPath); } - // IDA Python script output - using (new Benchmark("Generate IDAPython script")) { + // Python script output + using (new Benchmark("Generate Python script")) { new PythonScript(appModel).WriteScriptToFile(options.PythonOutFile, "IDA", Path.Combine(options.CppOutPath, "appdata/il2cpp-types.h"), options.JsonOutPath); diff --git a/Il2CppInspector.GUI/MainWindow.xaml b/Il2CppInspector.GUI/MainWindow.xaml index ca50aff..d1b4ec1 100644 --- a/Il2CppInspector.GUI/MainWindow.xaml +++ b/Il2CppInspector.GUI/MainWindow.xaml @@ -363,10 +363,10 @@ - - IDAPython script + + Python script for disassemblers - + diff --git a/Il2CppInspector.GUI/MainWindow.xaml.cs b/Il2CppInspector.GUI/MainWindow.xaml.cs index 1e8cce9..9dade1d 100644 --- a/Il2CppInspector.GUI/MainWindow.xaml.cs +++ b/Il2CppInspector.GUI/MainWindow.xaml.cs @@ -215,22 +215,22 @@ namespace Il2CppInspectorGUI trvNamespaces.ItemsSource = namespaceTree; // Populate Unity version combo boxes - var prevIdaSelection = cboIdaUnityVersion.SelectedItem; + var prevIdaSelection = cboPyUnityVersion.SelectedItem; var prevCppSelection = cboCppUnityVersion.SelectedItem; var prevJsonSelection = cboJsonUnityVersion.SelectedItem; - cboIdaUnityVersion.Items.Clear(); + cboPyUnityVersion.Items.Clear(); cboCppUnityVersion.Items.Clear(); cboJsonUnityVersion.Items.Clear(); foreach (var version in UnityHeaders.GuessHeadersForBinary(model.Package.Binary)) { - cboIdaUnityVersion.Items.Add(version); + cboPyUnityVersion.Items.Add(version); cboCppUnityVersion.Items.Add(version); cboJsonUnityVersion.Items.Add(version); } - cboIdaUnityVersion.SelectedIndex = cboIdaUnityVersion.Items.Count - 1; + cboPyUnityVersion.SelectedIndex = cboPyUnityVersion.Items.Count - 1; cboCppUnityVersion.SelectedIndex = cboCppUnityVersion.Items.Count - 1; cboJsonUnityVersion.SelectedIndex = cboJsonUnityVersion.Items.Count - 1; if (prevIdaSelection != null) { - cboIdaUnityVersion.SelectedItem = prevIdaSelection; + cboPyUnityVersion.SelectedItem = prevIdaSelection; cboCppUnityVersion.SelectedItem = prevCppSelection; cboJsonUnityVersion.SelectedItem = prevJsonSelection; } @@ -409,29 +409,29 @@ namespace Il2CppInspectorGUI }); break; - // IDA Python script - case { rdoOutputIDA: var r } when r.IsChecked == true: + // Python script + case { rdoOutputPy: var r } when r.IsChecked == true: - var idaSaveFileDialog = new SaveFileDialog { + var pySaveFileDialog = new SaveFileDialog { Filter = "Python scripts (*.py)|*.py|All files (*.*)|*.*", - FileName = "ida.py", + FileName = "il2cpp.py", CheckFileExists = false, OverwritePrompt = true }; - if (idaSaveFileDialog.ShowDialog() == false) + if (pySaveFileDialog.ShowDialog() == false) return; - var idaOutFile = idaSaveFileDialog.FileName; + var pyOutFile = pySaveFileDialog.FileName; areaBusyIndicator.Visibility = Visibility.Visible; - var selectedIdaUnityVersion = ((UnityHeaders) cboIdaUnityVersion.SelectedItem)?.VersionRange.Min; + var selectedPyUnityVersion = ((UnityHeaders) cboPyUnityVersion.SelectedItem)?.VersionRange.Min; await Task.Run(() => { OnStatusUpdate(this, "Building C++ application model"); - model.Build(selectedIdaUnityVersion, CppCompilerType.GCC); + model.Build(selectedPyUnityVersion, CppCompilerType.GCC); - OnStatusUpdate(this, "Generating IDAPython script"); - new PythonScript(model).WriteScriptToFile(idaOutFile, "IDA"); + OnStatusUpdate(this, "Generating Python script"); + new PythonScript(model).WriteScriptToFile(pyOutFile, "IDA"); }); break;