added error catching to algorithms, to check if they were detected.
This commit is contained in:
parent
2c3bf734f2
commit
f6f59e36e1
1 changed files with 6 additions and 9 deletions
15
decode.cs
15
decode.cs
|
@ -14,24 +14,21 @@ namespace Pithos
|
||||||
text = text.Replace("$user", Environment.UserName);
|
text = text.Replace("$user", Environment.UserName);
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
|
public bool command(string text) {
|
||||||
public void command(string text) {
|
|
||||||
string[] args = text.Substring(1).Split(' ');//splits string and removed character
|
string[] args = text.Substring(1).Split(' ');//splits string and removed character
|
||||||
|
|
||||||
if (args[0] == "lock") { //locks the program
|
if (args[0] == "lock") { //locks the program
|
||||||
Program.MW.display("Locking Software...", Color.Red);
|
Program.MW.display("Locking Software...", Color.Red);
|
||||||
Program.MW.Hide();
|
Program.MW.Hide();
|
||||||
Program.UL.Show();
|
Program.UL.Show();
|
||||||
return;
|
return true;
|
||||||
}
|
}
|
||||||
else if (args[0] == "hash") { //hash things
|
else if (args[0] == "hash") { //hash things
|
||||||
for (int i = 1; i < args.Length; i++) {
|
for (int i = 1; i < args.Length; i++) { Program.MW.display("String: " + args[i] + " Hash: " + tools.hash(args[0]), Color.Green); }
|
||||||
Program.MW.display("String: " + args[i] + " Hash: " + tools.hash(args[0]), Color.Green);
|
return true;
|
||||||
}
|
}
|
||||||
return;
|
else if (args[0] == "shutdown") { Process.Start("shutdown /s /t 0"); return true; } //shutdown computer
|
||||||
}
|
return false;
|
||||||
|
|
||||||
else if (args[0] == "shutdown") { Process.Start("shutdown /s /t 0"); } //shutdown computer
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue