Results 1 to 8 of 8

Thread: Keep them prying eyes off your computer while your AFK NMZ

  1. #1
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default Keep them prying eyes off your computer while your AFK NMZ

    Simba Code:
    const
      password = '1995';
      activateOn = 'e';
      pauseTime = 150;
      timeAllowed = 6000;

    type TPassword = record
      pass:string;
      delay, index:integer;
    end;

    procedure TPassword.new(p:string;d:integer);
    begin
      self.pass := p;
      self.delay := d;
      self.index := 1;
    end;

    procedure TPassword.new(p:string);overload;
    begin
      self.new(p, 100);
    end;

    function getPressedKey(minCode, maxCode:integer):integer;
    var
      i:integer;
    begin
      for i := minCode to maxCode do
        if (isKeyDown(i)) then
          exit(i);
    end;

    function getPressedKey():integer;overload;
    begin
      result := getPressedKey(8, 220);
    end;

    function notKeyPressed(c:char):boolean;
    begin
      result := (getPressedKey() = getKeyCode(c));
    end;

    function anyKeyButPressed(c:char):boolean;
    var
      pressed:integer;
    begin
      pressed := getPressedKey();
      result := (pressed >= 8) and (not notKeyPressed(c));
    end;

    function TPassword.entered(maxTime:integer):boolean;
    begin
    end;

    var
      myPassword:TPassword;
      t:integer;

    begin
      setDesktopAsClient();
      activateClient();
      wait(1000);
      myPassword.new(password, 100);
      repeat
        moveMouse(0, 0);
        wait(pauseTime);
        if (isKeyDown(getKeyCode(activateOn))) then
        begin
          wait(250);
          writeln('Enter Password');
          t := getSystemTime();
          repeat
            moveMouse(0, 0);
            if (isKeyDown(getKeyCode(myPassword.pass[myPassword.index]))) then
            begin
              if (myPassword.index = length(myPassword.pass)) then
              begin
                messageBox('Computer unlocked', '', 0);
                terminateScript;
              end else begin
                myPassword.index := myPassword.index + 1;
                wait(pauseTime);
                writeln('Please enter the next key');
              end;
            end else if (anyKeyButPressed(myPassword.pass[myPassword.index])) then
            begin
              writeln('Password sequence reset');
              myPassword.index := 1;
            end;
          until (getSystemTime - t >= timeAllowed);
        end;
      Until False;
    end.

  2. #2
    Join Date
    Jun 2012
    Posts
    4,867
    Mentioned
    74 Post(s)
    Quoted
    1663 Post(s)

    Default

    Master password is F2

  3. #3
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    Quote Originally Posted by BMWxi View Post
    Master password is F2
    GL pressing F2, the desktop is activated

  4. #4
    Join Date
    Jun 2012
    Posts
    4,867
    Mentioned
    74 Post(s)
    Quoted
    1663 Post(s)

    Default

    Quote Originally Posted by rj View Post
    GL pressing F2, the desktop is activated
    I found it quite easy to press F2. Just drag the mouse slightly down-right and click. You can now press F2.

  5. #5
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    Quote Originally Posted by BMWxi View Post
    I found it quite easy to press F2. Just drag the mouse slightly down-right and click. You can now press F2.
    Then minimize simba

  6. #6
    Join Date
    Jun 2012
    Posts
    4,867
    Mentioned
    74 Post(s)
    Quoted
    1663 Post(s)

    Default

    Quote Originally Posted by rj View Post
    Then minimize simba
    Wouldn't switching user work better? Or does that log out RS?

  7. #7
    Join Date
    Apr 2015
    Location
    FireFox
    Posts
    528
    Mentioned
    10 Post(s)
    Quoted
    227 Post(s)

    Default

    Quote Originally Posted by BMWxi View Post
    Wouldn't switching user work better? Or does that log out RS?
    I'm pretty sure you can and it won't affect it.
    Scripting with ogLib

  8. #8
    Join Date
    Jan 2012
    Posts
    2,568
    Mentioned
    35 Post(s)
    Quoted
    356 Post(s)

    Default

    on my computer (windows 8.1) i can alt tab to simba + f2 / ctrl+alt+del > task manager to break it

    probably need winapi etc for a true keyboard+mouse locking

Thread Information

Users Browsing this Thread

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

Posting Permissions

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