|
You last visited: Today at 10:01
Advertisement
Self Inject
Discussion on Self Inject within the GW Bots forum part of the Guild Wars category.
05/20/2010, 06:31
|
#1
|
elite*gold: 0
Join Date: Apr 2008
Posts: 15
Received Thanks: 0
|
Self Inject
Moin,
Also folgendes ich habe derzeit wieder angefangen mit Autoit und da ich noch nicht wirklich soviel ahnung hab von GWCA wollt ich hier nun mal fragen, Also ich bin derzeit an einem Bot schreiben und möchte dort eine Self Injection einbauen. den passenden code habe ich schon im www gefunden. Soweit alles gut, doch wenn ich nun den Bot Ausführe steht zwar dran das es Injectet wurde aber oben links im GW fenster steht nicht mein Name dran. Hier mal der Code
PHP Code:
;InjectDLL
Global $bot = "General"
Global $inject = 1
If Not FileExists(@ScriptDir & "\Graphics.dll") Then
loggen("Die Dll wurde nicht gefunden")
$msgbox = MsgBox(36, "Error", "Die Dll wurde nicht gefunden!" & Chr(13) & Chr(13) & "Herunterladen?")
If $msgbox = 6 Then
InetGet("http://gwca.googlecode.com/files/Graphics.dll", "Graphics.dll", 1, 1)
While @InetGetActive
TrayTip("Downloading", "Es wurden " & @InetGetBytesRead & " Bytes heruntergeladen!", 10, 16)
Sleep(100)
WEnd
MsgBox(0, "Update", "Die Datei wurde heruntergeladen!")
MsgBox(0, "Update", "Es befindet sich nun eine neue Graphics.dll im Ordner!")
EndIf
EndIf
$hwnd = WinGetHandle("Guild Wars")
Global Const $dllpath = @ScriptDir & "\Graphics.dll"
If Not FileExists($dllpath) Then Exit
$iDLL = InjectDll($hwnd, $dllpath)
If Not @error Then
TrayTip("", "Injection Successfull", 1)
loggen("Dll erfolgreich injected")
Global $inject = 1
Else
MsgBox(0x10, "Error in DLL Injection", "Guild Wars ist möglicherweise nicht gestartet" )
Global $inject = -1
loggen("Fehler beim injecten der Dll")
EndIf
Func InjectDll($hWnd, $dllpath)
If IsHWnd($hwnd) = 0 Then
SetError(-1)
Return False
ElseIf StringLen($dllpath) <= 4 Or StringRight($dllpath, 4) <> ".dll" Then
SetError(-2)
Return False
EndIf
Local $pid, $pHandle, $pLibRemote, $modHandle, $LoadLibraryA, $hThread
Local $kernel32 = DllOpen("kernel32.dll")
If $kernel32 = -1 Then
Exit
EndIf
$pid = DllCall("user32.dll", "int", "GetWindowThreadProcessId", "hwnd", $hWnd, "int*", 0)
If IsArray($pid) Then
$pid = $pid[2]
Else
SetError(-3)
Return False
EndIf
$pHandle = DllCall($kernel32, "int", "OpenProcess", "int", 0x1F0FFF, "int", 0, "int", $pid)
If IsArray($pHandle) And $pHandle[0] > 0 Then
$pHandle = $pHandle[0]
Else
SetError(-4)
Return False
EndIf
$pLibRemote = DllCall($kernel32, "int", "VirtualAllocEx", "int", $pHandle, "short", 0, "int", 0x1000, "int", 0x1000, "int", 4)
If IsArray($pLibRemote) Then
If $pLibRemote[0] > 0 Then
$pLibRemote = $pLibRemote[0]
Else
SetError(-5)
Return False
EndIf
Else
SetError(-6)
Return False
EndIf
For $i = 0 To StringLen($dllpath)
$ret = DllCall("kernel32.dll", "int", "WriteProcessMemory", "int", $pHandle, "int", $pLibRemote + $i, "int*", Asc(StringMid($dllpath, $i + 1, 1)), "int", 1, "int", 0)
If IsArray($ret) Then
If $ret[0] = 0 Then
SetError(-7)
Return False
EndIf
Else
SetError(-8)
Return False
EndIf
Next
$modHandle = DllCall($kernel32, "long", "GetModuleHandle", "str", "kernel32.dll")
If IsArray($modHandle) Then
If $modHandle[0] > 0 Then
$modHandle = $modHandle[0]
Else
SetError(-9)
Return False
EndIf
Else
SetError(-10)
Return False
EndIf
$LoadLibraryA = DllCall($kernel32, "long", "GetProcAddress", "long", $modHandle, "str", "LoadLibraryA")
If IsArray($LoadLibraryA) Then
If $LoadLibraryA[0] > 0 Then
$LoadLibraryA = $LoadLibraryA[0]
Else
SetError(-11)
Return False
EndIf
Else
SetError(-12)
Return False
EndIf
$hThread = DllCall($kernel32, "int", "CreateRemoteThread", "int", $pHandle, "int", 0, "int", 0, "long", $LoadLibraryA, "long", $pLibRemote, "int", 0, "int", 0)
If IsArray($hThread) Then
If $hThread[0] > 0 Then
$hThread = $hThread[0]
Else
SetError(-13)
Return False
EndIf
Else
SetError(-14)
Return False
EndIf
DllCall($kernel32, "int", "VirtualFreeEx", "int", $pHandle, "int", $pLibRemote, "int", 0x1000, "int", 0x8000)
DllCall($kernel32, "int", "CloseHandle", "int", $hThread)
DllCall($kernel32, "int", "CloseHandle", "int", $pHandle)
DllClose($kernel32)
Return True
EndFunc
Hoffe ihr könnt mir helfen.
greetz HoimeBase
|
|
|
05/20/2010, 12:39
|
#2
|
elite*gold: 100
Join Date: Oct 2007
Posts: 738
Received Thanks: 485
|
Lass dir mal das Ausgeben: $dllpath
Und schau ob dort auch wirklich eine DLL ist.
Oder bist du auch wirklich mit einem Char eingeloggt!
Oder versuch mal beides als Admin zu starten oder schalte UAC aus!
|
|
|
05/20/2010, 12:48
|
#3
|
elite*gold: 0
Join Date: Apr 2008
Posts: 15
Received Thanks: 0
|
danke für deine antwort. könntes du mir vll sagen wie ich ein $dllpath ausgeben kann.
|
|
|
05/20/2010, 12:59
|
#4
|
elite*gold: 100
Join Date: Oct 2007
Posts: 738
Received Thanks: 485
|
ConsoleWrite($dllpath&@crlf)
|
|
|
05/20/2010, 13:10
|
#5
|
elite*gold: 1826
Join Date: Mar 2009
Posts: 4,310
Received Thanks: 6,287
|
Eventuell einfach mal mit dem Originalcode versuchen.
Der da hat soviele kuriose checks.
|
|
|
05/20/2010, 14:39
|
#6
|
elite*gold: 0
Join Date: Apr 2008
Posts: 15
Received Thanks: 0
|
Originalcore verwendet funktioniert trotzdem nicht.
|
|
|
05/21/2010, 14:34
|
#7
|
elite*gold: 50
Join Date: Feb 2009
Posts: 2,173
Received Thanks: 1,766
|
Quote:
Originally Posted by HoimeBase
Originalcore verwendet funktioniert trotzdem nicht.
|
Was funktioniert denn nicht?
|
|
|
05/21/2010, 18:57
|
#8
|
elite*gold: 1826
Join Date: Mar 2009
Posts: 4,310
Received Thanks: 6,287
|
Lass dir dochmal den Return von Injectmodule ausgeben.. ist ja schön das du uns hier erzählst das was nicht geht.
Übrigens, mein Auto fährt nicht. Weiß jemand wodran's liegt?
|
|
|
05/21/2010, 19:14
|
#9
|
elite*gold: 100
Join Date: Oct 2007
Posts: 738
Received Thanks: 485
|
Mhh vllt der Motor, würde dir raten es mit einem Baseball Schläger zu reparieren!
|
|
|
05/21/2010, 19:28
|
#10
|
elite*gold: 0
Join Date: Apr 2008
Posts: 15
Received Thanks: 0
|
Quote:
Originally Posted by u-coRe
Lass dir dochmal den Return von Injectmodule ausgeben.. ist ja schön das du uns hier erzählst das was nicht geht.
|
joa dann erklär mal wie das genau geht weil kein plan kk thx bb
|
|
|
05/21/2010, 20:40
|
#11
|
elite*gold: 0
Join Date: Feb 2010
Posts: 760
Received Thanks: 204
|
Quote:
Originally Posted by u-coRe
Übrigens, mein Auto fährt nicht. Weiß jemand wodran's liegt?
|
vergessen Benzin zu injecten?
falls der Auto inject nicht funktioniert, empfehle ich einfach einen Injector zu benutzen...
ich empfehle hier den Injector "Zapfsäule", klappt meines wissens am besten.
bei der alten Kuplung version (v1.0 - v1.3) muss man den Gang selbst einstellen..
Bei der neuen (v2.2) sollte dies aber behoben sein.
|
|
|
05/21/2010, 21:13
|
#12
|
elite*gold: 0
Join Date: Jan 2010
Posts: 447
Received Thanks: 315
|
Also ich habe das hier mal vor langer Zeit im INet gefunden (etwas abgeändert), aber es funktioniert immernoch einwandfrei:
PHP Code:
_Inject(WinGetHandle('Guild Wars'), @ScriptDir & '\Graphics.dll') Func _Inject($hWnd, $dllpath) AutoItSetOption("WinTitleMatchMode", 2) If IsHWnd($hWnd) = 0 then SetError(-1) Return False ElseIf StringLen($dllpath) <= 4 Or StringRight($dllpath, 4) <> ".dll" Then SetError(-2) Return False EndIf
Local $pid, $pHandle, $pLibRemote, $modHandle, $LoadLibraryA, $hThread
Local $kernel32 = DllOpen("kernel32.dll")
$pid = DllCall("user32.dll", "int", "GetWindowThreadProcessId", "hwnd", $hWnd, "int*", 0) If IsArray($pid) Then $pid = $pid[2] Else SetError(-3) Return False EndIf
$pHandle = DllCall($kernel32, "int", "OpenProcess", "int", 0x1F0FFF, "int", 0, "int", $pid) If IsArray($pHandle) And $pHandle[0] > 0 Then $pHandle = $pHandle[0] Else SetError(-4) Return False EndIf
$pLibRemote = DllCall($kernel32, "int", "VirtualAllocEx", "int", $pHandle, "short", 0, "int", 0x1000, "int", 0x1000, "int", 4) If IsArray($pLibRemote) Then If $pLibRemote[0] > 0 Then $pLibRemote = $pLibRemote[0] Else SetError(-5) Return False EndIf Else SetError(-6) Return False EndIf
For $i = 0 To StringLen($dllpath) $ret = DllCall("kernel32.dll", "int", "WriteProcessMemory", "int", $pHandle, "int", $pLibRemote + $i, "int*", Asc(StringMid($dllpath, $i + 1, 1)), "int", 1, "int", 0) If IsArray($ret) Then If $ret[0] = 0 Then SetError(-7) Return False EndIf Else SetError(-8) Return False EndIf Next
$modHandle = DllCall($kernel32, "long", "GetModuleHandle", "str", "kernel32.dll") If IsArray($modHandle) Then If $modHandle[0] > 0 Then $modHandle = $modHandle[0] Else SetError(-9) Return False EndIf Else SetError(-10) Return False EndIf
$LoadLibraryA = DllCall($kernel32, "long", "GetProcAddress", "long", $modHandle, "str", "LoadLibraryA") If IsArray($LoadLibraryA) Then If $LoadLibraryA[0] > 0 Then $LoadLibraryA = $LoadLibraryA[0] Else SetError(-11) Return False EndIf Else SetError (-12) Return False EndIf
$hThread = DllCall($kernel32, "int", "CreateRemoteThread", "int", $pHandle, "int", 0, "int", 0, "long", $LoadLibraryA, "long", $pLibRemote, "int", 0, "int", 0) If IsArray($hThread) Then If $hThread[0] > 0 Then $hThread = $hThread[0] Else SetError(-13) Return False EndIf Else SetError(-14) Return False EndIf
DllCall($kernel32, "int", "VirtualFreeEx", "int", $pHandle, "int", $pLibRemote, "int", 0x1000, "int", 0x8000) DllCall($kernel32, "int", "CloseHandle", "int", $hThread) DllCall($kernel32, "int", "CloseHandle", "int", $pHandle)
DllClose($kernel32)
Return True EndFunc
|
|
|
05/21/2010, 22:10
|
#13
|
elite*gold: 2
Join Date: Mar 2008
Posts: 1,778
Received Thanks: 1,222
|
^this
Dann einfach FileOpenDialog nehmen, DLL auswählen und Handle von Guild Wars holen und glücklich sein
|
|
|
05/22/2010, 07:36
|
#14
|
elite*gold: 1826
Join Date: Mar 2009
Posts: 4,310
Received Thanks: 6,287
|
Quote:
Originally Posted by Deset
vergessen Benzin zu injecten?
falls der Auto inject nicht funktioniert, empfehle ich einfach einen Injector zu benutzen...
ich empfehle hier den Injector "Zapfsäule", klappt meines wissens am besten.
bei der alten Kuplung version (v1.0 - v1.3) muss man den Gang selbst einstellen..
Bei der neuen (v2.2) sollte dies aber behoben sein.
|
Alles geregelt, lag am Betriebssystem. Mir hätte mal jemand sagen sollen das der V8 nicht mit der Superbleifrei.dll läuft..
Naja, Zündkerzen nochmal ausgewechselt.. jetzt läuft alles wieder !
AT: Hast du 64bit?
Edit:
Quote:
Originally Posted by HoimeBase
joa dann erklär mal wie das genau geht weil kein plan kk thx bb
|
bin dann mal weg.
/leavethread
|
|
|
05/23/2010, 09:15
|
#15
|
elite*gold: 0
Join Date: Apr 2008
Posts: 15
Received Thanks: 0
|
ja hab 64bit
|
|
|
 |
Similar Threads
|
Could not Inject *.dll
08/26/2010 - WarRock - 6 Replies
Hallo e*pvpers,
als ich meinen Hack auf meinem Zweit-PC testen wollte kam plötzlich diese Fehlermeldung: "COULD NOT INJECT vistaxxxl.dll"
Beim anderen PC funktioniert der Hack aber einwandfrei, bitte helft mir ich bin am verzweifeln
MFG vistaxxxl
PS: ich habe meinen und Naerons Injector benutzt und beide PCs sind XP 32bit
|
[help] dll-inject
12/30/2009 - General Coding - 4 Replies
hab mir eine dll zum injecten mit vc++2008 compiliert .. mit mhs injected
(DLL Injector)
funzt super.. leider kann ich aber nach dem ich uninject gedrückte habe die dll nicht neu compilieren
vc++ error: blahblah kann nicht zum Schreiben geöffnet werden.
die dll ist aber nicht mehr im prozess -.- erst nachdem ich das injectete prog beendet habe kann ich die dll neu compilieren.. was mach ich falsch =/ ?
|
inject wpe in ro with GG?
11/07/2009 - Ragnarok Online - 0 Replies
is it possible to inject wpe in RO client with GG?
because when i try to hex GG when u log in it will only last around 10secs and get DC. this is from PRO valkyrie server. they updated game guard which made botting and sniffing hard :(
|
how to inject?
12/12/2008 - Kal Online - 16 Replies
sry for that kind nooby question but i need know i do it first time and soo plz help me
dont flame or insolt
sry for bad english
plz help you get tnx!
|
All times are GMT +1. The time now is 10:03.
|
|