The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Script to delete specified files

Discussion in 'cPanel Developers' started by nerbonne, Oct 8, 2007.

  1. nerbonne

    nerbonne Well-Known Member

    Joined:
    Aug 19, 2007
    Messages:
    52
    Likes Received:
    1
    Trophy Points:
    6
    Hi all. After getting hit with phishing attacks left and right, we need to implement some kind of script to search the servers for specific files and notify admin via email of their existence.

    I'm sure that someone must have done this already, and I don't want to re-invent the wheel.

    If it hasn't been done, can anyone point me in the right direction.

    I thought of using the find command, and then outputting the results to a text file which would then get emailed. The only problem is that I would need to exclude certain directories and I'm not sure how to do that.
     
    #1 nerbonne, Oct 8, 2007
    Last edited: Oct 8, 2007
  2. S-Combs

    S-Combs Well-Known Member

    Joined:
    Jun 10, 2004
    Messages:
    78
    Likes Received:
    0
    Trophy Points:
    6
    I use 3 versions of this script to scan for various potential problems via cronjob.

    sploitFinder
    http://forum.joomla.org/index.php?topic=92678.0

    (need to register to view attachments there)

    It can be further customized to your exact needs
     
Loading...

Share This Page