We have a database that stores device RFID's and the account numbers associated with those devices. Our device readers are dummy readers and only output the RFID. I'd like a process that runs in the background that anytime an RFID is encountered (matched through regex), this background process retrieves the associated account number automatically and replaces the RFID with the account number.

This will only be running on a windows PC. I first tried with windows script hosting, but I don't think that's going to do the trick. Python seems to be what people use the most of keyloggers so I might start there but I'd like some ideas.

I've written some psuedo-code to show what I'm trying to achieve

    listen();
    listen(){
            listen for RFID that matches regex
            if (match){
                    RFID = get regex match
                    RFIDreceived(RFID);
            }
    }

    RFIDreceived(RFID){ 
            accountNum = getAccountNumfromRFID(RFID)
            replace regex match with accountNum
            listen();
    }

    getAccountNumfromRFID(RFID){
            hit DB with RFID to get Account Number
            return accountNum;
    }

0 Answers