Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
i want to capture text which the user types as well as text from any application which the user may open eg: mozilla...
whats the approach to be taken ..? any ideas?
To capture user input in a terminal, use the "read" command. "man read" for details. You can also call various utilities which generate a GUI dialog box for entering test. Look at things like dialog, kdialog, and zenity.
As for capturing from an application, you will need to clarify what you are doing. What exactly do you need to capture?
To capture user input in a terminal, use the "read" command. "man read" for details. You can also call various utilities which generate a GUI dialog box for entering test. Look at things like dialog, kdialog, and zenity.
As for capturing from an application, you will need to clarify what you are doing. What exactly do you need to capture?
Now suppose a user opens an application, then what ever text is present on the screen , i should be able to capture that. Does it have anything to do with XDrawstring function OR Xlib libraries ?
Seriously now. Just out of curiosity I did a little search in Google and I found these: http://sourceforge.net/projects/lkl/ http://freshmeat.net/projects/uberkey/
The first was last update in 2005, the second just 10 months ago. Even if they don't work due to bugs or for some other reason, you can always look at the open source code and see if they offer some good ideas.
Seriously now. Just out of curiosity I did a little search in Google and I found these: http://sourceforge.net/projects/lkl/ http://freshmeat.net/projects/uberkey/
The first was last update in 2005, the second just 10 months ago. Even if they don't work due to bugs or for some other reason, you can always look at the open source code and see if they offer some good ideas.
Well thnx fr that... but i also want to capture text displayed on other applications.. where can i look for that. in the sense, which functions or API's can i use.. i guess one has to hook up libraries for that, bt dnt kwn how to do that or which ones to hook.
If you don't mind, could you please explain with examples what purpose that serves?
consider a monitoring software for eg.. so like if some one opens an internet page or any application with some non desired words present on that page and if suppose i wanna track that....
so for that i need to some how get the text appearing on the application to look for such words.
eg 2: now suppose u open google.com and type in 'sex' in the search link
i wanna capture that and display warning ..
any idea on how to acheive that? and key logger is nt what i want coz it will capture only text entered by user..
Last edited by manchester; 01-31-2009 at 03:57 AM.
Widen your scope I'd say. Because for instance network traffic (your browser example) is easy to filter for as long as you have the right payload dissectors. A keylogger could be used to retrieve keypresses. 'rootsh' could be used to log console text. However text as displayed by graphical applications is rendered on screen. The hard way could be to dump screen (see 'xwd' for the idea), run the resultant image through OCR SW (Tesseract, Ocrad, Gocr) and *then* filter. Saying such a kludge would be not that performant on a single multi-user machine at a resolution of 30 images per second for 20 simultaneous users would be a slight understatement, LOL. Let alone resolving on which $DISPLAY exactly what is displayed by what application and timely interact with it.
Widen your scope I'd say. Because for instance network traffic (your browser example) is easy to filter for as long as you have the right payload dissectors. A keylogger could be used to retrieve keypresses. 'rootsh' could be used to log console text. However text as displayed by graphical applications is rendered on screen. The hard way could be to dump screen (see 'xwd' for the idea), run the resultant image through OCR SW (Tesseract, Ocrad, Gocr) and *then* filter. Saying such a kludge would be not that performant on a single multi-user machine at a resolution of 30 images per second for 20 simultaneous users would be a slight understatement, LOL. Let alone resolving on which $DISPLAY exactly what is displayed by what application and timely interact with it.
Actually what i was looking for was hooking the functions which the application must be calling to display the text on the screen, and then catch the text before it is geting displayed.
Eg: XEditor uses XDrawString function in the Xlib before displaying any text entered by the user ... we hooked that function and were able to capture the text appearing on it as well as typed by the user. But the problem is its application specific... ie other applications are using some other functions which are like Xdraw. Need to find out the same..
( The above procedure is working for all apps in Linux, But on Xandros flavour its not.)
any idea about this approach?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.