Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19
Probs in a script called from another script
Results 1 to 2 of 2

Thread: Probs in a script called from another script

  1. #1
    Advisor Outlaw's Avatar
    Join Date
    May 2001
    Location
    Clifton Park, NY
    Posts
    630

    Probs in a script called from another script

    Helpeth me please.

    Here's what I'm trying to do.

    Code:
    #!/bin/bash
    #
    # This runs a daily check for suspicious activity using chkrootkit
    #
    SUBJ="Root Scan For $HOSTNAME on `date`"
    /opt/chkrootkit-0.43/chkrootkit | mail -s "$SUBJ" user@address
    It works, but chkrootkit can't exec things that it otherwise can when run directly (as in cd chkrootkit-0.43; ./chkrootkit | mail -s blah blah blah).

    Code:
    .
    .
    .
    Checking `sniffer'... not tested: can't exec ./ifpromisc
    Checking `w55808'... not infected
    Checking `wted'... not tested: can't exec ./chkwtmp
    Checking `scalper'... not infected
    Checking `slapper'... not infected
    Checking `z2'... not tested: can't exec ./chklastlog
    Both scripts are owned by root and the entire chkrootkit dir is owned by root.

    Am I calling chkrootkit the wrong way? Is it maybe that chkrootkit is a sh script and not bash? ???

    Oh, and I'm launching this script as root.


  2. #2
    Advisor Outlaw's Avatar
    Join Date
    May 2001
    Location
    Clifton Park, NY
    Posts
    630

    Re:Probs in a script called from another script

    Nevermind.

    Code:
    #
    cd /opt/chkrootkit-0.43
    SUBJ="Root Scan For $HOSTNAME on `date`"
    ./chkrootkit | mail -s "$SUBJ" user@address
    Works better

Similar Threads

  1. script
    By try in forum Linux - General Topics
    Replies: 0
    Last Post: 12-15-2008, 07:43 AM
  2. need help with linux script
    By Abas in forum Programming
    Replies: 1
    Last Post: 12-19-2007, 11:50 AM
  3. A Suspicious Script
    By Carrym in forum Windows - General Topics
    Replies: 1
    Last Post: 03-22-2007, 12:30 PM
  4. Awesome little PHP script
    By Killer_Penguin in forum Linux - Hardware, Networking & Security
    Replies: 12
    Last Post: 02-16-2002, 02:05 PM
  5. My first Ruby script!
    By vee-eye in forum Programming
    Replies: 11
    Last Post: 01-14-2002, 09:49 AM

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
  •