示例#1
0
        public void Throw_Application_Exception_If_DataSpaces_Fails()
        {
            var    builder = new DebugDataSpacesBuilder();
            var    spaces  = builder.WithReadVirtual(0x8000000).Build();
            var    memEng  = new MemoryEngine();
            Action a       = () => memEng.ReadMemory(0, 1, spaces);

            a.Should().Throw <ApplicationException>();
        }
示例#2
0
        public void Throw_If_Bad_Low_High_Provided()
        {
            var    memEng = new MemoryEngine();
            var    mock   = new Mock <IDebugDataSpaces>();
            Action a      = () => memEng.ReadMemory(1, 1, mock.Object);

            a.Should().Throw <ArgumentOutOfRangeException>();
            a = () => memEng.ReadMemory(2, 1, mock.Object);
            a.Should().Throw <ArgumentOutOfRangeException>();
        }
示例#3
0
        public void dobypass()
        {
            MemoryEngine scan = new MemoryEngine();

            IntPtr[] adobeairaddy;
            string   adobe_air_dll_check = "6E 00 0A 00 76 00";
            string   bypass_adobe_air    = "11 13 00 00 60 AB 08 66 85 32 60 D1 08 66 BC 40 61 BC 08 10 62 00 00";

            adobeairaddy = scan.ScanArray(scan.GetPID("Transformice"), adobe_air_dll_check);
            scan.WriteArray(adobeairaddy[0], bypass_adobe_air);
        }
示例#4
0
        public void Read_From_Low_To_High()
        {
            var  memEng    = new MemoryEngine();
            var  mock      = new Mock <IDebugDataSpaces>();
            uint bytesRead = 100;

            mock.Setup(spaces =>
                       spaces.ReadVirtual(It.IsAny <ulong>(), It.IsAny <byte[]>(), It.IsAny <uint>(), out bytesRead));
            var res = memEng.ReadMemory(0, 0x100, mock.Object);

            mock.Verify(spaces => spaces.ReadVirtual(0, It.IsAny <byte[]>(), 0x100, out bytesRead), Times.Once);
        }
示例#5
0
        public void Initialize()
        {
            Bypass  bypass       = new Bypass();
            Welcome welcomeprint = new Welcome();

            welcomeprint.printwelcome();

            Hook    hookfunc = new Hook();
            Process Mice     = hookfunc.hooktransformice();


            Console.WriteLine("=========================================");
            Console.WriteLine("             Initializing...             ");
            Console.WriteLine("=========================================");
            MemoryEngine scan = new MemoryEngine();

            bypass.dobypass();

            List <string> Aobs = new List <string>();

            List <int> AddToAddy = new List <int>();

            List <string> Trocas = new List <string>();

            List <IntPtr[]> AobsInject = new List <IntPtr[]>();


            try
            {
                using (StreamReader sr = new StreamReader("aobs.json"))
                {
                    Console.ForegroundColor = ConsoleColor.White;
                    var     Json       = sr.ReadToEnd();
                    JObject jsonObject = JObject.Parse(Json);

                    for (int i = 1; i < int.Parse(jsonObject["countAobs"].ToString()) + 1; i++)
                    {
                        Aobs.Add(jsonObject[$"{i}"].ToString());
                    }

                    for (int i = 0; i < Aobs.Count; i++)
                    {
                        string[] split = Aobs[i].Split(',');


                        AobsInject.Add(scan.ScanArray(Mice, split[0]));
                        Trocas.Add(split[1]);
                        try
                        {
                            if (split[2] == null)
                            {
                                AddToAddy.Add(0);
                            }
                            else
                            {
                                string PlusAddy  = split[2];
                                int    addtoaddy = Int32.Parse(PlusAddy);
                                AddToAddy.Add(addtoaddy);
                            }
                        }
                        catch
                        {
                            AddToAddy.Add(0);
                        }
                    }

                    for (int a = 0; a < AobsInject.Count; a++)
                    {
                        int    nulle    = 0;
                        IntPtr NullePTR = new IntPtr(nulle);


                        try
                        {
                            if (AobsInject[a][0] == NullePTR)
                            {
                                Console.WriteLine("[X] Pattern Scan Failed, falling back");
                            }
                            else
                            {
                                Console.WriteLine("[+] Address Logged =>" + $" [0x{AobsInject[a][0].ToString("X")}]");
                                Console.WriteLine("[+] Writing " + Trocas[a] + " to it.");
                                int plus = AddToAddy[0];
                                AobsInject[a][0] += plus;
                                scan.WriteArray(AobsInject[a][0], Trocas[a]);
                            }
                        }
                        catch
                        {
                            Console.WriteLine("Fatal Error, check your aobs.json!");
                        }
                    }

                    Console.Beep();
                    Console.ReadLine();
                }
            }
            catch
            {
                Console.WriteLine("Core failed to initialize. \n Check your Aobs.JSON");
                Console.ReadLine();
            }
        }