Thread: Capture words and check against restricted values?

  1. #1
    Registered User
    Join Date
    May 2017
    Posts
    4

    Capture words and check against restricted values?

    Hi guys, my first post.

    I am trying to write a small program (daemon) that will:


    1. capture a word typed into console
    2. check that word against a list of restricted keywords
    3. display a warning that a restricted word was typed (not prevent just warn)


    I have point 2 & 3 sorted but 1 is bothering me. I wrote a small keylogger and build the word to be checked against a collection of restricted keywords. On each space or return I would fire the function to check the word against the list of keywords. The problem is backspace (delete).

    When I hit delete after misspelling a word it gets around the check, this is expected as I am collecting each character typed and building a word sequentially and not taking into account del.

    Is there a way to capture the input of the console (or other) on enter and check the word that way?

    If that makes sense.

    Thanks.
    Last edited by chronograff; 05-14-2017 at 08:15 AM.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    We don't do keyloggers here.
    See the forum rules.
    https://cboard.cprogramming.com/c-pr...uncements.html
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 2
    Last Post: 09-23-2013, 08:10 PM
  2. Unique integer values for words
    By nwasiq in forum C++ Programming
    Replies: 1
    Last Post: 03-25-2013, 06:50 PM
  3. Check between two values
    By george7378 in forum C++ Programming
    Replies: 7
    Last Post: 03-29-2011, 05:02 PM
  4. Converting words into ASCII values
    By manutdfan in forum C Programming
    Replies: 3
    Last Post: 01-22-2007, 12:22 PM
  5. using structures to assign unique values to words?
    By coreyt1111 in forum C++ Programming
    Replies: 3
    Last Post: 11-29-2006, 11:19 AM

Tags for this Thread