Picaxe Keyboard Filter??

RogerTango

Senior Member
Id like to develop a project whereas a Picaxe would go inline between a PS2 keyboard and a computer, and pass keypresses to the computer, whilst logging key presses, and the rest I can do... "filter" the keypress.

The situation I have right now is, the computer I use at work is accessible during the midnight hours by night staff, they log in as another user and access the internet while all other profiles, access to IE is restricted.

They are going to lord knows what websites and the computer is infected like a beast!

So Id like to monitor keypress and prevent them from logging in, the user name is INTAKE, so Id record the last (x)-1 where x=len(filterstring) (or at least, thats the 'concept'), after they enter "INTAK", if the next keypress is "E" is would simply not send the character "preventing" them from logging in.

Anyway, before I try to tackle such a project and it is a few levels above my head, Id like to run it by you guys and see what you think- You think it can be done??

Cheers,
Andrew
 

alband

Senior Member
If I was one of these guy you're talking about and found I couldn't type the "e" or any other letter. I'd find an "e" on screen, select it, copy and paste it. You have to turn the computer of or in some way. Disable the computer until a given combination (set the night before perhaps) has been entered. Don't know how you'd disable the PC though; don't some keyboards have a sleep button? Perhaps you could record that and then send it when the "e" is presses and then again every time the computer is woken.
 

leftyretro

New Member
I think your basiclly talking about having the capabilites of 'keylogger' like application. That is basically a PC software program (sometimes installed by evil doers) that hooks into the standard BIOS keyboard processing routine such that it can read every keystroke and then either record it somewhere, modifiy it or not and send it on for normal system processing.

I think that a Picaxe would never really have the horsepower to be able to manage that. The PC keyboard scanning code process is really quite complex, with having to decode control keys, etc. Did you know a user can from the keyboard generate any possible character by pressing ALT and then a three number combination from the numbers keypad? So in your example there is more then one way that an 'e' can be coming down the pipe!

So in concept it is possible, but in reality I don't think our little Picaxes would be up to the task.

Lefty
 

BCJKiwi

Senior Member
Assuming the computer should be left powered off there is a simple option.

1. Ensure the case can be locked.
2. Fit a keyswitch to the case somewhere and wire it in parallel with the reset switch.
When the PC should not be used, trun the keyswitch and remove the key. This keeps the computer in permanent reset if powered up.


If so,
 

hippy

Ex-Staff (retired)
It's probably easier and quicker looking for key logging software which can run on the PC and there are commercial key logging devices which can fit inside a standard keyboard to do the job you are after.

You could also do logging at the firewall which should be even easier as that will give you a log of which sites were accessed, when and from which PC without having to dismantle keyboards to see what they have stored.

The simplest way to stop people logging in as other users is to have passwords which aren't handed around willy-nilly..
 

RogerTango

Senior Member
I do not have admin rights on this computer, so I cannot install software.

What about.. a switch with a filter? I dont want to put a router on.

Im open to ideas, and the feedback left so far is helpful.

Thanks,
Andrew
 

Andrew Cowan

Senior Member
Hi

It won't be too hard to recognise them typing intake, and on the login screen (depending which type it is), there may not be a copyable e.

Code:
main:
if keyin = i then
if keyin = n then
if keyin = t then
if keyin = a then
if keyin = k then
goto block
endif
endif
endif
endif
endif

block:
(By the way - you need the ascii values for the letters).

However - sending correct values on to the pc is beyond me. I think your best bet may be having a Y connector for the PICAXE to read the keypresses, while all are sent on to the PC. If it then detects INTAK, it does something else. Sieren? Flashing lights? 400V capacitor bank to probes in the chair? Reset the PC?

Have you tried just unplugging the PC at night? Rather than crawling under the desk to plug it back in, they might just use another PC.

Hope this helps,

A
 

moxhamj

New Member
Well an 18X and the other high end picaxes can do keyboard. But you would have to code every key and some of those extended key codes are pretty long. Look at pause/break for instance. http://www.beyondlogic.org/keyboard/keybrd.htm I've been coding a bit banged keyboard interface for a CP/M computer and it is fun but complicated.

Won't someone notice a box on the keyboard line?

How about just taking the keyboards home each night. That should foil them!
 

alband

Senior Member
Perhaps if the final "e" is detected you could make the keyboard send the required commands to open this program and turn of the keybaord?
 
Top