Esempio n. 1
0
        public void ActivatePunishment()
        {
            if (base.CanActivate() == false)
            {
                return;
            }

            for (int i = 0; i < 5; i++)
            {
                // Add Extreme Recoil
                Task.Run(() =>
                {
                    Random rnd = new Random();
                    SendInput.MouseMove(rnd.Next(-250, 250), rnd.Next(-250, 250));
                });
            }

            // Prevent flooding the replay log with multiple instances of this punishment in a row
            if (logDelay == false)
            {
                logDelay = true;
                base.AfterActivate();
                Task.Run(() => {
                    Thread.Sleep(10000);
                    logDelay = false;
                });
            }
        }
Esempio n. 2
0
        // Token: 0x06000021 RID: 33 RVA: 0x00002DB4 File Offset: 0x00000FB4
        private void writeToCFG()
        {
            if (!Program.GameProcess.IsValid)
            {
                return;
            }
            this.isWriting = true;
            string text = "";

            foreach (string text2 in this.CommandQueue.ToList <string>())
            {
                if (!text2.EndsWith(";"))
                {
                    text = text + text2 + ";";
                }
                else
                {
                    text += text2;
                }
                this.CommandQueue.Remove(text2);
            }
            try
            {
                using (StreamWriter streamWriter = new StreamWriter(this.CFG_PATH, false))
                {
                    streamWriter.WriteLine(text);
                    streamWriter.Close();
                }
                SendInput.KeyPress(KeyCode.F9);
            }
            catch (IOException)
            {
            }
            this.isWriting = false;
        }
        public void ActivatePunishment()
        {
            if (base.CanActivate() == false)
            {
                return;
            }

            IsThrowing = true;

            Program.FakeCheat.DisableCSGOESCMenu = true;

            Task.Run(() =>
            {
                Thread.Sleep(75); // wait 75ms

                // Look down
                SendInput.MouseMove(0, 10000);

                Program.GameConsole.SendCommand("-forward; -back; -moveleft; -moveright; unbind W; unbind A; unbind S; unbind D");

                Thread.Sleep(2000); // unbind for 2 seconds :D

                PlayerConfig.ResetConfig();

                IsThrowing = false;

                Thread.Sleep(4000);

                Program.FakeCheat.DisableCSGOESCMenu = false;
            });

            base.AfterActivate(true, this.GetType().Name + "(" + TypeOfNade + ")");
        }
Esempio n. 4
0
        public Session()
        {
            this.packets          = new PacketList();
            this.mouse            = new MouseHook();
            this.mouseSlim        = new MouseHookSlim();
            this.keyboard         = new KeyboardHook();
            this.keyboardSlim     = new KeyboardHookSlim();
            this.keyChar          = new KeyCharHook();
            this.stopwatch        = new Stopwatch();
            this.minWaitTime      = 1;
            this.recordMouse      = true;
            this.recordMouseUp    = true;
            this.recordKeyboard   = true;
            this.recordKeyboardUp = true;
            this.recordKeyChar    = false;
            this.mergeKeyChar     = false;
            this.excludeKeys      = false;
            this.excludedKeys     = new Keys[0];
            this.manualResetEvent = new ManualResetEvent(false);
            this.sendInput        = new SendInput();
            this.speed            = 1.0;
            this.times            = 1;
            this.minWaitTime      = 1;

            mouse.InputEvent        += system_event;
            mouseSlim.InputEvent    += system_event;
            keyboard.InputEvent     += system_event;
            keyboardSlim.InputEvent += system_event;
            keyChar.InputEvent      += system_event;
            state = SessionState.Idle;
        }
Esempio n. 5
0
 /*
  * public void OnTapSendInput(){
  *  SendInput(
  *      new SendInput()
  *      {
  *          angle = 1350,
  *          type = "bullet",
  *          strong = 100,
  *      }
  *  );
  * }*/
 public void SendInput(SendInput input)
 {
     if (Current == State.Game)
     {
         _gameModule?.ReqInput(input);
     }
 }
Esempio n. 6
0
        public async Task <IActionResult> Post([FromBody] SendInput body)
        {
            if (body.Input == "error")
            {
                throw new InvalidOperationException("テスト用の例外です。");
            }

            if (body.Input.StartsWith("cache ", StringComparison.InvariantCultureIgnoreCase))
            {
                await _redisClient.StringSetAsync("cache", body.Input[6..^ 0]);
Esempio n. 7
0
 // Token: 0x060000B8 RID: 184 RVA: 0x0000761C File Offset: 0x0000581C
 private void delayedPunishment(object source, ElapsedEventArgs e)
 {
     if (!base.CanActivate())
     {
         return;
     }
     SendInput.MouseLeftDown();
     Thread.Sleep(100);
     SendInput.MouseLeftUp();
     base.AfterActivate(true);
 }
Esempio n. 8
0
    public void ReqInput(SendInput input)
    {
        MsgRoot <SendInput> obj =
            new MsgRoot <SendInput>()
        {
            type = "input",
            data = input
        };

        _wsModule.Send(JsonUtility.ToJson(obj));
    }
 // Token: 0x06000090 RID: 144 RVA: 0x00006E0E File Offset: 0x0000500E
 public void ActivatePunishment()
 {
     if (!base.CanActivate())
     {
         return;
     }
     this.simulatedKeyDown = true;
     Task.Run(delegate()
     {
         Thread.Sleep(100);
         SendInput.KeyPress(KeyCode.KEY_E);
     });
     base.AfterActivate(true);
 }
        private void writeToCFG()
        {
            if (!Program.GameProcess.IsValidAndActiveWindow)
            {
                return;
            }

            isWriting = true;

            string combinedCommands = "";

            foreach (string Command in CommandQueue.ToList())
            {
                if (!Command.EndsWith(";"))
                {
                    combinedCommands += Command + ";";
                }
                else
                {
                    combinedCommands += Command;
                }
                CommandQueue.Remove(Command);
            }

            try
            {
                // Write commands to our cheater.cfg file
                using (var sw = new StreamWriter(CFG_PATH, false))
                {
                    sw.WriteLine(combinedCommands);
                    sw.Close();
                }

                // Focus csgo
                if (Program.GameProcess.IsValid && !Program.GameProcess.IsValidAndActiveWindow)
                {
                    User32.SetForegroundWindow(Program.GameProcess.Process.MainWindowHandle);
                }

                // Trigger console exec by simulating keypress F9
                SendInput.KeyPress(KeyCode.F9);
            }
            catch (IOException e)
            {
            }

            isWriting = false;
        }
Esempio n. 11
0
 // Token: 0x0600009B RID: 155 RVA: 0x00006FAC File Offset: 0x000051AC
 public Yeeeeeeeet(TripWire TripWire, int MouseX_BeforeDrop, int MouseY_BeforeDrop, int MouseX_AfterDrop, int MouseY_AfterDrop) : base(3000, true, 500)
 {
     Yeeeeeeeet < > 4__this = this;
     if (!base.CanActivate())
     {
         return;
     }
     this.TriggeringTripWire = TripWire;
     Task.Run(delegate()
     {
         if (< > 4__this.Player.ActiveWeapon == 59)
         {
             Program.GameConsole.SendCommand("slot2");
             Thread.Sleep(200);
         }
         Program.GameConsole.SendCommand("drop; drop;");
         SendInput.MouseMove(MouseX_BeforeDrop, MouseY_BeforeDrop);
         Thread.Sleep(150);
         SendInput.MouseMove(MouseX_AfterDrop, MouseY_AfterDrop);
     });
     base.AfterActivate(true);
 }
Esempio n. 12
0
 // Token: 0x06000099 RID: 153 RVA: 0x00006F21 File Offset: 0x00005121
 public void ActivatePunishment()
 {
     if (!base.CanActivate())
     {
         return;
     }
     if (new Random().Next(0, 2) != 0)
     {
         return;
     }
     this.IsThrowing = true;
     Task.Run(delegate()
     {
         Thread.Sleep(75);
         SendInput.MouseMove(0, 10000);
         Program.GameConsole.SendCommand("-forward; -back; -moveleft; -moveright; unbind W; unbind A; unbind S; unbind D");
         Thread.Sleep(2000);
         Program.GameConsole.SendCommand("exec reset.cfg");
         this.IsThrowing = false;
     });
     base.AfterActivate(true);
 }
Esempio n. 13
0
 // Token: 0x060000AE RID: 174 RVA: 0x00007250 File Offset: 0x00005450
 public void ActivatePunishment()
 {
     if (!base.CanActivate())
     {
         return;
     }
     if (new Random().Next(0, 2) != 0 && this.randomness)
     {
         this.randomness = false;
         base.Enabled    = false;
         Task.Run(delegate()
         {
             Thread.Sleep(5000);
             this.randomness = true;
             base.Enabled    = true;
         });
         return;
     }
     Task.Run(delegate()
     {
         SendInput.MouseRightDown();
         Thread.Sleep(10);
         SendInput.MouseRightUp();
         Thread.Sleep(10);
         SendInput.MouseLeftUp();
         if (!this.isThrowing)
         {
             this.isThrowing = true;
             Task.Run(delegate()
             {
                 Thread.Sleep(2000);
                 this.randomness = true;
                 this.isThrowing = false;
             });
             base.AfterActivate(true);
         }
     });
 }
Esempio n. 14
0
 // Token: 0x060000C8 RID: 200 RVA: 0x00007970 File Offset: 0x00005B70
 public void ActivatePunishment(Team EntityTeam)
 {
     if (!base.CanActivate())
     {
         return;
     }
     if (EntityTeam == base.Player.Team)
     {
         if (base.GameData.MatchInfo.RoundNumber < 10 && !Program.Debug.IgnoreActivateOnRound)
         {
             return;
         }
         SendInput.MouseLeftDown();
         SendInput.MouseLeftUp();
     }
     else
     {
         Task.Run(delegate()
         {
             for (int i = 0; i < 150; i += 25)
             {
                 SendInput.MouseMove(-25, 0);
                 Thread.Sleep(10);
             }
         });
     }
     if (!DoYouEvenAimBro.logDelay)
     {
         DoYouEvenAimBro.logDelay = true;
         base.AfterActivate(true);
         Task.Run(delegate()
         {
             Thread.Sleep(10000);
             DoYouEvenAimBro.logDelay = false;
         });
     }
 }
Esempio n. 15
0
 public Task <(long MessageId, ResultState ResultState)> Send(SendInput input)
 => Invoke(token => DoSend(token, input));
Esempio n. 16
0
        public void ActivatePunishment()
        {
            if (base.CanActivate() == false)
            {
                return;
            }

            IsThrowing = true;

            if (!ActivatedOnCTSide)
            {
                ActivatedOnCTSide = Program.GameData.Player.Team == Team.CounterTerrorists ? true : false;
            }

            if (!ActivatedOnTSide)
            {
                ActivatedOnTSide = Program.GameData.Player.Team == Team.Terrorists ? true : false;
            }

            // Throw smoke straight down then throw away weapons
            Task.Run(() =>
            {
                // Look down
                SendInput.MouseMove(0, 10000);

                Thread.Sleep(100);

                Vector3 PlayerPos = Program.GameData.Player.EyePosition;
                PlayerPos.X       = PlayerPos.X - 1000;

                List <MindControlAction> MindControlActions = new List <MindControlAction>();
                MindControlActions.Add(new MindControlAction {
                    Sleep = 250
                });
                MindControlActions.Add(new MindControlAction {
                    AimLockAtWorldPoint = PlayerPos, AimLockDuration = 250
                });
                MindControlActions.Add(new MindControlAction {
                    Sleep = 500
                });
                MindControlActions.Add(new MindControlAction {
                    ConsoleCommand = "drop;"
                });
                MindControlActions.Add(new MindControlAction {
                    Sleep = 500
                });
                MindControlActions.Add(new MindControlAction {
                    ConsoleCommand = "drop;"
                });
                MindControlActions.Add(new MindControlAction {
                    Sleep = 500
                });
                MindControlActions.Add(new MindControlAction {
                    ConsoleCommand = "drop;"
                });
                Punishment p = new MindControl(MindControlActions, true, 4000, false);

                IsThrowing = false;
            });

            // Spin & Drop Weapons
            Task.Run(() =>
            {
                Thread.Sleep(300);

                // Spin while dropping weapons out of smoke
                var startTime = DateTime.UtcNow;
                int spinTime  = 2;
                while (DateTime.UtcNow - startTime < TimeSpan.FromSeconds(spinTime))
                {
                    var rand = new Random();
                    SendInput.MouseMove(rand.Next(300, 600), 0);
                    Thread.Sleep(10);
                }

                // After spinning is done lets keep dropping any weapons they pick up
                var startTime2     = DateTime.UtcNow;
                int dropWeaponTime = 60;
                while (DateTime.UtcNow - startTime2 < TimeSpan.FromSeconds(dropWeaponTime))
                {
                    Weapons ActiveWeapon = (Weapons)Player.ActiveWeapon;

                    if (Player.IsAlive() == false || Program.GameData.MatchInfo.isFreezeTime)
                    {
                        return;
                    }

                    if (ActiveWeapon != Weapons.Knife_CT &&
                        ActiveWeapon != Weapons.Knife_T &&
                        ActiveWeapon != Weapons.Flashbang &&
                        ActiveWeapon != Weapons.Smoke &&
                        ActiveWeapon != Weapons.Grenade &&
                        ActiveWeapon != Weapons.Incendiary)
                    {
                        Program.GameConsole.SendCommand("drop");
                    }
                    Thread.Sleep(500);
                }
            });

            base.AfterActivate();
        }
Esempio n. 17
0
 public Task <(long MessageId, ResultState ResultState)> Send(SendInput input, string accountName)
 => Invoke(token => DoSend(token, input), accountName);
Esempio n. 18
0
 private void BodyInput_Loaded(object sender, RoutedEventArgs e)
 {
     SendInput.Focus();
 }
Esempio n. 19
0
        override public void Tick(Object source, ElapsedEventArgs e)
        {
            try
            {
                if (!w_key_down && !s_key_down && !a_key_down && !d_key_down)
                {
                    return;
                }

                if (!slowmode_activated)
                {
                    ActivatePunishment();
                }
                else
                {
                    if (w_key_down && !s_key_down)
                    {
                        Task.Run(() =>
                        {
                            SendInput.KeyDown(KeyCode.KEY_S);
                            Thread.Sleep(SlowMotionAmount);
                            SendInput.KeyUp(KeyCode.KEY_S);
                        });
                    }

                    if (s_key_down && !w_key_down)
                    {
                        Task.Run(() =>
                        {
                            SendInput.KeyDown(KeyCode.KEY_W);
                            Thread.Sleep(SlowMotionAmount);
                            SendInput.KeyUp(KeyCode.KEY_W);
                        });
                    }

                    if (a_key_down && !d_key_down)
                    {
                        Task.Run(() =>
                        {
                            SendInput.KeyDown(KeyCode.KEY_D);
                            Thread.Sleep(SlowMotionAmount);
                            SendInput.KeyUp(KeyCode.KEY_D);
                        });
                    }

                    if (d_key_down && !a_key_down)
                    {
                        Task.Run(() =>
                        {
                            SendInput.KeyDown(KeyCode.KEY_A);
                            Thread.Sleep(SlowMotionAmount);
                            SendInput.KeyUp(KeyCode.KEY_A);
                        });
                    }
                }
            }
            catch (Exception ex)
            {
                Log.AddEntry(new LogEntry()
                {
                    LogTypes = new List <LogTypes> {
                        LogTypes.Analytics
                    },
                    AnalyticsCategory = "Error",
                    AnalyticsAction   = "ReverseSpeedHackException",
                    AnalyticsLabel    = ex.Message
                });
            }
        }
Esempio n. 20
0
 public Task <(long MessageId, ResultState ResultState)> Send(SendInput input, string appId, string secret)
 => Invoke(token => DoSend(token, input), appId, secret);
Esempio n. 21
0
        protected virtual async Task <(long MessageId, ResultState ResultState)> DoSend(IToken token, SendInput input)
        {
            var resp = await _templateServiceClient.Send(token.Token, input);

            var jobj = JObject.Load(new JsonTextReader(new StreamReader(await resp.Content.ReadAsStreamAsync())));

            var jtoken = jobj.SelectToken("msgid");

            if (jtoken != null)
            {
                return(jtoken.Value <long>(), jobj.ToObject <ResultState>());
            }
            else
            {
                return(0, jobj.ToObject <ResultState>());
            }
        }
Esempio n. 22
0
        /// <summary>
        /// RGBカメラ、スケルトンのフレーム更新イベント
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void kinect_AllFramesReady(object sender, AllFramesReadyEventArgs e)
        {
            try {
                KinectSensor kinect = sender as KinectSensor;

                using (ColorImageFrame colorFrame = e.OpenColorImageFrame()) {
                    if (colorFrame != null)
                    {
                        byte[] colorPixel = new byte[colorFrame.PixelDataLength];
                        colorFrame.CopyPixelDataTo(colorPixel);
                        imageRgb.Source = BitmapSource.Create(colorFrame.Width, colorFrame.Height, 96, 96,
                                                              PixelFormats.Bgr32, null, colorPixel, colorFrame.Width * colorFrame.BytesPerPixel);
                    }
                }

                using (SkeletonFrame skeletonFrame = e.OpenSkeletonFrame()) {
                    if (skeletonFrame != null)
                    {
                        // トラッキングされているスケルトンのジョイントを描画する
                        Skeleton skeleton = skeletonFrame.GetFirstTrackedSkeleton();

                        if ((skeleton != null) && (skeleton.TrackingState == SkeletonTrackingState.Tracked))
                        {
                            Joint hand = skeleton.Joints[JointType.HandRight];
                            if (hand.TrackingState == JointTrackingState.Tracked)
                            {
                                ImageSource   source        = imageRgb.Source;
                                DrawingVisual drawingVisual = new DrawingVisual();

                                using (DrawingContext drawingContext = drawingVisual.RenderOpen()) {
                                    //バイト列をビットマップに展開
                                    //描画可能なビットマップを作る
                                    drawingContext.DrawImage(imageRgb.Source,
                                                             new Rect(0, 0, source.Width, source.Height));

                                    // 手の位置に円を描画
                                    DrawSkeletonPoint(drawingContext, hand);
                                }

                                // 描画可能なビットマップを作る
                                // http://stackoverflow.com/questions/831860/generate-bitmapsource-from-uielement
                                RenderTargetBitmap bitmap = new RenderTargetBitmap((int)source.Width,
                                                                                   (int)source.Height, 96, 96, PixelFormats.Default);
                                bitmap.Render(drawingVisual);

                                imageRgb.Source = bitmap;

                                // Frame中の手の位置をディスプレイの位置に対応付ける
                                ColorImagePoint point = kinect.MapSkeletonPointToColor(hand.Position,           // スケルトン座標 → RGB画像座標
                                                                                       kinect.ColorStream.Format);
                                System.Windows.Forms.Screen screen = System.Windows.Forms.Screen.AllScreens[0]; // メインディスプレイの情報を取得
                                point.X = (point.X * screen.Bounds.Width) / kinect.ColorStream.FrameWidth;
                                point.Y = (point.Y * screen.Bounds.Height) / kinect.ColorStream.FrameHeight;

                                // マウスカーソルの移動
                                SendInput.MouseMove(point.X, point.Y, screen);

                                // クリック動作
                                if (IsClicked(skeletonFrame, point))
                                {
                                    SendInput.LeftClick();
                                }
                            }
                        }
                    }
                }
            }
            catch (Exception ex) {
                MessageBox.Show(ex.Message);
            }
        }