Skocz do zawartości
  • 👋 Witaj na MPCForum!

    Przeglądasz forum jako gość, co oznacza, że wiele świetnych funkcji jest jeszcze przed Tobą! 😎

    • Pełny dostęp do działów i ukrytych treści
    • Możliwość pisania i odpowiadania w tematach
    • System prywatnych wiadomości
    • Zbieranie reputacji i rozwijanie swojego profilu
    • Członkostwo w jednej z największych społeczności graczy

    👉 Dołączenie zajmie Ci mniej niż minutę – a zyskasz znacznie więcej!

    Zarejestruj się teraz
  • 0

Kompilacja DLL


CS Is GooD xd

Pytanie

Opublikowano

Mógłby ktoś mi powiedziec ,albo skompilowac mi 2 dllki??

 

KOD:

using System.IO;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Text;
using WinApi;
using WinApi.Kernel;
using WinApi.FileFormat;

namespace gothic_2_edit
{
    class Program
    {   
        public static void Main(string[] args)
        {

            
            Console.WriteLine("Kliknij ENTER by rozpocząć grę");
            Console.ReadLine();


            String dll = "NetInject.dll";

            if (!System.IO.File.Exists(dll))
                throw new Exception("Elementu " + dll + " nie znaleziono");


            System.Diagnostics.ProcessStartInfo psi = new System.Diagnostics.ProcessStartInfo();
            psi.WorkingDirectory = Environment.CurrentDirectory;


            psi.Arguments = "-zwindow";


            psi.FileName = "Gothic2.exe";
            WinApi.Process process = WinApi.Process.Start(psi);

            if (process.LoadLibary(dll) == IntPtr.Zero)
                Error.GetLastError();
            Console.ReadLine();

        }
    }
}

A drugi

using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using WinApi;
using System.Threading;
using Gothic.zClasses;
using Gothic.zTypes;
using WinApi.User;
using WinApi.User.Enumeration;
using Gothic.mClasses;
using Gothic.mClasses.Elements;
using Gothic.zStruct;

namespace marvinenabler
{
    public class Program
    {
        public static Int32 InjectedMain(String message)
        {
            try
            {
                Process Process = Process.ThisProcess();

                AddHooks();
                MarvinModeEnable();
                while (true)
                {
                    Thread.Sleep(10000);
                }
            }
            catch (System.Exception ex)
            {
                zERROR.GetZErr(Process.ThisProcess()).Report(4, 'G', ex.ToString(), 0, "Program.cs", 0);
            }
            return 11;
        }

        public static void AddHooks()
        {
            Process Process = Process.ThisProcess();

            Process.Hook("GUC.dll", typeof(Program).GetMethod("ocGameUpdate"), 0x006C8AB2, 5, 0);
        }
        //(That will add a hook at the end of the render function)

        public static Int32 ocGameUpdate(String message)
        {
            Process Process = Process.ThisProcess();
            //each time when gothic renders the game this function will be called
            return 0;
        }
        //Functions
        static byte[] mmenable;
        public static void MarvinModeEnable()
        {
            Process Process = Process.ThisProcess();
            Process.Write(mmenable, 0x006CBF60);
        }

        public static void MarvinModeDisable()
        {
            Process Process = Process.ThisProcess();
            Process.VirtualProtect(0x006CBF60, 25);
            mmenable = Process.ReadBytes(0x006CBF60, 25);
            byte[] arr = new byte[25];
            for (int i = 0; i < arr.Length; i++)
                arr[i] = 0x90;
            Process.Write(arr, 0x006CBF60);


            arr = new byte[] { 0xC3 };
            Process.Write(arr, 0x00432EC0);//Eventhandle marvin mode


        }
    }

}

1 odpowiedź na to pytanie

Rekomendowane odpowiedzi

Zarchiwizowany

Ten temat przebywa obecnie w archiwum. Dodawanie nowych odpowiedzi zostało zablokowane.

×
×
  • Dodaj nową pozycję...