|
| 1 | +using System; |
| 2 | +using System.Collections.Generic; |
| 3 | +using System.ComponentModel; |
| 4 | +using System.Data; |
| 5 | +using System.Drawing; |
| 6 | +using System.Linq; |
| 7 | +using System.Text; |
| 8 | +using System.Threading.Tasks; |
| 9 | +using System.Windows.Forms; |
| 10 | +using System.Speech.Recognition; |
| 11 | +using System.Windows; |
| 12 | +using System.Diagnostics; |
| 13 | +using System.IO; |
| 14 | + |
| 15 | +namespace Hornet_Exploit_Beta |
| 16 | +{ |
| 17 | + public partial class Form1 : Form |
| 18 | + { |
| 19 | + public Form1() |
| 20 | + { |
| 21 | + InitializeComponent(); |
| 22 | + timer1.Start(); |
| 23 | + } |
| 24 | + |
| 25 | + private void label4_Click(object sender, EventArgs e) |
| 26 | + { |
| 27 | + Environment.Exit(0); |
| 28 | + } |
| 29 | + |
| 30 | + private void RunConsole(string debug) |
| 31 | + { |
| 32 | + richTextBox2.AppendText("\n [ Console ] - " + debug); |
| 33 | + } |
| 34 | + SpeechRecognitionEngine speechRecognitionEngine = null; |
| 35 | + List<Word> words = new List<Word>(); |
| 36 | + |
| 37 | + private void checkBox1_CheckedChanged(object sender, EventArgs e) |
| 38 | + { |
| 39 | + if (checkBox1.Checked == true) |
| 40 | + { |
| 41 | + RunConsole("Activating Voice Command"); |
| 42 | + try |
| 43 | + { |
| 44 | + speechRecognitionEngine = createSpeechEngine("de-DE"); |
| 45 | + speechRecognitionEngine.AudioLevelUpdated += new EventHandler<AudioLevelUpdatedEventArgs>(engine_AudioLevelUpdated); |
| 46 | + speechRecognitionEngine.SpeechRecognized += new EventHandler<SpeechRecognizedEventArgs>(engine_SpeechRecognized); |
| 47 | + loadGrammarAndCommands(); |
| 48 | + speechRecognitionEngine.SetInputToDefaultAudioDevice(); |
| 49 | + speechRecognitionEngine.RecognizeAsync(RecognizeMode.Multiple); |
| 50 | + } |
| 51 | + catch (Exception ex) |
| 52 | + { |
| 53 | + RunConsole("Activating Voice Command Failed to Respond"); |
| 54 | + } |
| 55 | + } |
| 56 | + else |
| 57 | + { |
| 58 | + speechRecognitionEngine.RecognizeAsyncStop(); |
| 59 | + speechRecognitionEngine.Dispose(); |
| 60 | + RunConsole("Deactivating Voice Command"); |
| 61 | + } |
| 62 | + } |
| 63 | + |
| 64 | + void engine_AudioLevelUpdated(object sender, AudioLevelUpdatedEventArgs e) |
| 65 | + { |
| 66 | + progressBar1.Value = e.AudioLevel; |
| 67 | + } |
| 68 | + |
| 69 | + void engine_SpeechRecognized(object sender, SpeechRecognizedEventArgs e) |
| 70 | + { |
| 71 | + richTextBox2.Text += "\r" + getKnownTextOrExecute(e.Result.Text) + "\n"; |
| 72 | + } |
| 73 | + |
| 74 | + private void CommandRecognition(string commands) //Heres ur fucking commands executed |
| 75 | + { |
| 76 | + if (commands == "injectexploit") |
| 77 | + { |
| 78 | + MessageBox.Show("Attaching Exploit"); |
| 79 | + } |
| 80 | + else if (commands == "executeexecutor") |
| 81 | + { |
| 82 | + MessageBox.Show("Attaching Exploit"); |
| 83 | + } |
| 84 | + else if (commands == "easyexploit") |
| 85 | + { |
| 86 | + Properties.Settings.Default.CurrentAPI = "EasyExploit"; |
| 87 | + Properties.Settings.Default.Save(); |
| 88 | + } |
| 89 | + else if (commands == "wearedevs") |
| 90 | + { |
| 91 | + Properties.Settings.Default.CurrentAPI = "WeAreDevs"; |
| 92 | + Properties.Settings.Default.Save(); |
| 93 | + } |
| 94 | + else if (commands == "panda") |
| 95 | + { |
| 96 | + Properties.Settings.Default.CurrentAPI = "Panda Bytecode"; |
| 97 | + Properties.Settings.Default.Save(); |
| 98 | + } |
| 99 | + else if (commands == "executebasic") |
| 100 | + { |
| 101 | + MessageBox.Show("So yeah it execute print lmao on roblox"); |
| 102 | + } |
| 103 | + } |
| 104 | + private string getKnownTextOrExecute(string command) |
| 105 | + { |
| 106 | + try |
| 107 | + { |
| 108 | + var cmd = words.Where(c => c.Text == command).First(); |
| 109 | + |
| 110 | + if (cmd.IsShellCommand) |
| 111 | + { |
| 112 | + string commandforbeez = cmd.AttachedText; |
| 113 | + CommandRecognition(commandforbeez); //Send the Command to Command Recognition :D |
| 114 | + |
| 115 | + return "[ Client ] - Execute Voice Command [ " + cmd.AttachedText + "]"; |
| 116 | + } |
| 117 | + else |
| 118 | + { |
| 119 | + return cmd.AttachedText; |
| 120 | + } |
| 121 | + } |
| 122 | + catch (Exception) |
| 123 | + { |
| 124 | + return command; |
| 125 | + } |
| 126 | + } |
| 127 | + |
| 128 | + private SpeechRecognitionEngine createSpeechEngine(string preferredCulture) |
| 129 | + { |
| 130 | + foreach (RecognizerInfo config in SpeechRecognitionEngine.InstalledRecognizers()) |
| 131 | + { |
| 132 | + if (config.Culture.ToString() == preferredCulture) |
| 133 | + { |
| 134 | + speechRecognitionEngine = new SpeechRecognitionEngine(config); |
| 135 | + break; |
| 136 | + } |
| 137 | + } |
| 138 | + |
| 139 | + // if the desired culture is not found, then load default |
| 140 | + if (speechRecognitionEngine == null) |
| 141 | + { |
| 142 | + RunConsole("The desired culture is not installed on this machine, the speech-engine will continue using " + SpeechRecognitionEngine.InstalledRecognizers()[0].Culture.ToString() + " as the default culture."); |
| 143 | + speechRecognitionEngine = new SpeechRecognitionEngine(SpeechRecognitionEngine.InstalledRecognizers()[0]); |
| 144 | + } |
| 145 | + |
| 146 | + return speechRecognitionEngine; |
| 147 | + } |
| 148 | + |
| 149 | + |
| 150 | + private void loadGrammarAndCommands() |
| 151 | + { |
| 152 | + try |
| 153 | + { |
| 154 | + Choices texts = new Choices(); |
| 155 | + string[] lines = File.ReadAllLines(Environment.CurrentDirectory + "\\VoiceCommand.dll"); |
| 156 | + foreach (string line in lines) |
| 157 | + { |
| 158 | + if (line.StartsWith("--") || line == String.Empty) continue; |
| 159 | + var parts = line.Split(new char[] { '|' }); |
| 160 | + words.Add(new Word() { Text = parts[0], AttachedText = parts[1], IsShellCommand = (parts[2] == "true") }); |
| 161 | + texts.Add(parts[0]); |
| 162 | + } |
| 163 | + Grammar wordsList = new Grammar(new GrammarBuilder(texts)); |
| 164 | + speechRecognitionEngine.LoadGrammar(wordsList); |
| 165 | + } |
| 166 | + catch (Exception ex) |
| 167 | + { |
| 168 | + throw ex; |
| 169 | + } |
| 170 | + } |
| 171 | + |
| 172 | + private void timer1_Tick(object sender, EventArgs e) |
| 173 | + { |
| 174 | + apiuse.Text = "Current API: " + Properties.Settings.Default.CurrentAPI; |
| 175 | + } |
| 176 | + } |
| 177 | +} |
0 commit comments