Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Script to delete specified files

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

  1. nerbonne

    nerbonne Well-Known Member

    Aug 19, 2007
    Likes Received:
    Trophy Points:
    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

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


    (need to register to view attachments there)

    It can be further customized to your exact needs

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice