Jump to content

Real time scanner on C

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
7 replies to this topic

#1
vallenoire

vallenoire

    Newbie

  • Members
  • Pip
  • 4 posts
Does anyone know how to make a real time scanner in C? Like what they used on anti virus

#2
dargueta

dargueta

    Writes binary right handed and hex left handed

  • Moderators
  • 4,717 posts
Highly depends on what it's for. Could you be more specific?
sudo rm -rf /

#3
vallenoire

vallenoire

    Newbie

  • Members
  • Pip
  • 4 posts
Thanks for replying ^^

I'm working on some mp3 monitoring system
so that everytime the operator plays a mp3 music file with any player (winamp, wmp, etc) the data will be recorded to the database and at the end of the month, the owner will get a report, summarizing the most played mp3 files.

The owner also wants some records when the operator changing the properties of the files like names, moving it to other directory, etc

#4
dargueta

dargueta

    Writes binary right handed and hex left handed

  • Moderators
  • 4,717 posts
I got everything but CC crashed before I could post it. I'll put it together again tomorrow, as I don't have time today anymore.
sudo rm -rf /

#5
curse

curse

    Newbie

  • Members
  • PipPip
  • 22 posts

Quote

I'm working on some mp3 monitoring system
so that everytime the operator plays a mp3 music file with any player (winamp, wmp, etc) the data will be recorded to the database and at the end of the month, the owner will get a report, summarizing the most played mp3 files.

This is not an example of a real-time application.

#6
dargueta

dargueta

    Writes binary right handed and hex left handed

  • Moderators
  • 4,717 posts
It's possible, if you use the right API.
sudo rm -rf /

#7
Griselda

Griselda

    Newbie

  • Members
  • Pip
  • 6 posts
Sorry, I really want to help you, but I don't know how to help.

Good luck!

#8
dargueta

dargueta

    Writes binary right handed and hex left handed

  • Moderators
  • 4,717 posts
Okay, so you need to do three things:

1) Detecting file moves, renames, etc.:
FindFirstChangeNotification
Use this function on your music directory to set up notifications whenever the user writes files in, moves files, renames them, and so on.

2) Detecting when files are read by a music player...that's going to be tough to do in real time. You can look here to see how to enumerate all open files, find the names of all the processes, filter out the ones you don't want to get to winamp, etc., and then check their file handles to see what they're looking at.
sudo rm -rf /