Function writeMailSlot(MailSlotName As String) As Long Dim KO_MSLOT As Long, pHook As String, p() As Byte, ph() As Byte, CF As Long, WF As Long, CH As Long KO_MSLOT = VirtualAllocEx(KO_HANDLE, 0, 1024, MEM_COMMIT, PAGE_READWRITE) If KO_MSLOT <= 0 Then Exit Function: MsgBox "memory could not be opened!", vbCritical CF = GetProcAddress(GetModuleHandle("kernel32.dll"), "CreateFileA") WF = GetProcAddress(GetModuleHandle("kernel32.dll"), "WriteFile") CH = GetProcAddress(GetModuleHandle("kernel32.dll"), "CloseHandle") Debug.Print Hex(KO_MSLOT) ConvHEX2ByteArray StringToHex(MailSlotName), p WriteByteArray KO_MSLOT + &H400, p, UBound(p) - LBound(p) + 1 pHook = "558BEC83C4F433C08945FC33D28955F86A0068800000006A036A006A01680000004068" & AlignDWORD(KO_MSLOT + &H400) & "E8" & AlignDWORD(getCallDiff(KO_MSLOT + &H27, CF)) & "8945F86A008D4DFC51FF750CFF7508FF75F8E8" & AlignDWORD(getCallDiff(KO_MSLOT + &H3E, WF)) & "8945F4FF75F8E8" & AlignDWORD(getCallDiff(KO_MSLOT + &H49, CH)) & "8BE55DC3" '&H49 ConvHEX2ByteArray pHook, ph WriteByteArray KO_MSLOT, ph, UBound(ph) - LBound(ph) + 1 writeMailSlot = KO_MSLOT End Function
Sub recvHook(MailSlotName As String, RecvFunction As Long, RecvBase As Long) Dim KO_MSLOT As Long, KO_RCVHK As Long, pHook As String, ph() As Byte KO_MSLOT = writeMailSlot(MailSlotName) If KO_MSLOT <= 0 Then Exit Sub: MsgBox "memory could not be opened!", vbCritical KO_RCVHK = VirtualAllocEx(KO_HANDLE, 0, 1024, MEM_COMMIT, PAGE_READWRITE) If KO_RCVHK <= 0 Then Exit Sub: MsgBox "memory could not be opened!", vbCritical
pHook = AlignDWORD(KO_RCVHK) ConvHEX2ByteArray pHook, ph WriteByteArray RecvBase, ph, UBound(ph) - LBound(ph) + 1 End Sub
Public Sub FindHook(MailSlotName As String) Dim KO_RECVHK As Long, KO_RCVHKB As Long KO_RECVHK = ReadLong(ReadLong(KO_PTR_DLG - &H14)) + &H8 KO_RCVHKB = ReadLong(KO_RECVHK) Debug.Print Hex(KO_RECVHK) & "//" & Hex(KO_RCVHKB) recvHook MailSlotName, KO_RCVHKB, KO_RECVHK End Sub
DH forumlarında vakit geçirmekten keyif alıyor gibisin ancak giriş yapmadığını görüyoruz.
Üye olduğunda özel mesaj gönderebilir, beğendiğin konuları favorilerine ekleyip takibe alabilir ve daha önce gezdiğin konulara hızlıca erişebilirsin.
DH forumlarında vakit geçirmekten keyif alıyor gibisin ancak giriş yapmadığını görüyoruz.
Üye Ol Şimdi DeğilÜye olduğunda özel mesaj gönderebilir, beğendiğin konuları favorilerine ekleyip takibe alabilir ve daha önce gezdiğin konulara hızlıca erişebilirsin.
< Bu mesaj bu kişi tarafından değiştirildi Madara Uchiha -- 6 Ocak 2019; 20:34:57 >