|
You last visited: Today at 20:09
Advertisement
WarRock EU - Code Snippets
Discussion on WarRock EU - Code Snippets within the WarRock forum part of the Shooter category.
|
View Poll Results: Wie findet ihr diesen Thread
|
|
Klasse!
|
  
|
78 |
60.94% |
Geht so
|
  
|
17 |
13.28% |
|
Sinnlos, braucht keiner
|
  
|
33 |
25.78% |
12/25/2010, 11:57
|
#676
|
elite*gold: 900
Join Date: Apr 2009
Posts: 14,981
Received Thanks: 11,403
|
Quote:
Originally Posted by Neqqa™
Code:
{
{
if (Items.norecoil==1)
{
DWORD dwPlayerPtr = *(DWORD*)ADR_PLAYERPOINTER;
if(dwPlayerPtr != 0)
{
*(float*)dwPlayerPtr+0x01C) = 0;
*(float*)(dwPlayerPtr+0x020) = 0;
*(float*)(dwPlayerPtr+0x024) = 0;
}
}
}
}
kommt diese fehlermeldung:
" error C2447: '{': Funktionsheader fehlt - Parameterliste im alten Stil?"
was ist falsch?!
|
Code:
{
[COLOR="Red"][B]Hier muss irgendetwas rein, weil du nicht 2 Klammern hintereinander aufmachen kannst.[/B][/COLOR]
{
if (Items.norecoil==1)
{
DWORD dwPlayerPtr = *(DWORD*)ADR_PLAYERPOINTER;
if(dwPlayerPtr != 0)
{
*(float*)dwPlayerPtr+0x01C) = 0;
*(float*)(dwPlayerPtr+0x020) = 0;
*(float*)(dwPlayerPtr+0x024) = 0;
}
}
}
}
|
|
|
12/25/2010, 12:27
|
#677
|
elite*gold: 2
Join Date: Jul 2009
Posts: 1,447
Received Thanks: 923
|
Quote:
Originally Posted by kilgut12
hat jemand aktuelle detour und einen rehook pls PN me oder post hier rein! bekommt auch thx weil ich es sehr dringend gebrauche!
|
Rehook (Meine art):
PHP Code:
while( 1 )
{
Sleep( 5000 );
if( memcmp((void *)dwDrawIndexedPrimitive, (void *)"\x8B\xFF", 2) == 0 )
pDrawIndexedPrimitive = (oDrawIndexedPrimitive) B8Detour((DWORD)dwDrawIndexedPrimitive, (DWORD)myDrawIndexedPrimitive, 12);
}
return TRUE;
Detour (B8):
PHP Code:
DWORD B8Detour( DWORD SrcVA, DWORD DstVA, DWORD Size )
{
DWORD DetourVA, dwProtect, i;
#define SIZEOF_MOVEAX_JMPEAX 7
if ( SrcVA && DstVA && Size >= SIZEOF_MOVEAX_JMPEAX )
{
DetourVA = (DWORD) VirtualAlloc(
NULL, Size + SIZEOF_MOVEAX_JMPEAX,
MEM_COMMIT, PAGE_EXECUTE_READWRITE );
if ( DetourVA && VirtualProtect( (VOID*)SrcVA, Size, PAGE_EXECUTE_READWRITE, &dwProtect ) )
{
for ( i=0; i < Size; i++ ) {
*(BYTE*)( DetourVA + i ) = *(BYTE*)( SrcVA + i );
}
*(BYTE*)( DetourVA + Size + 0 ) = 0xB8;
*(DWORD*)( DetourVA + Size + 1 ) = ( SrcVA + Size );
*(WORD*)( DetourVA + Size + 5 ) = 0xE0FF;
*(BYTE*)( SrcVA + 0 ) = 0xB8;
*(DWORD*)( SrcVA + 1 ) = ( DstVA );
*(WORD*)( SrcVA + 5 ) = 0xE0FF;
VirtualProtect( (VOID*)SrcVA, Size, dwProtect, &dwProtect );
VirtualProtect( (VOID*)DetourVA, Size +
SIZEOF_MOVEAX_JMPEAX, PAGE_EXECUTE_READ, &dwProtect );
return DetourVA;
}
}
return(0);
}
Heve Fun!
|
|
|
12/25/2010, 12:35
|
#678
|
elite*gold: 20
Join Date: Feb 2010
Posts: 1,125
Received Thanks: 407
|
ist der reook für nomenu hack?^^
wenn ja dann steht da bei rehook:
(bei while) es wurde eine deklaration erwartet...
ich kanns irgendwie nich beheben xDDDD
|
|
|
12/25/2010, 12:39
|
#679
|
elite*gold: 0
Join Date: Apr 2010
Posts: 101
Received Thanks: 13
|
Hab nochmal ein bisschen nach dem Fehler gegooggelt und konnte ihn jetzt beheben. Wenn ich in WarRock injecte, sehe ich jedoch nichts. Wo ist jetzt mein Fehler?
PHP Code:
#include "stdafx.h" #include "D3DHack.h" #include <windows.h> #include <cstdio> #include <d3d9.h> #include <d3dx9.h> typedef HRESULT(__stdcall* EndScene_t)(LPDIRECT3DDEVICE9); EndScene_t pEndScene; const D3DCOLOR txtPink = D3DCOLOR_ARGB(255, 255, 0, 255); // Alpha, Rot, Grün, Blau HRESULT __stdcall EndScene(LPDIRECT3DDEVICE9 pDevice); void DrawRect (LPDIRECT3DDEVICE9 Device_t, int X, int Y, int L, int H, D3DCOLOR color); void *DetourFunc(BYTE *src, const BYTE *dst, const int len); void InitHook(){ HMODULE hModule = NULL; while( !hModule ){ hModule = GetModuleHandleA( "d3d9.dll" ); // Handle zur DLL holen Sleep( 100 ); // 100ms warten } } void *DetourFunc(BYTE *src, const BYTE *dst, const int len){ BYTE *jmp = (BYTE*)malloc(len+5); DWORD dwback; VirtualProtect(src, len, PAGE_READWRITE, &dwback); memcpy(jmp, src, len); jmp += len; jmp[0] = 0xE9; *(DWORD*)(jmp+1) = (DWORD)(src+len - jmp) - 5; src[0] = 0xE9; *(DWORD*)(src+1) = (DWORD)(dst - src) - 5; VirtualProtect(src, len, dwback, &dwback); return (jmp-len); } HRESULT __stdcall EndScene(LPDIRECT3DDEVICE9 pDevice) { pEndScene = ( EndScene_t )DetourFunc((PBYTE) 0x4FDD71B0,(PBYTE)EndScene, 5); //pEndScene = ( EndScene_t )DetourFunc((PBYTE) 0x7542CE09,(PBYTE)EndScene, 5); DrawRect ( pDevice, 10, 10, 200, 200, txtPink); return pEndScene(pDevice); } void DrawRect (LPDIRECT3DDEVICE9 Device_t, int X, int Y, int L, int H, D3DCOLOR color) { D3DRECT rect = {X, Y, X+L, Y+H}; Device_t->Clear(1, &rect, D3DCLEAR_TARGET, color, 0, 0); // bei Google gibt’s näheres } #pragma unmanaged BOOL WINAPI DllMain(HINSTANCE hInst,DWORD reason,LPVOID reserved){ switch(reason){ case DLL_PROCESS_ATTACH: CreateThread(0, 0, (LPTHREAD_START_ROUTINE) InitHook, 0, 0, 0); break; } return true; }
|
|
|
12/25/2010, 14:42
|
#680
|
elite*gold: 21
Join Date: Nov 2010
Posts: 2,062
Received Thanks: 2,320
|
Quote:
if(CH_WallHack==1)
{
if(m_Stride == 36)
{
pDevice->SetRenderState(D3DRS_ZENABLE,false);
}
}
|
Ist der für Menü Hack?
Was für eine Addy brauch ich dafür?
|
|
|
12/25/2010, 14:50
|
#681
|
elite*gold: 20
Join Date: Feb 2010
Posts: 1,125
Received Thanks: 407
|
ich glaub gar keine....
da gibt es was anderes vielleicht die strides? nein ich glaub structs oda so xD
naja hoffe du bekommst eine hilfreichere Antwort ^^
|
|
|
12/25/2010, 14:51
|
#682
|
elite*gold: 0
Join Date: Apr 2010
Posts: 101
Received Thanks: 13
|
Quote:
Originally Posted by ToxicLibrary™
Quote:
if(CH_WallHack==1)
{
if(m_Stride == 36)
{
pDevice->SetRenderState(D3DRS_ZENABLE,false);
}
}
|
Ist der für Menü Hack?
Was für eine Addy brauch ich dafür?
|
Steht da doch schon...
|
|
|
12/25/2010, 15:03
|
#683
|
elite*gold: 900
Join Date: Apr 2009
Posts: 14,981
Received Thanks: 11,403
|
Für den Wallhack brauchst du ne D3D Base
|
|
|
12/25/2010, 15:08
|
#684
|
elite*gold: 21
Join Date: Nov 2010
Posts: 2,062
Received Thanks: 2,320
|
Hab ich gemerkt... Habe mir mal die Ripped base von Weeched geholt... Aber da kommen um die 36 Fehlermeldungen beim Debuggen O.o
#infraction kannst mir vllt per TV helfen?
|
|
|
12/25/2010, 15:13
|
#685
|
elite*gold: 900
Join Date: Apr 2009
Posts: 14,981
Received Thanks: 11,403
|
Quote:
Originally Posted by ToxicLibrary™
Hab ich gemerkt... Habe mir mal die Ripped base von Weeched geholt... Aber da kommen um die 36 Fehlermeldungen beim Debuggen O.o
#infraction kannst mir vllt per TV helfen?
|
Nein Sorry mit der Weeched kom ich selbst nich klar ;o
|
|
|
12/25/2010, 16:02
|
#686
|
elite*gold: LOCKED
Join Date: Dec 2009
Posts: 4,650
Received Thanks: 5,731
|
Quote:
Originally Posted by #Infraction
Für den Wallhack brauchst du ne D3D Base
|
eine d3d base
jede base für warrock ist eine d3d base man muss da nur eine detour rein bauen einen rehook fals es das noch nicht gibt und das wars^^ dann kann man da schon d3d sachen wie wallhack einbauen
|
|
|
12/25/2010, 16:04
|
#687
|
elite*gold: 900
Join Date: Apr 2009
Posts: 14,981
Received Thanks: 11,403
|
Quote:
Originally Posted by Angel-Piece
eine d3d base
jede base für warrock ist eine d3d base man muss da nur eine detour rein bauen einen rehook fals es das noch nicht gibt und das wars^^
|
Man könnte unter Base auch andere Sachen verstehen lieber Pascal ;o
|
|
|
12/25/2010, 16:07
|
#688
|
elite*gold: 0
Join Date: Jul 2010
Posts: 4,574
Received Thanks: 2,250
|
so ne injector base(für visual basic):
Option Strict On
Option Explicit On
Imports System.Runtime.InteropServices
Public Class Form1
Const MEM_COMMIT As Integer = &H1000
Const PAGE_READWRITE As Integer = &H4
Const PROCESS_CREATE_THREAD As Integer = &H2
Const PROCESS_VM_OPERATION As Integer = &H8
Const PROCESS_VM_READ As Integer = &H10
Const PROCESS_VM_WRITE As Integer = &H20
<DllImport("kernel32.dll", SetLastError:=True, CallingConvention:=CallingConvention.Winapi)> _
Public Shared Function OpenProcess(ByVal dwDesiredAccess As UInteger, <MarshalAs(UnmanagedType.Bool)> _
ByVal bInheritHandle As Boolean, ByVal dwProcessId As Integer) As System.IntPtr
End Function
<DllImport("kernel32.dll", SetLastError:=True, CallingConvention:=CallingConvention.Winapi)> _
Public Shared Function WriteProcessMemory(ByVal hProcess As System.IntPtr, ByVal lpBaseAddress As System.IntPtr, _
ByVal lpBuffer As String, ByVal nSize As Int32, <Out()> ByRef lpNumberOfBytesWritten As Int32) As _
<MarshalAs(UnmanagedType.Bool)> Boolean
End Function
<DllImport("kernel32.dll", SetLastError:=True, CallingConvention:=CallingConvention.Winapi)> _
Public Shared Function VirtualAllocEx(ByVal hProcess As IntPtr, ByVal lpAddress As Int32, _
ByVal dwSize As Int32, ByVal flAllocationType As UInteger, _
ByVal flProtect As UInteger) As IntPtr
End Function
<DllImport("kernel32.dll", SetLastError:=True, CallingConvention:=CallingConvention.Winapi)> _
Public Shared Function GetModuleHandle(ByVal lpModuleName As String) As IntPtr
End Function
<DllImport("kernel32.dll", SetLastError:=True, CallingConvention:=CallingConvention.Winapi)> _
Public Shared Function GetProcAddress(ByVal hModule As IntPtr, ByVal lpProcName As String) As UIntPtr
End Function
<DllImport("kernel32.dll", SetLastError:=True, CallingConvention:=CallingConvention.Winapi)> _
Public Shared Function CreateRemoteThread(ByVal hProcess As IntPtr, ByVal lpThreadAttributes As Int32, _
ByVal dwStackSize As UInt32, ByVal lpStartAddress As UIntPtr, ByVal lpParameter As IntPtr, _
ByVal dwCreationFlags As UInt32, ByRef lpThreadId As Int32) As IntPtr
End Function
<DllImport("kernel32.dll", SetLastError:=True, CharSet:=CharSet.Unicode, EntryPoint:="LoadLibraryA")> _
Public Shared Function LoadLibrary(ByVal lpFileName As String) As IntPtr
End Function
Friend WithEvents OZ As New Timer
Const TargetName As String = "WARROCK"
Dim ExeName As String = IO.Path.GetFileNameWithoutExtension(Application.Ex ecutablePath)
Private Sub InnjectionMethods_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.TopMost = True
OZ.Interval = 25
If IO.File.Exists(Application.StartupPath & "\" + ExeName + ".dll") Then
Me.Label1.Text = "...Starte Warrock!"
OZ.Start()
Else
Me.Label1.Text = "..." + ExeName + ".dll nicht gefunden"
End If
End Sub
Private Sub OZs(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OZ.Tick
Dim Target As Process() = Process.GetProcessesByName(TargetName)
If Target.Length <> 0 Then
Me.Label1.Text = "...WarRock Startet!"
OZ.Stop()
InjectToProcess()
End If
End Sub
Sub InjectToProcess()
Dim ExeName As String = IO.Path.GetFileNameWithoutExtension(Application.Ex ecutablePath)
Dim Target As Process() = Process.GetProcessesByName(TargetName)
Dim pHandle As IntPtr = OpenProcess(PROCESS_CREATE_THREAD Or PROCESS_VM_OPERATION Or PROCESS_VM_WRITE, False, Target(0).Id)
Dim pszLibFileRemote As String = Application.StartupPath & "\" + ExeName + ".dll"
Dim pfnStartAddr As UIntPtr = GetProcAddress(GetModuleHandle("Kernel32"), "LoadLibraryA")
Dim TargetBufferSize As Int32 = Int(1 + Len(pszLibFileRemote))
Dim LoadLibParamAdr As IntPtr = VirtualAllocEx(pHandle, 0, TargetBufferSize, MEM_COMMIT, PAGE_READWRITE)
Dim Rtn As Integer = CInt(WriteProcessMemory(pHandle, LoadLibParamAdr, pszLibFileRemote, TargetBufferSize, 0))
If Rtn <> 0 Then
Label1.Text = "...Injection Gelukt!"
Else
Label1.Text = "...Injection misgegaan!"
End If
CreateRemoteThread(pHandle, 0, 0, pfnStartAddr, LoadLibParamAdr, 0, 0)
Me.Close()
End Sub
End Class
|
|
|
12/25/2010, 16:14
|
#689
|
elite*gold: 900
Join Date: Apr 2009
Posts: 14,981
Received Thanks: 11,403
|
Quote:
Originally Posted by _B____
so ne injector base:
Option Strict On
Option Explicit On
Imports System.Runtime.InteropServices
Public Class Form1
Const MEM_COMMIT As Integer = &H1000
Const PAGE_READWRITE As Integer = &H4
Const PROCESS_CREATE_THREAD As Integer = &H2
Const PROCESS_VM_OPERATION As Integer = &H8
Const PROCESS_VM_READ As Integer = &H10
Const PROCESS_VM_WRITE As Integer = &H20
<DllImport("kernel32.dll", SetLastError:=True, CallingConvention:=CallingConvention.Winapi)> _
Public Shared Function OpenProcess(ByVal dwDesiredAccess As UInteger, <MarshalAs(UnmanagedType.Bool)> _
ByVal bInheritHandle As Boolean, ByVal dwProcessId As Integer) As System.IntPtr
End Function
<DllImport("kernel32.dll", SetLastError:=True, CallingConvention:=CallingConvention.Winapi)> _
Public Shared Function WriteProcessMemory(ByVal hProcess As System.IntPtr, ByVal lpBaseAddress As System.IntPtr, _
ByVal lpBuffer As String, ByVal nSize As Int32, <Out()> ByRef lpNumberOfBytesWritten As Int32) As _
<MarshalAs(UnmanagedType.Bool)> Boolean
End Function
<DllImport("kernel32.dll", SetLastError:=True, CallingConvention:=CallingConvention.Winapi)> _
Public Shared Function VirtualAllocEx(ByVal hProcess As IntPtr, ByVal lpAddress As Int32, _
ByVal dwSize As Int32, ByVal flAllocationType As UInteger, _
ByVal flProtect As UInteger) As IntPtr
End Function
<DllImport("kernel32.dll", SetLastError:=True, CallingConvention:=CallingConvention.Winapi)> _
Public Shared Function GetModuleHandle(ByVal lpModuleName As String) As IntPtr
End Function
<DllImport("kernel32.dll", SetLastError:=True, CallingConvention:=CallingConvention.Winapi)> _
Public Shared Function GetProcAddress(ByVal hModule As IntPtr, ByVal lpProcName As String) As UIntPtr
End Function
<DllImport("kernel32.dll", SetLastError:=True, CallingConvention:=CallingConvention.Winapi)> _
Public Shared Function CreateRemoteThread(ByVal hProcess As IntPtr, ByVal lpThreadAttributes As Int32, _
ByVal dwStackSize As UInt32, ByVal lpStartAddress As UIntPtr, ByVal lpParameter As IntPtr, _
ByVal dwCreationFlags As UInt32, ByRef lpThreadId As Int32) As IntPtr
End Function
<DllImport("kernel32.dll", SetLastError:=True, CharSet:=CharSet.Unicode, EntryPoint:="LoadLibraryA")> _
Public Shared Function LoadLibrary(ByVal lpFileName As String) As IntPtr
End Function
Friend WithEvents OZ As New Timer
Const TargetName As String = "WARROCK"
Dim ExeName As String = IO.Path.GetFileNameWithoutExtension(Application.Ex ecutablePath)
Private Sub InnjectionMethods_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.TopMost = True
OZ.Interval = 25
If IO.File.Exists(Application.StartupPath & "\" + ExeName + ".dll") Then
Me.Label1.Text = "...Starte Warrock!"
OZ.Start()
Else
Me.Label1.Text = "..." + ExeName + ".dll nicht gefunden"
End If
End Sub
Private Sub OZs(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OZ.Tick
Dim Target As Process() = Process.GetProcessesByName(TargetName)
If Target.Length <> 0 Then
Me.Label1.Text = "...WarRock Startet!"
OZ.Stop()
InjectToProcess()
End If
End Sub
Sub InjectToProcess()
Dim ExeName As String = IO.Path.GetFileNameWithoutExtension(Application.Ex ecutablePath)
Dim Target As Process() = Process.GetProcessesByName(TargetName)
Dim pHandle As IntPtr = OpenProcess(PROCESS_CREATE_THREAD Or PROCESS_VM_OPERATION Or PROCESS_VM_WRITE, False, Target(0).Id)
Dim pszLibFileRemote As String = Application.StartupPath & "\" + ExeName + ".dll"
Dim pfnStartAddr As UIntPtr = GetProcAddress(GetModuleHandle("Kernel32"), "LoadLibraryA")
Dim TargetBufferSize As Int32 = Int(1 + Len(pszLibFileRemote))
Dim LoadLibParamAdr As IntPtr = VirtualAllocEx(pHandle, 0, TargetBufferSize, MEM_COMMIT, PAGE_READWRITE)
Dim Rtn As Integer = CInt(WriteProcessMemory(pHandle, LoadLibParamAdr, pszLibFileRemote, TargetBufferSize, 0))
If Rtn <> 0 Then
Label1.Text = "...Injection Gelukt!"
Else
Label1.Text = "...Injection misgegaan!"
End If
CreateRemoteThread(pHandle, 0, 0, pfnStartAddr, LoadLibParamAdr, 0, 0)
Me.Close()
End Sub
End Class
|
Du Solltest noch hinzuschreiben das das für Basic.Net ist.
Und noch ne Frage, wiso is das auf Niederländisch?
|
|
|
12/25/2010, 16:15
|
#690
|
elite*gold: LOCKED
Join Date: Dec 2009
Posts: 4,650
Received Thanks: 5,731
|
Quote:
Originally Posted by #Infraction
Man könnte unter Base auch andere Sachen verstehen lieber Pascal ;o
|
okay
|
|
|
 |
|
Similar Threads
|
WTB Flyff Source code snippets
04/01/2012 - Flyff Trading - 0 Replies
Hellow I posted this because I wanted to buy a fix scroll of unbinding.Which removes soul-link of an item.If you have its code snippets PM me.Don't sell me a code which is release because all of them are not working.I wanted to buy a fix one and a non-buggy code
Payment:via Paypal
|
[Autoit] Youtube Code Snippets
07/29/2011 - AutoIt - 5 Replies
Tag Zusammen.
Wie wohl die meisten von euch mitbekommen haben, bieten derzeit sehr viele User hier sogenannte Youtube Services an, bei denen man Abos, Likes, Dislikes etc. kaufen kann.
Doch wer wirklich Erfolg haben will, braucht natürlich viele Abonnenten und Likes, was per Hand Tage dauern würde.
Deshalb werden hier in letzter Zeit immer mehr Youtube Bots verkauft.
Was, wie ich finde, ein ziemliche Abzocke ist, da das meist nur sehr schlechte Bots sind, die lediglich den Internet...
|
Some Code-Snippets[PSERVER]
07/15/2011 - Kal Hacks, Bots, Cheats & Exploits - 17 Replies
This is the code of the hack which Fremo released..
I got new methods so I dont need this anymore & maybe it'll help some people...
G31 Adult Skill
if(comboBox4->Text=="Panther'crit'")
{
KC->Chat(255," Panther Skill ON");
KC->Threads=1;
KC->lasttime = timeGetTime()-15000;
}
else if(comboBox4->Text=="Tiger'otp'")
|
[Release] Code Snippets Manager
01/21/2011 - Coding Releases - 0 Replies
Code Snippets Manager
http://upit.cc/images/1d47d78e.jpg
Hab mich heute mal rangesetzt, und einen kleinen Manager für
Code-Snippets(Code-Fetzen) gecodet, da ich alles sortiert
in einer Anwendung wollte.
Da es sicherlich jemand nützlich finden wird, lad ich es hier mal hoch.
|
All times are GMT +1. The time now is 20:09.
|
|