ALPA Site Kurucusu
Mesaj Sayısı : 815 Nerden : Ankara Kayıt tarihi : 02/03/09 Rep Puanı : 32
| Konu: Koxp'dan Paket Yollatma C.tesi Ocak 15, 2011 7:34 am | |
| Hepsi Modül'e: - Kod:
-
Public Function ConvHEX2ByteArray(pStr As String, pByte() As Byte) Dim I As Long Dim j As Long ReDim pByte(1 To Len(pStr) / 2)
j = LBound(pByte) - 1 For I = 1 To Len(pStr) Step 2 j = j + 1 pByte(j) = CByte("&H" & Mid(pStr, I, 2)) Next End Function - Kod:
-
Function SendPacked(pPacket() As Byte) On Error Resume Next Dim psize As Long Dim pCode() As Byte
psize = UBound(pPacket) - LBound(pPacket) + 1 If BytesAddr = 0 Then BytesAddr = VirtualAllocEx(KO_HANDLE, 0, 1024, MEM_COMMIT, PAGE_READWRITE) End If If BytesAddr <> 0 Then ByteDizisiYaz BytesAddr, pPacket, psize Hex2Byte "608B0D" & AlignDWORD(KO_PTR_PKT) & "68" & AlignDWORD(psize) & "68" & AlignDWORD(BytesAddr) & "BF" & AlignDWORD(KO_SND_FNC) & "FFD7C605" & AlignDWORD(KO_SND_PACKET) & "0061C3", pCode UzaktanKodÇalıştır pCode, True End If VirtualFreeEx KO_HANDLE, BytesAddr, 0, MEM_RELEASE& End Function - Kod:
-
Function KodOpen(pCode() As Byte, Optional WaitExecution As Boolean = False) As Long Dim hThread As Long, ThreadID As Long, Ret As Long Dim SE As SECURITY_ATTRIBUTES
SE.nLength = Len(SE) SE.bInheritHandle = False
UzaktanKodÇalıştır = 0 If FuncPtr = 0 Then FuncPtr = VirtualAllocEx(KO_HANDLE, 0, 1024, MEM_COMMIT, PAGE_READWRITE) End If If FuncPtr <> 0 Then ByteDizisiYaz FuncPtr, pCode, UBound(pCode) - LBound(pCode) + 1 hThread = CreateRemoteThread(ByVal KO_HANDLE, SE, 0, ByVal FuncPtr, 0&, 0&, ThreadID) If hThread Then Ret = WaitForSingleObject(hThread, INFINITE) UzaktanKodÇalıştır = ThreadID End If 'extra.yetkin-forum.com - alpa CloseHandle hThread Ret = VirtualFreeEx(KO_HANDLE, FuncPtr, 0, MEM_RELEASE) End If End Function
- Kod:
-
Function KodOpen(pCode() As Byte, Optional WaitExecution As Boolean = False) As Long Dim hThread As Long, ThreadID As Long, Ret As Long Dim SE As SECURITY_ATTRIBUTES
SE.nLength = Len(SE) SE.bInheritHandle = False
UzaktanKodÇalıştır = 0 If FuncPtr = 0 Then FuncPtr = VirtualAllocEx(KO_HANDLE, 0, 1024, MEM_COMMIT, PAGE_READWRITE) End If If FuncPtr <> 0 Then ByteDizisiYaz FuncPtr, pCode, UBound(pCode) - LBound(pCode) + 1 hThread = CreateRemoteThread(ByVal KO_HANDLE, SE, 0, ByVal FuncPtr, 0&, 0&, ThreadID) If hThread Then Ret = WaitForSingleObject(hThread, INFINITE) UzaktanKodÇalıştır = ThreadID End If CloseHandle hThread Ret = VirtualFreeEx(KO_HANDLE, FuncPtr, 0, MEM_RELEASE) End If End Function - Kod:
-
Public Function Hex2Byte(Paket As String, pByte() As Byte) On Error Resume Next Dim I As Long Dim j As Long ReDim pByte(1 To Len(Paket) / 2)
j = LBound(pByte) - 1 For I = 1 To Len(Paket) Step 2 j = j + 1 pByte(j) = CByte("&H" & Mid(Paket, I, 2)) Next End Function - Kod:
-
Public Function ByteDizisiYaz(pAddy As Long, pmem() As Byte, psize As Long) WriteProcessMem KO_HANDLE, pAddy, pmem(LBound(pmem)), psize, 0& End Function Function HexString(EvalString As String) As String Dim intStrLen As Integer Dim intLoop As Integer Dim strHex As String
EvalString = Trim(EvalString) intStrLen = Len(EvalString) For intLoop = 1 To intStrLen strHex = strHex & Hex(Asc(Mid(EvalString, intLoop, 1))) Next HexString = strHex HexSözcük = strHex End Function - Kod:
-
Public Sub Paket(Paket As String) Dim PaketByte() As Byte Hex2Byte Paket, PaketByte SendPacked PaketByte End Sub ________Kullanıcı İmzası_________ | |
|