403Webshell
Server IP : 103.119.228.120  /  Your IP : 3.138.134.221
Web Server : Apache
System : Linux v8.techscape8.com 3.10.0-1160.119.1.el7.tuxcare.els2.x86_64 #1 SMP Mon Jul 15 12:09:18 UTC 2024 x86_64
User : nobody ( 99)
PHP Version : 5.6.40
Disable Function : shell_exec,symlink,system,exec,proc_get_status,proc_nice,proc_terminate,define_syslog_variables,syslog,openlog,closelog,escapeshellcmd,passthru,ocinum cols,ini_alter,leak,listen,chgrp,apache_note,apache_setenv,debugger_on,debugger_off,ftp_exec,dl,dll,myshellexec,proc_open,socket_bind,proc_close,escapeshellarg,parse_ini_filepopen,fpassthru,exec,passthru,escapeshellarg,escapeshellcmd,proc_close,proc_open,ini_alter,popen,show_source,proc_nice,proc_terminate,proc_get_status,proc_close,pfsockopen,leak,apache_child_terminate,posix_kill,posix_mkfifo,posix_setpgid,posix_setsid,posix_setuid,dl,symlink,shell_exec,system,dl,passthru,escapeshellarg,escapeshellcmd,myshellexec,c99_buff_prepare,c99_sess_put,fpassthru,getdisfunc,fx29exec,fx29exec2,is_windows,disp_freespace,fx29sh_getupdate,fx29_buff_prepare,fx29_sess_put,fx29shexit,fx29fsearch,fx29ftpbrutecheck,fx29sh_tools,fx29sh_about,milw0rm,imagez,sh_name,myshellexec,checkproxyhost,dosyayicek,c99_buff_prepare,c99_sess_put,c99getsource,c99sh_getupdate,c99fsearch,c99shexit,view_perms,posix_getpwuid,posix_getgrgid,posix_kill,parse_perms,parsesort,view_perms_color,set_encoder_input,ls_setcheckboxall,ls_reverse_all,rsg_read,rsg_glob,selfURL,dispsecinfo,unix2DosTime,addFile,system,get_users,view_size,DirFiles,DirFilesWide,DirPrintHTMLHeaders,GetFilesTotal,GetTitles,GetTimeTotal,GetMatchesCount,GetFileMatchesCount,GetResultFiles,fs_copy_dir,fs_copy_obj,fs_move_dir,fs_move_obj,fs_rmdir,SearchText,getmicrotime
MySQL : ON |  cURL : ON |  WGET : ON |  Perl : ON |  Python : ON |  Sudo : ON |  Pkexec : ON
Directory :  /usr/local/ssl/local/ssl/bin/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /usr/local/ssl/local/ssl/bin/lprsetup.sh
#!/bin/sh
#
# BSD PRINT FILTER SETUP utility for Ghostscript - used and tested on
# SunOS 4.1.3, but I hope it will be useful on other BSD systems
# See documentation for usage
#

GSPATH=
while [ $# -gt 0 ]
do
    case "$1" in
	-p) GSPATH="$2"/lib/ghostscript; shift;;
        -h) echo >&2 \
            "usage: $0 [-p <gs install prefix>]\n"\
            "Where <gs install prefix> is the ""prefix""\n"\
            "for the Ghostscript install - the default is\n"\
            """/usr/local"""
            exit 1;;
	-*) echo >&2 \
	    "usage: $0 [-p <gs install prefix>]"
	    exit 1;;
	*)  break;;	# terminate while loop
    esac
    shift
done

DEVICES="bjt600.32 bjc600.32 bjc600.24 bjc600.24.3 bjc600.16 bjc600.8 bjc600.8.1 bjc600.1 bjc600.dq"
#FILTERS="if nf tf gf vf df cf rf"
FILTERS="if"

# The port your printer is on
PRINTERDEV=/dev/lp1
# The kind of printer (accepted values: 'parallel' and 'serial')
PRINTERTYPE=parallel

if [ "x$GSPATH"="x" ] ; then
  GSDIR=`which gs | awk -F / 'sub(FS $NF,x)' | awk -F / 'sub(FS $NF,x)'`/lib/ghostscript
else
  GSDIR=$GSPATH
fi

GSFILTERDIR=$GSDIR/filt
SPOOLDIR=/var/spool
GSIF=unix-lpr.sh
PCAP=printcap.insert

if [ "x$GSPATH"="x" ] ; then
  echo "Warning: Writing filters to $GSFILTERDIR"
  echo "if you do not want this, you have 10 seconds to hit ^c to abort this script:"
  for i in 10 09 08 07 06 05 04 03 02 01 continuing....; do
   sleep 1
   echo -n 
   echo -n $i
  done
  echo
fi

PATH=/bin:/usr/bin:/usr/ucb
export PATH

if [ ! -w $GSDIR ]; then
  echo "$GSDIR must be writable to create filter directory"
  exit 1
fi

echo "
Making links in the filter directory $GSFILTERDIR ...
"

#
# Make the directory for holding the filter and links
#
if [ -d $GSFILTERDIR ]; then
  echo "$GSFILTERDIR already exists - not created"
else
  mkdir $GSFILTERDIR
fi
rm -f $GSFILTERDIR/direct
ln -s . $GSFILTERDIR/direct
rm -f $GSFILTERDIR/indirect
ln -s . $GSFILTERDIR/indirect

#
# Create a link from each filtertype to the real filter script
#
for filter in $FILTERS
do
  rm -f $GSFILTERDIR/gs$filter
  ln -s  ../$GSIF $GSFILTERDIR/gs$filter
done

#
# Create a link from each device to the filter directory
#
for device in $DEVICES
do
  dualqueue=
  case "$device" in
    *.dq) device=`basename $device .dq` ; dualqueue=t ;;
  esac
  rm -f $GSFILTERDIR/$device
  if [ $dualqueue ]; then
    rm -f $GSFILTERDIR/indirect/$device
    ln -s . $GSFILTERDIR/indirect/$device
  else
    rm -f $GSFILTERDIR/direct/$device
    ln -s . $GSFILTERDIR/direct/$device
  fi
done

#
# Create a basic printcap insert - this is made in the CURRENT directory
#
rm -f $PCAP
cat > $PCAP << EOF
# This is an example printcap insert for Ghostscript printers
# You will probably want either to change the names for each printer
# below (first line for each device) to something more sensible, or
# to add additional name entries (eg cdjcolor for cdj500.24)
# The example is shown set up for $PRINTERTYPE printers - you will need
# to alter the entries for different or networked remote printer,
# eg. a remote network printer would have a line something like:
#    :lp=:rm=artemis:rp=LPT1:
# for a PC called artemis, replacing the serial port settings
#
# NB/ This is only an example - it is unlikely to be complete or exactly
# correct for your system, but is designed to illustrate filter names 
# corresponding to the accompanying bsd-if print filter
#
EOF

(
previous=undefined
for device in $DEVICES
do
  dualqueue=
  case "$device" in
    *.dq) device=`basename $device .dq` ; dualqueue=t ;;
  esac
  base="`echo $device | sed 's/\.[0-9][0-9]*$//'`"
  base="`echo $base | sed 's/\.[0-9][0-9]*$//'`"
#
# If device listed with '.dq' suffix, we set up a separate output queue
#
  if [ $dualqueue ]; then
    if [ $base != $previous ]; then
      previous=$base
      echo "\
# Entry for raw device $base.raw
$base.raw|Raw output device $base:\\
    :lp=$PRINTERDEV:\\"
    if test "$PRINTERTYPE" = serial
    then
	echo "br#19200:xc#0177777:\\"
        echo ":ms=-parity,ixon,-opost:\\"
    fi
    echo ":sd=$SPOOLDIR/$base/raw:\\
    :mx#0:sf:sh:rs:"
    fi
    echo "\
# Entry for device $device (output to $base.raw)
$device|Ghostscript device $device:\\
    :lp=/dev/null:\\"
  else
    echo "\
# Entry for device $device
$device|Ghostscript device $device:\\
    :lp=$PRINTERDEV:\\"
    if test "$PRINTERTYPE" = serial
    then
	echo "br#19200:xc#0177777:\\"
        echo ":ms=-parity,ixon,-opost:\\"
    fi
  fi
  echo "\
    :sd=$SPOOLDIR/$base:\\
    :lf=$SPOOLDIR/$base/logfile:\\
    :af=$SPOOLDIR/$base/acct:\\"
  for filter in $FILTERS
  do
    if [ $dualqueue ]; then
      echo "\
    :$filter=$GSFILTERDIR/indirect/$device/gs$filter:\\"
    else
      echo "\
    :$filter=$GSFILTERDIR/direct/$device/gs$filter:\\"
    fi
  done
  echo "\
    :mx#0:sf:sh:rs:"
done
) >> $PCAP

echo "
Example printcap insert file \"$PCAP\" now created"

#
# Remind the user what's still to do
#

echo "
NB/ You will need to create the following directories, with
appropriate permissions, and do 'touch logfile' and 'touch acct'
in the top level directories (ie. not the 'raw' ones):
"
(
for device in $DEVICES
do
  dualqueue=
  case "$device" in
    *.dq) device=`basename $device .dq` ; dualqueue=t ;;
  esac
  base="`echo $device | sed 's/\.[0-9][0-9]*$//'`"
  base="`echo $base | sed 's/\.[0-9][0-9]*$//'`"
  echo "  $SPOOLDIR/$base"
  if [ $dualqueue ]; then
    echo "  $SPOOLDIR/$base/raw"
  fi
done
) | sort -u

echo "
        + + + "

Youez - 2016 - github.com/yon3zu
LinuXploit