Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > Coding Releases
You last visited: Today at 04:47

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Python-RLS]Injector source

Discussion on [Python-RLS]Injector source within the Coding Releases forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 198
Join Date: Mar 2011
Posts: 835
Received Thanks: 263
[Python-RLS]Injector source

Viel gibts dazu nicht zu sagen, vielleicht kann es einer brauchen =)
Es gibt alle Pids der Prozesse aus die gerade laufen, danach gibt man PID + DLL ein und diese wird injected das ist eigentlich schon alles ^^
Wenn es Fragen gibt, einfach drauflos schreiben.
PHP Code:
'''
Created on 24.05.2013

@author: Patrick Walther
'''
import sys
from ctypes import 
*

PAGE_READWRITE      0x04
VIRTUAL_MEM         
= (0x1000 0x2000)
PROCESS_ALL_ACCESS  0x1F0FFF

kernel32    
windll.kernel32
psapi       
windll.psapi

def EnumProcesses
():
    
arr c_ulong 256
    lpidProcess
arr()
    
cb sizeof(lpidProcess)
    
cbNeeded c_ulong()
    
hModule c_ulong()
    
count c_ulong()
    
modname c_buffer(30)
    
PROCESS_QUERY_INFORMATION 0x0400
    PROCESS_VM_READ 
0x0010
    
    
#Call Enumprocesses to get hold of process id's
    
psapi.EnumProcesses(byref(lpidProcess),
                        
cb,
                        
byref(cbNeeded))
    
    
#Number of processes returned
    
nReturned cbNeeded.value/sizeof(c_ulong())
    
    
pidProcess = [for i in lpidProcess][:nReturned]
    
    for 
pid in pidProcess:
        
        
#Get handle to the process based on PID
        
hProcess kernel32.OpenProcess(PROCESS_QUERY_INFORMATION PROCESS_VM_READ,
                                      
False,
                                      
pid)
        if 
hProcess:
            
psapi.EnumProcessModules(hProcess,
                                    
byref(hModule),
                                    
sizeof(hModule),
                                    
byref(count))
                                    
            
psapi.GetModuleBaseNameA(hProcess,
                                    
hModule.value,
                                    
modname,
                                    
sizeof(modname))
                                    
            print 
"".join([ for i in modname if != '\x00'])
            print 
" PID: %d" pid
            
            
#-- Clean up
            
for i in range(modname._length_):
                
modname[i]='\x00'
            
            
kernel32.CloseHandle(hProcess)

EnumProcesses()

pid         raw_input("Enter the pid of the process to inject to: ")
dll_path    raw_input("Enter the path to the dll: ")

dll_len     len(dll_path)

# Get process handle
h_process kernel32.OpenProcess(PROCESS_ALL_ACCESSFalseint(pid))

if 
not h_process:
    print
"[*] Couldn't acquire a handle to PID: %s" pid
    sys
.exit(0)
    
# Get some storage for the dll-path
arg_address kernel32.VirtualAllocEx(h_process0dll_lenVIRTUAL_MEMPAGE_READWRITE)

# Write dll in the allocated storage
written c_int(0)
kernel32.WriteProcessMemory(h_process,arg_addressdll_pathdll_lenbyref(written))


h_kernel32  kernel32.GetModulHandleA("kernel32.dll")
h_loadlib   kernel32.GetProcAddress(h_kernel32,"LoadLibraryA")

#try to create remote thread

thread_id c_ulong(0)

if 
not kernel32.CreateRemoteThread(h_process,
                                   
None,
                                   
0,
                                   
h_loadlib,
                                   
arg_address,
                                   
0,
                                   
byref(thread_id)):
    print 
"[*] Failed to inject the DLL. Exiting."
    
sys.exit(0)
    
print 
"[*] Remote thread with ID 0x%08x created." thread_id.value 
ƬheGame is offline  
Reply


Similar Threads Similar Threads
Source in Python
04/25/2012 - CO2 Private Server - 6 Replies
Has there ever been done one that I could use as reference or something? Or I'd be totally on my own feets? I tried search, but had no result and didn't really expect any results anyway. :)
[VB Source] WarRock Injector (32 | 64)
03/26/2012 - WarRock Hacks, Bots, Cheats & Exploits - 14 Replies
An dem Source Code habe ich einiges geändert. Sollte jetzt auch für 64 Bit funktionieren. (Hier der alte Source: Klick) Edited Source by me: Ihr braucht nur ein TextBox hinzuzufügen Public Class Form1 Private TargetProcessHandle As Integer
[rls] Python Downloader source
03/18/2012 - Metin2 PServer Guides & Strategies - 1 Replies
Hey. Da olli seinen patcher da released hat und sich manche von euch bestimmt fragen, wie so etwas geht, hab ich mir die 2 minuten arbeit gemacht euch nen simplen sha1 patcher zu schreiben (kein INGAME-Patcher wie der von OLLI!) Er soll lediglich die grundfunktion veranschaulichen ( für die, die interesse daran haben) Und er funktioniert zb mit dem patchlist creator von olli. #sha1 downloader-fun script xCPx import sha import urllib patchlist =...
dll injector source code?
08/13/2011 - Soldier Front - 7 Replies
I'm just downloaded VB 2010 and I'm willing to make injector for special force.. Do you guys know where I can find .dll injector source code? :):)



All times are GMT +2. The time now is 04:47.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.