static void Main(string[] args)
        {
            _interface.keys = new List <Keys>();

            if ((args.Length != 3))
            {
                Console.WriteLine();
                Console.WriteLine("Usage: D3DTextureLoggerClient.exe %EXENAME% %D3DMODULE% %D3DXMODULE");
                Console.WriteLine();
                return;
            }

            exeName = args[0];

            try
            {
                try
                {
                    Console.WriteLine(args[0]);
                    _interface.exe = args[0].Substring(0, args[0].Length - 3);
                    d3d9Util       = new D3DHookingLibrary.D3DFuncLookup(args[0], args[1]);
                }
                catch (ApplicationException)
                {
                    System.Diagnostics.Process.GetCurrentProcess().Kill();
                }

                Application.Run(new Form1());
            }
            catch (Exception ExtInfo)
            {
                Console.WriteLine("There was an error while connecting to target:\r\n{0}", ExtInfo.ToString());
            }
        }
        static void Main(string[] args)
        {
            Executor      injector = new Executor();
            string        dllName  = "D3DModelRipper.dll";
            MessageStruct mes      = new MessageStruct();

            if (ProcessParameters(args, ref mes) != 0)
            {
                Console.WriteLine("Error Processing Parameters");
                return;
            }

            try
            {
                injector.Inject(dllName, args[0].Substring(0, args[0].Length - 4));
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
                Console.WriteLine("Error Injecting");
                return;
            }

            D3DFuncLookup d3d9Util;

            try
            {
                d3d9Util = new D3DHookingLibrary.D3DFuncLookup(args[0], args[1]);
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
                Console.WriteLine("Error Initializing D3DHookingLibrary");
                return;
            }

            IntPtr dipAddress;
            IntPtr setStreamSourceAddress;

            try
            {
                dipAddress                  = (IntPtr)d3d9Util.GetD3DFunction(D3DFuncLookup.D3D9Functions.DrawIndexedPrimitive);
                setStreamSourceAddress      = (IntPtr)d3d9Util.GetD3DFunction(D3DFuncLookup.D3D9Functions.SetStreamSource);
                mes.dip_address             = dipAddress;
                mes.setStreamSource_address = setStreamSourceAddress;
                injector.getSyringe().CallExport(dllName, "InstallHook", mes);
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
                return;
            }
            while (true)
            {
                Thread.Sleep(300);
            }
        }
Exemple #3
0
        static void Main(string[] args)
        {
            Executor injector = new Executor();
            string dllName = "D3DModelRipper.dll";
            MessageStruct mes = new MessageStruct();
            if (ProcessParameters(args, ref mes) != 0)
            {
                Console.WriteLine("Error Processing Parameters");
                return;
            }

            try
            {
                injector.Inject(dllName, args[0].Substring(0, args[0].Length - 4));
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
                Console.WriteLine("Error Injecting");
                return;
            }

            D3DFuncLookup d3d9Util;
            try
            {
                d3d9Util = new D3DHookingLibrary.D3DFuncLookup(args[0], args[1]);
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
                Console.WriteLine("Error Initializing D3DHookingLibrary");
                return;
            }

            IntPtr dipAddress;
            IntPtr setStreamSourceAddress;

            try
            {
                dipAddress = (IntPtr)d3d9Util.GetD3DFunction(D3DFuncLookup.D3D9Functions.DrawIndexedPrimitive);
                setStreamSourceAddress = (IntPtr)d3d9Util.GetD3DFunction(D3DFuncLookup.D3D9Functions.SetStreamSource);
                mes.dip_address = dipAddress;
                mes.setStreamSource_address = setStreamSourceAddress;
                injector.getSyringe().CallExport(dllName, "InstallHook", mes);
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
                return;
            }
            while (true) Thread.Sleep(300);
        }
Exemple #4
0
        static void Main(string[] args)
        {
            Executor injector = new Executor();
            string dllName = "D3DTextureRipper.dll";
            injector.Inject(dllName, args[0].Substring(0, args[0].Length-4));

            D3DFuncLookup d3d9Util = new D3DHookingLibrary.D3DFuncLookup(args[0], args[1]);

            IntPtr resetAddress = (IntPtr)d3d9Util.GetD3DFunction(D3DFuncLookup.D3D9Functions.SetTexture);
            MessageStruct mes = new MessageStruct() { reset_address = resetAddress};
            injector.getSyringe().CallExport(dllName, "InstallHook", mes);
            while (true) Thread.Sleep(300);
        }
Exemple #5
0
        static void Main(string[] args)
        {
            Executor injector = new Executor();
            string dllName = "D3DWindower.dll";
            injector.Inject(dllName, args[0].Substring(0, args[0].Length-4));

            D3DFuncLookup d3d9Util = new D3DHookingLibrary.D3DFuncLookup(args[0], args[1]);

            int input_width = Convert.ToInt32(args[2]);
            int input_height = Convert.ToInt32(args[3]);

            IntPtr resetAddress = (IntPtr)d3d9Util.GetD3DFunction(D3DFuncLookup.D3D9Functions.Reset);
            MessageStruct mes = new MessageStruct() { reset_address = resetAddress, height = input_height, width = input_width };
            injector.getSyringe().CallExport(dllName, "InstallHook", mes);
            while (true) Thread.Sleep(300);
        }
Exemple #6
0
        static void Main(string[] args)
        {
            Executor injector = new Executor();
            string   dllName  = "D3DTextureRipper.dll";

            injector.Inject(dllName, args[0].Substring(0, args[0].Length - 4));

            D3DFuncLookup d3d9Util = new D3DHookingLibrary.D3DFuncLookup(args[0], args[1]);

            IntPtr        resetAddress = (IntPtr)d3d9Util.GetD3DFunction(D3DFuncLookup.D3D9Functions.SetTexture);
            MessageStruct mes          = new MessageStruct()
            {
                reset_address = resetAddress
            };

            injector.getSyringe().CallExport(dllName, "InstallHook", mes);
            while (true)
            {
                Thread.Sleep(300);
            }
        }
Exemple #7
0
        static void Main(string[] args)
        {
            Executor injector = new Executor();
            string   dllName  = "D3DWindower.dll";

            injector.Inject(dllName, args[0].Substring(0, args[0].Length - 4));

            D3DFuncLookup d3d9Util = new D3DHookingLibrary.D3DFuncLookup(args[0], args[1]);

            int input_width  = Convert.ToInt32(args[2]);
            int input_height = Convert.ToInt32(args[3]);

            IntPtr        resetAddress = (IntPtr)d3d9Util.GetD3DFunction(D3DFuncLookup.D3D9Functions.Reset);
            MessageStruct mes          = new MessageStruct()
            {
                reset_address = resetAddress, height = input_height, width = input_width
            };

            injector.getSyringe().CallExport(dllName, "InstallHook", mes);
            while (true)
            {
                Thread.Sleep(300);
            }
        }
        static void Main(string[] args)
        {
            _interface.keys = new List<Keys>();

            if ((args.Length != 3))
            {
                Console.WriteLine();
                Console.WriteLine("Usage: D3DTextureLoggerClient.exe %EXENAME% %D3DMODULE% %D3DXMODULE");
                Console.WriteLine();
                return;
            }

            exeName = args[0];

            try
            {
                try
                {
                    Console.WriteLine(args[0]);
                    _interface.exe = args[0].Substring(0, args[0].Length-3);
                    d3d9Util = new D3DHookingLibrary.D3DFuncLookup(args[0], args[1]);
                }
                catch (ApplicationException)
                {
                    System.Diagnostics.Process.GetCurrentProcess().Kill();
                }

                Application.Run(new Form1());
            }
            catch (Exception ExtInfo)
            {
                Console.WriteLine("There was an error while connecting to target:\r\n{0}", ExtInfo.ToString());
            }
        }