handle creation of files

This is a discussion on handle creation of files within the C++ Programming forums, part of the General Programming Boards category; I'm interested in checking and possibly stopping creation of files. If you look at http://www.sophos.com/virusinfo/anal...ojransoma.html -> advanced you see a ...

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

    handle creation of files

    I'm interested in checking and possibly stopping creation of files. If you look at http://www.sophos.com/virusinfo/anal...ojransoma.html -> advanced you see a list of files, i want to make a program/service that stops those files from being created. How?

  2. #2
    Registered User
    Join Date
    Feb 2006
    Posts
    312
    Why don't you buy a virus checker instead?

  3. #3
    Registered User major_small's Avatar
    Join Date
    May 2003
    Posts
    2,787
    checking for files is easy, just read a basic tutorial on file I/O
    deleting files can be easy, depending on how "quick and dirty" you want to be about doing it
    stopping files from being created is hard - you need a system-wide hook for that.

    in this case, getting a good anti-virus is your best bet though.
    Join is in our Unofficial Cprog IRC channel
    Server: irc.phoenixradio.org
    Channel: #Tech


    Team Cprog Folding@Home: Team #43476
    Download it Here
    Detailed Stats Here
    More Detailed Stats
    52 Members so far, are YOU a member?
    Current team score: 1223226 (ranked 374 of 45152)

    The CBoard team is doing better than 99.16% of the other teams
    Top 5 Members: Xterria(518175), pianorain(118517), Bennet(64957), JaWiB(55610), alphaoide(44374)

    Last Updated on: Wed, 30 Aug, 2006 @ 2:30 PM EDT

  4. #4
    Registered User
    Join Date
    May 2006
    Posts
    4
    system-wide hooks sounds interesting, will look into that. thanks alot for the help.

    i am well aware that i can buy an finished off-the-shelf anti-virus software but what's the challenge in that?

  5. #5
    carry on JaWiB's Avatar
    Join Date
    Feb 2003
    Location
    Seattle, WA
    Posts
    1,972
    I'm assuming you're working with windows, in which case you might be able to use ReadDirectoryChangesW although it's probably not the best way.
    "Think not but that I know these things; or think
    I know them not: not therefore am I short
    Of knowing what I ought."
    -John Milton, Paradise Regained (1671)

    "Work hard and it might happen."
    -XSquared

  6. #6
    Registered User major_small's Avatar
    Join Date
    May 2003
    Posts
    2,787
    Quote Originally Posted by dathui
    i am well aware that i can buy an finished off-the-shelf anti-virus software but what's the challenge in that?
    somehow I knew you'd try writing your own... well, good luck... you'll need thousands of dollars in research money to not only develop your product but keep it updated
    Join is in our Unofficial Cprog IRC channel
    Server: irc.phoenixradio.org
    Channel: #Tech


    Team Cprog Folding@Home: Team #43476
    Download it Here
    Detailed Stats Here
    More Detailed Stats
    52 Members so far, are YOU a member?
    Current team score: 1223226 (ranked 374 of 45152)

    The CBoard team is doing better than 99.16% of the other teams
    Top 5 Members: Xterria(518175), pianorain(118517), Bennet(64957), JaWiB(55610), alphaoide(44374)

    Last Updated on: Wed, 30 Aug, 2006 @ 2:30 PM EDT

  7. #7
    Registered User
    Join Date
    May 2006
    Posts
    4
    JaWiB: interesting, but i've looked into hooks and if i can get it working it seems to be a better way. If you know otherwise don't hesitate to say

    major_small: i don't want to write an entire suit of anti-virus apps, i leave that to the companies. I just want to learn how to stop any program from being able to create certain files.

  8. #8
    Registered User major_small's Avatar
    Join Date
    May 2003
    Posts
    2,787
    Quote Originally Posted by dathui
    major_small: i don't want to write an entire suit of anti-virus apps, i leave that to the companies. I just want to learn how to stop any program from being able to create certain files.
    but why let that program exist in the first place?
    Join is in our Unofficial Cprog IRC channel
    Server: irc.phoenixradio.org
    Channel: #Tech


    Team Cprog Folding@Home: Team #43476
    Download it Here
    Detailed Stats Here
    More Detailed Stats
    52 Members so far, are YOU a member?
    Current team score: 1223226 (ranked 374 of 45152)

    The CBoard team is doing better than 99.16% of the other teams
    Top 5 Members: Xterria(518175), pianorain(118517), Bennet(64957), JaWiB(55610), alphaoide(44374)

    Last Updated on: Wed, 30 Aug, 2006 @ 2:30 PM EDT

  9. #9
    Registered User
    Join Date
    May 2006
    Posts
    4
    i don't plan to let it but i want to know how to stop it from working if it does get created, plus i think it'd be interesting to learn how to do it.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Program Deployment and DLL/OCX Files?
    By dfghjk in forum C++ Programming
    Replies: 5
    Last Post: 06-16-2008, 02:47 AM
  2. accessing all files in a folder.
    By pastitprogram in forum C++ Programming
    Replies: 15
    Last Post: 04-30-2008, 10:56 AM
  3. Batch file programming
    By year2038bug in forum Tech Board
    Replies: 10
    Last Post: 09-05-2005, 03:30 PM
  4. Manipulating the Windows Clipboard
    By Johno in forum Windows Programming
    Replies: 2
    Last Post: 10-01-2002, 09:37 AM
  5. Are long single C source files unreliable?
    By bjdea1 in forum C Programming
    Replies: 5
    Last Post: 03-20-2002, 11:56 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21