Edit File by line
/home/barbar84/www/wp-conte.../plugins/sujqvwi/ExeBy/exe_root.../bin
File: run_xcapture.sh
#!/bin/bash
[0] Fix | Delete
[1] Fix | Delete
# 0x.Tools by Tanel Poder [https://0x.tools]
[2] Fix | Delete
# Copyright 2019-2020 Tanel Poder
[3] Fix | Delete
#
[4] Fix | Delete
# This program is free software; you can redistribute it and/or modify
[5] Fix | Delete
# it under the terms of the GNU General Public License as published by
[6] Fix | Delete
# the Free Software Foundation; either version 2 of the License, or
[7] Fix | Delete
# (at your option) any later version.
[8] Fix | Delete
#
[9] Fix | Delete
# This program is distributed in the hope that it will be useful,
[10] Fix | Delete
# but WITHOUT ANY WARRANTY; without even the implied warranty of
[11] Fix | Delete
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
[12] Fix | Delete
# GNU General Public License for more details.
[13] Fix | Delete
#
[14] Fix | Delete
# You should have received a copy of the GNU General Public License along
[15] Fix | Delete
# with this program; if not, write to the Free Software Foundation, Inc.,
[16] Fix | Delete
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
[17] Fix | Delete
[18] Fix | Delete
if [ $# -ne 1 ]; then
[19] Fix | Delete
echo "Usage: $0 output_dir"
[20] Fix | Delete
exit 1
[21] Fix | Delete
fi
[22] Fix | Delete
[23] Fix | Delete
SUDO=sudo # change to empty string if running without sudo
[24] Fix | Delete
NICE=-5 # set to 0 if don't want to increase priority
[25] Fix | Delete
SLEEP=60
[26] Fix | Delete
[27] Fix | Delete
logger "$0 Starting up outdir=$1 nice=$NICE"
[28] Fix | Delete
[29] Fix | Delete
while true ; do
[30] Fix | Delete
$SUDO nice -n $NICE xcapture -o $1 -c exe,cmdline,kstack
[31] Fix | Delete
if [ $? -eq 1 ]; then
[32] Fix | Delete
exit 1
[33] Fix | Delete
fi
[34] Fix | Delete
[35] Fix | Delete
# we only get here should xcapture be terminated, try to restart
[36] Fix | Delete
logger "$0 terminated with $?, attempting to restart in $SLEEP seconds"
[37] Fix | Delete
sleep $SLEEP
[38] Fix | Delete
done
[39] Fix | Delete
[40] Fix | Delete
[41] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function