Hey Community,
Für Leute die gerne die Resourcen in Dlls verlagern ist dieses Script perfekt.
Es erstellt per Knopfdruck eine leere Dll ohne unnötigen Balast (Keine Funktionen, Keine Imports/Exports)
Hier der minimalistische Code:
Spoiler anzeigen
#NoTrayIcon
Global $bEmptyDll = "0x4D5A80000100000004001000FFFF0000400100000000000040000000000000" & _
"0000000000000000000000000000000000000000000000000000000000800000000E1FBA0E00B" & _
"409CD21B8014CCD21546869732070726F6772616D2063616E6E6F742062652072756E20696E20" & _
"444F53206D6F64652E0D0A240000000000000000504500004C010300B170B04D0000000000000" & _
"000E0000E210B0101450000000000000000000000000000000000100000001000000000400000" & _
"10000000020000010000000000000004000000000000000010000000020000929700000200400" & _
"10010000000100000000001000000000000000000100000000010000000000000000000000000" & _
"00000000000000000000000000000000000000000000000000000010000000000000000000000" & _
"00000000000000000000000000000000000000000000000000000000000000000000000000000" & _
"000000000000000000000000000000000000000000000000000000000000000000000000002E7" & _
"46578740000000000000000100000000000000002000000000000000000000000000020000060" & _
"2E656461746100000000000000100000000000000002000000000000000000000000000040000" & _
"0402E72656C6F6300000000000000100000000000000002000000000000000000000000000040" & _
"00000200000000000000000000000000000000" ;Created with FASM (Flat Assembler)
Global $hMainGui = GUICreate("EmptyDllCreator", 250, 48)
Global $hMainCreate = GUICtrlCreateButton("Create empty Dll", 8, 8, 234, 32)
GUISetState()
While 1
Switch GUIGetMsg()
Case -3
Exit
Case $hMainCreate
$sSave = FileSaveDialog("EmptyDllCreator", "", "Dynamic Link Libary (*.dll)", 18, "", $hMainGui)
If @error Then ContinueLoop
If StringRight($sSave, 4) <> ".dll" Then $sSave &= ".dll"
[/autoit] [autoit][/autoit] [autoit]$hFile = FileOpen($sSave, 18) ;Binary mode + Write mode (Erease old Content)
FileWrite($hFile, $bEmptyDll)
FileClose($hFile)
Exit
EndSwitch
WEnd
Der Code für die leere DLL in FASM:
format PE GUI 4.0 DLL
section '.text' code readable executable
section '.edata' export data readable
section '.reloc' fixups data discardable
Eine erstellte DLL ist 512 Byte groß. Kleiner habe ich sie nicht bekommen
viel Spaß mit dem kleinen Tool.
PS: Verbesserungsvorschläge oder ähnliches immer gerne gesehen.