recording [Archive] - C Board

PDA

View Full Version : recording


xlordt
02-17-2002, 04:56 AM
how can i creat a programm that will record everything that a user doez when they log in to my comp....? please try to make it simple cause im dumb at c still im trying my hardest and will keep trying.... another question is do you memorize the codez and then use that code to creat other codezz... i need to know cause i feel that i am not butting effort in learning because i dont need to memorize the codezz...if not then what is the best way of learning..?

Nutshell
02-17-2002, 05:09 AM
I think the best way to learn is to understand the theory and 'try' to remember it. Then remember a few syntax and you'll be fine. As to your problem, do you mean recording what commands are typed or if you having a GUI like GNOME, recording all mouse movemeents and capture the screen and convert it to a video file?

xlordt
02-17-2002, 05:13 AM
ya something like that but like i said im a comple newbie so maybe for the mouse movement i can start off ... any tut ... another of my problem is that i dont understand alot of thingz in c but i try...

Nutshell
02-17-2002, 06:48 AM
Actaully i am not that familiar wif Linux either. But try searching for some GUI libraries. They hav functions that's like api in widows that lets you detect mouse movements and stuff like that. One of those is GTK if i recall?

taylorguitarman
02-17-2002, 11:33 AM
You might want to start by looking up hacking and keystroke logging. I truely hope your intentions are nobel.
Which OS are you planning to do this on? Once you've got that figured out then read about how the system processes events. This isn't going to be an "easy" thing if you're just starting to program. Perhaps you should learn how to program first and in your spare time read up on the OS you plan to do this on.

starX
02-17-2002, 11:36 AM
If you're using bash, it keeps track of commands in .bash_history (in your home dir). I think other shells might have a similar mechanism... but I'm not sure.

starX
www.axisoftime.com

xlordt
02-17-2002, 03:36 PM
ya you are right i mightest well lear programming first.. i just wanted to be more secure in thingz... but thanx anyway.. another question is how can i make my prog creat a file.... ? i hope this is simple.. thanx

taylorguitarman
02-17-2002, 04:33 PM
If you're worried about people doing things on your computer, either don't allow them access or set higher restrictions. Creating a file is simple.

in C you can use fopen().

in C++ you can use fstream(), ifstream() and ofstream().

xlordt
02-17-2002, 06:10 PM
nah itz just that im creating something in sshd but thanx anywayz...

starX
02-18-2002, 10:35 AM
Which language do you want to create a file in?

In C, the simple way is:

fopen("filename", const char *mode);

where mode is "w" (open for writing, discard previous contents, create if necessary) or "a" (open file for appending, create if necessary). There are of course other modes, but these will get you through the process of file creation.

starX
www.axisoftime.com