Jump to content
×
×
  • Create New...
  • 0

Start DLL via Python?


DasSchwarzeT

Question

2 answers to this question

Recommended Posts

  • 0
  • Premium

You can do so: (like Fusion-Network // credits  to iSouli)

Run a batch via python, move the  dll to the client , and/or rename it to mix, then start the client exe. 

move "C:UsersiSouliDesktopiSouli~1Dark-FusionFusion-Networkcoreswitchbotv3.mix" "C:UsersiSouliDesktopiSouli~1Dark-FusionFusion-Networkswitchbotv3.mix"
taskkill /im Fusion-Network.exe
ping -n 2 127.0.0.1 > NUL
chdir C:UsersiSouliDesktopiSouli~1Dark-FusionFusion-Network
start Fusion-Network.exe
ping -n 2 127.0.0.1 > NUL
move "C:UsersiSouliDesktopiSouli~1Dark-FusionFusion-Networkswitchbotv3.mix" "C:UsersiSouliDesktopiSouli~1Dark-FusionFusion-Networkcoreswitchbotv3.mix"

You must just run the batch with a python command :)

  • Love 1
Link to comment
Share on other sites

  • 0
  • Moon

use to ctype module.

from ctypes import *
import sys,ctypes
import dbg

PAGE_RW_PRIV = 0x04
PROCESS_ALL_ACCESS = 0x1F0FFF
VIRTUAL_MEM = 0x3000

kernel32 = windll.kernel32

def dllInject(PID,dllPath):
	if(PID == 0 or dllPath == ""):
		dbg.LogBox("PID or dll path not entered.")
		sys.exit(0)
	
	LEN_DLL = len(dllPath)
	hProcess = kernel32.OpenProcess(PROCESS_ALL_ACCESS,False,PID)
	
	if(hProcess == None):
		dbg.LogBox("Unable to get process handle.")
		sys.exit(0)
	
	DLL_PATH_ADDR = kernel32.VirtualAllocEx(hProcess,0,LEN_DLL,VIRTUAL_MEM,PAGE_RW_PRIV)
	
	bool_Written = c_int(0)
	
	kernel32.WriteProcessMemory(hProcess,DLL_PATH_ADDR,dllPath,LEN_DLL,byref(bool_Written))
	kernel32DllHandler_addr = kernel32.GetModuleHandleA("kernel32")
	LoadLibraryA_func_addr = kernel32.GetProcAdress(kernel32DllHandler_addr,"LoadLibraryA")
	
	thread_id = c_ulong(0)
	
	if(not kernel32.CreateRemoteThread(hProcess,None,0,LoadLibraryA_func_addr,DLL_PATH_ADDR,0,byref(thread_id))):
		dbg.LogBox("Injection failed.")
		sys.exit(0)
	

Regards HaveBeen ;)

  • Love 1

Plain logic saves lives.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.


  • Activity

    1. 36

      Destroy Item System

    2. 1

      Brillances

    3. 0

      Fusion.org is Looking for Staff Members

    4. 1

      Brillances

    5. 3

      ELONIA2 | PVM-MEDIUM | 11 LANGUAGES | INTERNATIONAL | A NEW STORY

    6. 4

      Spider Queen not spawining in spider dungeon v1

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.