From 69f901561971b2d5a7a0aebb63bd378a4b7b1ad4 Mon Sep 17 00:00:00 2001 From: ComputeLinux Date: Sat, 23 Jul 2016 10:16:05 -0700 Subject: Add WindowsEXE running as a shiftorium thing. --- source/WindowsFormsApplication1/Apps/Terminal.cs | 55 +++++++++++++----------- 1 file changed, 31 insertions(+), 24 deletions(-) (limited to 'source/WindowsFormsApplication1/Apps') diff --git a/source/WindowsFormsApplication1/Apps/Terminal.cs b/source/WindowsFormsApplication1/Apps/Terminal.cs index 3d0e2b8..2e464f5 100644 --- a/source/WindowsFormsApplication1/Apps/Terminal.cs +++ b/source/WindowsFormsApplication1/Apps/Terminal.cs @@ -1662,33 +1662,40 @@ HIJACKER is a utility that allows you to hijack any system and install ShiftOS o /// string[] args public void runExe(string[] args) { - bool isFirstArg = true; - string exeArgs = ""; - foreach (string arg in args) + if (API.Upgrades["fileskimmer"]) { - if (!isFirstArg) + bool isFirstArg = true; + string exeArgs = ""; + foreach (string arg in args) { - exeArgs = exeArgs + " " + arg; + if (!isFirstArg) + { + exeArgs = exeArgs + " " + arg; + } + else + { + isFirstArg = false; + } } - else - { - isFirstArg = false; - } - } - string lp = "C:\\ShiftOS\\bin\\" + args[0] + ".exe"; - Process p = new Process(); - p.StartInfo.Arguments = exeArgs; - p.StartInfo.UseShellExecute = false; - p.StartInfo.RedirectStandardOutput = true; - p.StartInfo.RedirectStandardInput = true; - p.StartInfo.FileName = lp; - p.StartInfo.CreateNoWindow = true; - p.StartInfo.ErrorDialog = false; - p.StartInfo.WindowStyle = ProcessWindowStyle.Hidden; - p.StartInfo.WorkingDirectory = current_dir; - p.Start(); - WriteLine(p.StandardOutput.ReadToEnd()); - p.WaitForExit(); + string lp = "C:\\ShiftOS\\bin\\" + args[0] + ".exe"; + Process p = new Process(); + p.StartInfo.Arguments = exeArgs; + p.StartInfo.UseShellExecute = false; + p.StartInfo.RedirectStandardOutput = true; + p.StartInfo.RedirectStandardInput = true; + p.StartInfo.FileName = lp; + p.StartInfo.CreateNoWindow = true; + p.StartInfo.ErrorDialog = false; + p.StartInfo.WindowStyle = ProcessWindowStyle.Hidden; + p.StartInfo.WorkingDirectory = current_dir; + p.Start(); + WriteLine(p.StandardOutput.ReadToEnd()); + p.WaitForExit(); + } + else + { + wrongcommand(); + } } #endregion -- cgit v1.2.3 From 60ca1cf76437bb35d4923b2d4e6f7d06d3189033 Mon Sep 17 00:00:00 2001 From: ComputeLinux Date: Sat, 23 Jul 2016 10:17:15 -0700 Subject: that moment when you forget to save --- source/WindowsFormsApplication1/Apps/Terminal.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/WindowsFormsApplication1/Apps') diff --git a/source/WindowsFormsApplication1/Apps/Terminal.cs b/source/WindowsFormsApplication1/Apps/Terminal.cs index 2e464f5..cc69043 100644 --- a/source/WindowsFormsApplication1/Apps/Terminal.cs +++ b/source/WindowsFormsApplication1/Apps/Terminal.cs @@ -1662,7 +1662,7 @@ HIJACKER is a utility that allows you to hijack any system and install ShiftOS o /// string[] args public void runExe(string[] args) { - if (API.Upgrades["fileskimmer"]) + if (API.Upgrades[""]) { bool isFirstArg = true; string exeArgs = ""; -- cgit v1.2.3