Linux ns1.utparral.edu.mx 6.8.0-79-generic #79~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug 15 16:54:53 UTC 2 x86_64
Apache/2.4.58 (Unix) OpenSSL/1.1.1w PHP/8.2.12 mod_perl/2.0.12 Perl/v5.34.1
: 10.10.1.9 | : 10.10.1.254
Cant Read [ /etc/named.conf ]
daemon
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
README
+ Create Folder
+ Create File
/
usr /
share /
cups /
[ HOME SHELL ]
Name
Size
Permission
Action
banners
[ DIR ]
drwxr-xr-x
braille
[ DIR ]
drwxr-xr-x
charsets
[ DIR ]
drwxr-xr-x
data
[ DIR ]
drwxr-xr-x
doc-root
[ DIR ]
drwxr-xr-x
drv
[ DIR ]
drwxr-xr-x
examples
[ DIR ]
drwxr-xr-x
ipptool
[ DIR ]
drwxr-xr-x
locale
[ DIR ]
drwxr-xr-x
mime
[ DIR ]
drwxr-xr-x
model
[ DIR ]
drwxr-xr-x
ppdc
[ DIR ]
drwxr-xr-x
ppd-updaters
[ DIR ]
drwxr-xr-x
profiles
[ DIR ]
drwxr-xr-x
templates
[ DIR ]
drwxr-xr-x
usb
[ DIR ]
drwxr-xr-x
cupsd.conf.default
6.5
KB
-rw-r--r--
cups-files.conf.default
2.87
KB
-rw-r--r--
snmp.conf.default
142
B
-rw-r--r--
test-drivers
3.57
KB
-rwxr-xr-x
Delete
Unzip
Zip
${this.title}
Close
Code Editor : test-drivers
#!/bin/sh set -e -u DUMMY_PRINTER_NAME=test-printer0 DRIVER_REGEXP='^.*' PDFS_PATH=/usr/share/cups/data/ LPINFO_RUN=true DRIVERS_LIST='' while getopts 'n:r:p:l:h' flag; do case "${flag}" in n) DUMMY_PRINTER_NAME="${OPTARG}" ;; r) DRIVER_REGEXP="${OPTARG}" ;; p) PDFS_PATH="${OPTARG}" ;; l) LPINFO_RUN=false; DRIVERS_LIST=${OPTARG} ;; h) echo "Usage: $0 [-n printer_name] [-r '^driver_regexp'] [-p ./pdf-path] [-l drivers_list]"; return 1;; esac done if $LPINFO_RUN; then # textonly, gen-brf, gen-ubrl and indexv[3,4] can't print PDF # pdftoijs is currently buggy !? DRIVERS_LIST=$(lpinfo -m | cut -f1 -d' ' | grep -Ev 'brf|everywhere|gen-ubrl|indexv[3,4]|pdftoijs|raw|textonly' | grep -E $DRIVER_REGEXP) fi cleanup() { # Delete it echo -n " - Interrupted (or finished), delete test printer:" rm -f ${DUMMY_PRINTER_STDERR_FILE} rm -f ${DUMMY_PRINTER_PRINT_FILE} /usr/sbin/lpadmin -x $DUMMY_PRINTER_NAME 2>/dev/null || : echo " done." } trap cleanup EXIT INT # Configure the running CUPS server to do debug2 logging sed -e 's/^.*LogLevel.*$/LogLevel debug2/g' -i /etc/cups/cupsd.conf # Configure the running CUPS server to set FileDevice to Yes sed -e 's/^.*FileDevice.*$/FileDevice Yes/g' -i /etc/cups/cups-files.conf # Configure the running CUPS server to allow root to do administrative tasks sed -e 's/^.*SystemGroup.*$/SystemGroup lpadmin root/g' -i /etc/cups/cups-files.conf service cups restart DUMMY_PRINTER_STDERR_FILE=`mktemp` DUMMY_PRINTER_PRINT_FILE=`mktemp` for driver in $DRIVERS_LIST; do echo "* Driver $driver" echo -n " - Create test printer:" # Create dummy printer /usr/sbin/lpadmin -p $DUMMY_PRINTER_NAME -E -m $driver -v file://${DUMMY_PRINTER_PRINT_FILE} 2> $DUMMY_PRINTER_STDERR_FILE echo " done." # Tell stderr whether some unknown lines have been seen # Filter out the deprecation messages # Both messages from systemv/lpadmin.c cat "${DUMMY_PRINTER_STDERR_FILE}" | \ grep -v -E "lpadmin: (Raw queues|Printer drivers) are deprecated and will stop working in a future version of CUPS." \ || true \ 1>&2 for file in $(find $PDFS_PATH -name '*.pdf') ; do echo -n " - Print $file: " # Print the default testprint to it, get request id rid=$(/usr/bin/lp -d $DUMMY_PRINTER_NAME $file | sed -e 's/^.*request id is \(.*\) (.*)$/\1/g') # Wait for the print to finish while LPSTAT=`LANG=C /usr/bin/lpstat -l` && echo $LPSTAT | grep -q "^$rid "; do # If the filter is failed; stop the waiting and give as much context as possible if echo $LPSTAT | grep -A3 "^$rid" | grep -q "Filter failed"; then echo " Filter failed, aborting!" >&2 echo "$ lpstat -l" >&2 echo "$LPSTAT" # Get job-id from request-id; assume it's ${printer_name}-${job_id} jobid=$(echo $rid | sed -e "s/^${DUMMY_PRINTER_NAME}-//g") >&2 echo "$ grep "\[Job $jobid\]" /var/log/cups/error_log" >&2 grep "\[Job $jobid\]" /var/log/cups/error_log break fi /bin/sleep 1s echo -n "." done # Make sure the resulting data is not empty if [ ! -s "${DUMMY_PRINTER_PRINT_FILE}" ]; then echo " Filter succeeded but resulting file is empty; aborting!" false fi rm -f ${DUMMY_PRINTER_PRINT_FILE} echo " done." done # Delete it echo -n " - Delete test printer:" /usr/sbin/lpadmin -x $DUMMY_PRINTER_NAME echo " done." done
Close