Question about hooking and simulating input in C++



 DEVELOP > c-Plus-Plus > Question about hooking and simulating input in C++

LINK TO THIS PAGE  


rating :  0   |  0


  Page 1 of 1

1

 
Topic: DEVELOP > c-Plus-Plus
User: ""
Date: 18 Jul 2007 09:54:02 PM
Object: Question about hooking and simulating input in C++
Hi,
I was wondering if its possible to "hook" programs as in windows on
linux (ubuntu specifically.) I doubt it is as its a big security flaw,
but "hooking" is very useful for automating things I'd I'm
interested.
Also is it possible to simulate input through a mouse click or a
keystroke using c++ libraries? For example, this is possible through
the Java class awt.Robot. Documentation of this class can be found
here http://java.sun.com/j2se/1.5.0/docs/api/java/awt/Robot.html. This
class is also really useful for automating things, and I was wondering
if the same thing or something like it exists in the c++ libraries on
linux (ubuntu.)
Thanks,
Matt
.

User: "=?ISO-8859-1?Q?Erik_Wikstr=F6m?="

Title: Re: Question about hooking and simulating input in C++ 19 Jul 2007 04:09:14 AM
On 2007-07-19 04:54,
wrote:

Hi,

I was wondering if its possible to "hook" programs as in windows on
linux (ubuntu specifically.) I doubt it is as its a big security flaw,
but "hooking" is very useful for automating things I'd I'm
interested.

If it's Ubuntu specific you probably have to use a ubuntu-library.

Also is it possible to simulate input through a mouse click or a
keystroke using c++ libraries? For example, this is possible through
the Java class awt.Robot. Documentation of this class can be found
here http://java.sun.com/j2se/1.5.0/docs/api/java/awt/Robot.html. This
class is also really useful for automating things, and I was wondering
if the same thing or something like it exists in the c++ libraries on
linux (ubuntu.)

Probably possible, look at the X-libraries.
--
Erik Wikström
.

User: "James Kanze"

Title: Re: Question about hooking and simulating input in C++ 20 Jul 2007 02:17:32 AM
On Jul 19, 4:54 am,
wrote:

I was wondering if its possible to "hook" programs as in windows on
linux (ubuntu specifically.) I doubt it is as its a big security flaw,
but "hooking" is very useful for automating things I'd I'm
interested.
Also is it possible to simulate input through a mouse click or a
keystroke using c++ libraries? For example, this is possible through
the Java class awt.Robot. Documentation of this class can be found
herehttp://java.sun.com/j2se/1.5.0/docs/api/java/awt/Robot.html. This
class is also really useful for automating things, and I was wondering
if the same thing or something like it exists in the c++ libraries on
linux (ubuntu.)

Within C++ itself, all you have is the iostreams. It's possible
to change the streambuf on cin, of course, but I don't think
that is really what you're looking for.
For anything concerning a GUI, you'd have to ask in a group
specialized for that GUI library. I'm not too sure what you're
asking, as I'm not familiar with the tools you mention. (I can
imagine how it might work in Java, but it would be in a higher
level layer than just the language or the OS---somewhere in AWT,
for example.) Under Unix, you might want to Google for pseudo
terminal or expect, but I'm not sure how they interact with X.
(Expect is often used for testing socket based applications, and
pseudo terminals for interactive ones.)
--
James Kanze (GABI Software) email:james.kanze@gmail.com
Conseils en informatique orient=E9e objet/
Beratung in objektorientierter Datenverarbeitung
9 place S=E9mard, 78210 St.-Cyr-l'=C9cole, France, +33 (0)1 30 23 00 34
.


  Page 1 of 1

1

 


Related Articles
 

NEWER

pg.1232     pg.940     pg.716     pg.544     pg.412     pg.311     pg.234     pg.175     pg.130     pg.96     pg.70     pg.50     pg.35     pg.24     pg.16     pg.10     pg.6     pg.3     pg.1

OLDER