Closed Thread
Results 1 to 5 of 5

Thread: Howto - Setup an Illegal File Scanner

  1. #1
    Member PowerHosting123 has a spectacular aura about
    Join Date
    Jul 2007
    Posts
    81

    Cool Howto - Setup an Illegal File Scanner

    This source was posted on WHT. I've recently updated it.

    Server I"m using is a Centos 5 server the commands I'm getting ready to use might be little be difference for your server operating system.

    Step1.

    First you need to loggin into SSH on your server using Putty or other SSH Client

    Step2.

    After you've logged into root using ssh type the following command below

    Code:
    Type mkdir server_scan


    Step 3.

    After you've type the command above now type the following command below:

    Code:
    Type cd /home/server_scan
    After you've type the command above to change into the directory server_scan type the following command below

    Code:
    Type nano scan.sh


    After you've type the command above copy & paste the following below into your SSH. But don't forget to change youremail_address_here with your actual email address you check everyday.


    Code:
    #!/bin/sh
    # Locate & E-mail banned script results
    
    updatedb
    (locate Ultimate.cgi; locate cutecast.pl; locate myboard.cgi; locate anyboard.cgi; 
    locate teemz.cgi; locate database.cgi; locate cfdirectory.cgi; locate db_TalkToMe.cgi; 
    locate message.cgi; locate iforum.cgi; locate talkshop.cgi; locate dboard.pl; locate 
    ruboard.pl; locate ib.cgi; locate colloquius.pl; locate forum6.main.cgi; locate 
    index.cgi; locate dcboard.cgi; locate forum.cgi; locate WMCboard.cgi; locate 
    xtartforum.pl; locate beebalm.cgi; locate zcboard.cgi; locate admin.pl; locate 
    message.pl; locate webbbs_form.pl; locate forum.pl; locate netboard.cgi; locate 
    wwwboard.pl; locate x-forum.cgi; locate ikonboard.cgi; locate ultimatebb.cgi; locate 
    YaBB.cgi; locate YaBB.pl ) | mail -s Banned-Forums youremail_address_here
    locate lstmrge.cgi | mail -s Banned-Spam-Tools youremail_address_here
    locate phpshell.php | mail -s PHPShell youremail_address_here
    locate c99shell.php | mail -s c99shell youremail_address_here
    locate r57shell.php | mail -s r57shell youremail_address_here
    locate vbulletin | mail -s vbulletin youremail_address_here
    locate nph-proxy.cgi | mail -s Banned-Proxy-Utils youremail_address_here
    locate *.mp3 | mail -s MP3s youremail_address_here
    locate *.rar | mail -s RAR-Files youremail_address_here
    (locate warez; locate ftf; locate vcd; locate svcd; locate xxx; locate telesync; locate 
    screener; locate divx; locate *.nfo) | mail -s warez youremail_address_here
    locate *.zip | mail -s zip-files youremail_address_here
    (locate *.avi; locate *.mov; locate *.mpeg; locate *.mpg; locate *.rm; locate *.ram; 
    locate *.divx; locate *.wmv; locate *.asf ) | mail -s Movie-Files youremail_address_here
    locate adcycle.cgi | mail -s ad-systems youremail_address_here
    locate clientexec | mail -s Clientexec youremail_address_here
    locate whmcs | mail -s WHMCS youremail_address_here
    locate invision | mail -s InvisionBoard  youremail_address_here
    locate vbulletin | mail -s Vbulletin  youremail_address_here
    find / -size +5000000c | mail -s Over5MB youremail_address_here
    How to setup to run automatically as a cronjobs

    Type the command below
    Code:
    Type crontab -e
    After you've type the following command below copy & paste the line below this will run the scan.sh at 1AM every day including weekdays.

    Code:
    0 1 * * * /home/server_scan/scan.sh >/dev/null 2>&1
    After you've setup the cronjobs don't forget to save

    You can run this script manual by running the following command below
    Code:
    sh /home/server_scan/scan.sh
    This script will email the results to your email address you've listed in scan.sh

    Once you've finshed I would recommended you to run the script manual first since updatedb command does take alongtime.
    www.resoldsquad.com
    Fully Managed / Semi Managed VPS Servers

  2. #2
    FWS Addict aloycasmir is just really nicealoycasmir is just really nicealoycasmir is just really nice
    Join Date
    Sep 2009
    Posts
    677
    That's a good script .
    Why not add this to the beginning of the script:
    email_address=your_email@email.com

    Now wherever you wanna add the email , just say $email_address instead of having to type it everywhere .
    http://www.numbhost.com
    $6 VPS and $100 Dedicated Servers!!<=
    Now Good Quality comes easy on your pocket

  3. #3
    Pro Member jphilipson is just really nicejphilipson is just really nicejphilipson is just really nice
    Join Date
    Nov 2008
    Posts
    358
    That's all well and good, run updatedb on a real production servers and you'll kill them, unless they are mostly empty. We have it disabled on our fleet at work. Run that on servers that have around 1 TB each and locatedb will take a few hours to run and drive the load through the roof.
    Free Web Hosting - Free PHP hosting with no ads on powerful cPanel servers!
    Free Website Hosting - Largest free hosting - 11 Gigs of space and 400 Gigs of bandwidth!

  4. #4
    FWS Addict eSupun is a name known to alleSupun is a name known to alleSupun is a name known to alleSupun is a name known to alleSupun is a name known to alleSupun is a name known to alleSupun is a name known to all eSupun's Avatar
    Join Date
    Apr 2010
    Location
    /usr/local/src/
    Posts
    904
    Made some modifications and added!

    I think this will help me to minimize abuse on my server. Thank you for the info.

  5. #5
    Senior Member macaws is on a distinguished road
    Join Date
    Feb 2009
    Posts
    118
    locate *.nfo | mail -s NFOs youremail_address_here

Closed Thread

Similar Threads

  1. Replies: 14
    Last Post: September 9th, 2005, 18:07
  2. Replies: 3
    Last Post: August 9th, 2005, 16:36
  3. Replies: 1
    Last Post: August 7th, 2005, 20:35
  4. Css changer on page. Howto?
    By Oipo in forum Programming Help
    Replies: 5
    Last Post: October 16th, 2001, 16:31

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts