MINI SHELL

Server : Apache/2.2.2 (Fedora)
System : Linux App1.pathumtani.go.th 2.6.20-1.2320.fc5smp #1 SMP Tue Jun 12 19:40:16 EDT 2007 i686
User : apache ( 48)
PHP Version : 5.2.9
Disable Function : NONE
Directory :  /usr/lib/cups/backend/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/lib/cups/backend/ncp
#!/bin/sh
# This is a modified version of 'ncpprint'.  It can now be used as a CUPS
# backend.
# Modifications:
# Copyright (C) 2002  Red Hat, inc
# Copyright (C) 2002  Tim Waugh
# Before modification: shipped as /usr/share/printconf/util/ncpprint

if [ -z "$*" ]
then
  # This is where we would enumerate all the URIs we support.
  # Patches welcome.
  exit 0
fi

FILE=$6
if [ -z "$FILE" ]
then
  FILE=-
fi

# $DEVICE_URI is 'ncp://[user:password@]server/queue'
URI=${DEVICE_URI#*://}
queue=${URI#*/}
URI=${URI%/$queue}
server=${URI#*@}
URI=${URI%$server}
URI=${URI%@}
if [ -n "$URI" ]
then
  user=${URI%:*}
  URI=${URI#$user}
  password=${URI#:}
fi

#echo user: ${user-(none)}
#echo password: ${password-(none)}
#echo server: $server
#echo queue: $queue

if [ -n "$user" ]
then
  if [ -n "$password" ]
  then
    /usr/bin/nprint -S "$server" -q "$queue" -U "$user" -P "$password" -N "$FILE" 2>/dev/null
  else
    /usr/bin/nprint -S "$server" -q "$queue" -U "$user" -n -N "$FILE" 2>/dev/null
  fi
else
  /usr/bin/nprint -S "$server" -q "$queue" -N "$FILE" 2>/dev/null
fi

Anon7 - 2021