Beiträge von Sharpadox

    Und wie mache ich das? Ich finde in Google nur haufenweise Codes für Injektoren, aber schaffe es iwie nicht die zu verwenden ^^


    zB habe ich mir mal den hier genommen:

    Inhalt anzeigen

    C
    using System;using System.Diagnostics;using System.IO;using System.Runtime.InteropServices;using System.Text;namespace samp_launcher{	public enum DllInjectionResult	{    	DllNotFound,    	GameProcessNotFound,    	InjectionFailed,    	Success	}	public sealed class DllInjector	{    	static readonly IntPtr INTPTR_ZERO = (IntPtr)0;    	[DllImport("kernel32.dll", SetLastError = true)]    	static extern IntPtr OpenProcess(uint dwDesiredAccess, int bInheritHandle, uint dwProcessId);    	[DllImport("kernel32.dll", SetLastError = true)]    	static extern int CloseHandle(IntPtr hObject);    	[DllImport("kernel32.dll", SetLastError = true)]    	static extern IntPtr GetProcAddress(IntPtr hModule, string lpProcName);    	[DllImport("kernel32.dll", SetLastError = true)]    	static extern IntPtr GetModuleHandle(string lpModuleName);    	[DllImport("kernel32.dll", SetLastError = true)]    	static extern IntPtr VirtualAllocEx(IntPtr hProcess, IntPtr lpAddress, IntPtr dwSize, uint flAllocationType, uint flProtect);    	[DllImport("kernel32.dll", SetLastError = true)]    	static extern int WriteProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, byte[] buffer, uint size, int lpNumberOfBytesWritten);    	[DllImport("kernel32.dll", SetLastError = true)]    	static extern IntPtr CreateRemoteThread(IntPtr hProcess, IntPtr lpThreadAttribute, IntPtr dwStackSize, IntPtr lpStartAddress,        	IntPtr lpParameter, uint dwCreationFlags, IntPtr lpThreadId);    	static DllInjector _instance;    	public static DllInjector GetInstance    	{        	get        	{            	if (_instance == null)            	{                	_instance = new DllInjector();            	}            	return _instance;        	}    	}    	DllInjector() { }    	public DllInjectionResult Inject(string sProcName, string sDllPath)    	{        	if (!File.Exists(sDllPath))        	{            	return DllInjectionResult.DllNotFound;        	}        	uint _procId = 0;        	Process[] _procs = Process.GetProcesses();        	for (int i = 0; i < _procs.Length; i++)        	{            	if (_procs[i].ProcessName == sProcName)            	{                	_procId = (uint)_procs[i].Id;                	break;            	}        	}        	if (_procId == 0)        	{            	return DllInjectionResult.GameProcessNotFound;        	}        	if (!bInject(_procId, sDllPath))        	{            	return DllInjectionResult.InjectionFailed;        	}        	return DllInjectionResult.Success;    	}    	bool bInject(uint pToBeInjected, string sDllPath)    	{        	IntPtr hndProc = OpenProcess((0x2 | 0x8 | 0x10 | 0x20 | 0x400), 1, pToBeInjected);        	if (hndProc == INTPTR_ZERO)        	{            	return false;        	}        	IntPtr lpLLAddress = GetProcAddress(GetModuleHandle("kernel32.dll"), "LoadLibraryA");        	if (lpLLAddress == INTPTR_ZERO)        	{            	return false;        	}        	IntPtr lpAddress = VirtualAllocEx(hndProc, (IntPtr)null, (IntPtr)sDllPath.Length, (0x1000 | 0x2000), 0X40);        	if (lpAddress == INTPTR_ZERO)        	{            	return false;        	}        	byte[] bytes = Encoding.ASCII.GetBytes(sDllPath);        	if (WriteProcessMemory(hndProc, lpAddress, bytes, (uint)bytes.Length, 0) == 0)        	{            	return false;        	}        	if (CreateRemoteThread(hndProc, (IntPtr)null, INTPTR_ZERO, lpLLAddress, lpAddress, 0, (IntPtr)null) == INTPTR_ZERO)        	{            	return false;        	}        	CloseHandle(hndProc);        	return true;    	}	}}

    Inhalt anzeigen


    Nur weiß ich einfach nicht, wie ich auf "Inject(string sProcName, string sDllPath)" zugreifen kann..

    Ich habs mir auch mal durchgelesen, da ich selber hilfe zu dem Thema brauche.
    Nun habe ich es auch so gemacht, aber das geht nicht ^^
    Der connected mit ":7777" und hat immer "wrong server password"


    C
    Process Proz = new Process();
            	Proz.StartInfo.WorkingDirectory = std_dir;
            	Proz.StartInfo.FileName = "samp.exe";
            	Proz.StartInfo.Arguments = "-c -n " + loggedName + " -h " + server_ip + " -p " + server_port + " -z " + server_password;
            	Proz.Start();

    Deutschland sinnlos da es kein Server gibt der über die 200-300 Spanne steigt.

    Doch schon ;)


    Inhalt anzeigen
    HostName: .:: GTA-City Reallife ::.
    Address: //snipped by BlackAce
    Players: 294 / 350
    Ping: 32
    Mode: German Reallife
    Map: San Andreas

    Inhalt anzeigen

    Inhalt anzeigen
    Slots sind sau oft voll.

    Ging mir mit dem damaligen NaMe oF LiFe Projekt auch so. Anfangs dauernd 40-50 Spieler und tja nach 11 Tagen genau war nix mehr los.


    Jo, da war ich dabei. Ich wäre da geblieben, aber das war echt beschissen, was Dippoh und Mozilla gemacht hatten, wodurch wir dann rausgeworfen wurden.
    War eigentlich ein ganz cooler Server, aber da Rico ja so viele Leute rausschmeissen musste ... naja ^^