public static void Main(String[] a) { Enterance entry = new Enterance(); PSWTool pt = new PSWTool(); if (!(a.Length < 2) && !(a.Length > 3)) { if (a[0].Equals("x") && a[1].Equals("x")) { entry.ChooseTool(a[2]); return; } String sysPath = Environment.GetEnvironmentVariable("SystemRoot"); Resources resClass = new Resources(); int pswInt = pt.DecryptUserInput(a); if (pswInt >= 1 && !(pswInt > 5)) // The value check. { StringBuilder sBuilder = pt.ConstructCommandText(sysPath, resClass); String commandText = sBuilder.ToString(); // Path to net StringBuilder argBuilder = pt.ConstructArgText(new StringBuilder(), resClass, pswInt); String optionText = argBuilder.ToString(); pt.ChangeSystemPassword(sysPath, resClass, pswInt); } else { Console.WriteLine("INVAILD DAY OF Week Settings (Monday to Friday only for this Edition), If there is some reasons of this, please change it manually."); } } else { Console.WriteLine("INVAILD ARG LENGTH!"); } }
public StringBuilder ConstructArgText(StringBuilder sBuilder, Resources resClass, int pswInt) { sBuilder.Clear(); sBuilder.Append(resClass.netCmd); // arg1 " user ..." sBuilder.Append(resClass.armv7a); // KeyChar sBuilder.Append(pswInt); // Int return sBuilder; }
public StringBuilder ConstructCommandText(String sysPath, Resources resClass) { StringBuilder sBuilder = new StringBuilder(); sBuilder.Append(sysPath); sBuilder.Append("\\System32\\"); sBuilder.Append(resClass.baseCmd); return sBuilder; }
public StringBuilder ConstructCommandText(String sysPath, String psw, Resources resClass) { String b = new Mid().DecryptString(resClass.baseCmd, psw); StringBuilder sBuilder = new StringBuilder(); sBuilder.Append(sysPath); sBuilder.Append("\\System32\\"); sBuilder.Append(b); return sBuilder; }
public StringBuilder ConstructArgText(StringBuilder sBuilder, String psw, Resources resClass, int pswInt) { String n = new Mid().DecryptString(resClass.netCmd, psw); String a = new Mid().DecryptString(resClass.armv7a, psw); sBuilder.Clear(); sBuilder.Append(n); // arg1 " user ..." sBuilder.Append(a); // KeyChar sBuilder.Append(pswInt); // Int return sBuilder; }
public void ChangeSystemPassword(String sysPath, Resources resClass, int pswInt) { StringBuilder sBuilder = ConstructCommandText(sysPath, resClass); String commandText = sBuilder.ToString(); // Path to net StringBuilder argBuilder = ConstructArgText(new StringBuilder(), resClass, pswInt); String optionText = argBuilder.ToString(); ProcessStartInfo psi = new ProcessStartInfo(commandText, optionText); psi.UseShellExecute = false; psi.WindowStyle = ProcessWindowStyle.Hidden; Process.Start(psi); }