/usr/lib/cups/driver/pxljr is in printer-driver-pxljr 1.3+repack0-2.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 | #!/usr/bin/env python
# compressor.py
from subprocess import Popen, PIPE
def compress(value):
"""Compresses a string with the xz binary"""
process = Popen(["xz", "--compress", "--force"], stdin=PIPE, stdout=PIPE)
return process.communicate(value)[0]
def decompress(value):
"""Decompresses a string with the xz binary"""
process = Popen(["xz", "--decompress", "--stdout", "--force"],
stdin=PIPE, stdout=PIPE)
return process.communicate(value)[0]
def compress_file(path):
"""Compress the file at 'path' with the xz binary"""
process = Popen(["xz", "--compress", "--force", "--stdout", path], stdout=PIPE)
return process.communicate()[0]
# compressor.py
from optparse import OptionParser
from sys import argv
import base64
import cPickle
from cStringIO import StringIO
from os.path import basename
def load():
ppds_compressed = base64.b64decode(ppds_compressed_b64)
ppds_decompressed = decompress(ppds_compressed)
ppds = cPickle.loads(ppds_decompressed)
return ppds
def ls():
binary_name = basename(argv[0])
ppds = load()
for key, value in ppds.iteritems():
if key == 'ARCHIVE': continue
for ppd in value[2]:
print ppd.replace('"', '"' + binary_name + ':', 1)
def cat(ppd):
# Ignore driver's name, take only PPD's
ppd = ppd.split(":")[-1]
# Remove also the index
ppd = "0/" + ppd[ppd.find("/")+1:]
ppds = load()
ppds['ARCHIVE'] = StringIO(decompress(ppds['ARCHIVE']))
if ppds.has_key(ppd):
start = ppds[ppd][0]
length = ppds[ppd][1]
ppds['ARCHIVE'].seek(start)
return ppds['ARCHIVE'].read(length)
def main():
usage = "usage: %prog list\n" \
" %prog cat URI"
version = "%prog 0.4.9\n" \
"Copyright (c) 2010 Vitor Baptista.\n" \
"This is free software; see the source for copying conditions.\n" \
"There is NO warranty; not even for MERCHANTABILITY or\n" \
"FITNESS FOR A PARTICULAR PURPOSE."
parser = OptionParser(usage=usage,
version=version)
(options, args) = parser.parse_args()
if len(args) == 0 or len(args) > 2:
parser.error("incorrect number of arguments")
if args[0].lower() == 'list':
ls()
elif args[0].lower() == 'cat':
if not len(args) == 2:
parser.error("incorrect number of arguments")
ppd = cat(args[1])
if not ppd:
parser.error("Printer '%s' does not have default driver!" % args[1])
print ppd
else:
parser.error("argument " + args[0] + " invalid")
# PPDs Archive
ppds_compressed_b64 = "/Td6WFoAAATm1rRGAgAhARYAAAB0L+Wj4C+OFcxdABQZCgMPj8dYIupuhXxusbkpO1EcP6rmgCMDNTYw/Do9us5Z8SPGAyCKdMa9DrNGecOtAhViFHdFxfY9FX3OcVJRYQADAxAL83U6m9nVg30NawkyhzsdEcf+3KnHt11Tr+j8C32p2NhDN9wB7FQD95RHfav7TTikWq/Z3OD+JZWAbqpOXGGqMSnj/1Zr6Zc9t6IXbuurkhmN4THcr6EL4wF8pBU1jwkrhCEJTp+yO/CNO7/I9tYM7Hv7ou3CJnLAdP19piR31sLUdT7dD41tqLXhkUN31P4LpSaf14BAW9kaQHIfRQwtJorjIMHEATHiPRHFVPeO5rdYD99wOjTsxv05yMfJJeq8O6F2kP21T9tG5EfwxN6XuzfLFGoiESwSlg71TJxT1UjidYn1prmn4DwLYVqfbYiIdOZ8bG8ws02KFl/XEo1iW3hUPJOM8ar04JxF32xMP0JDyAt3UAUj7OaZaKm4tEDe0l63kqJi3puYhXY11Od4YpH+tBXlCkXk2y6g6A457kO6PkmuDaCU3x1FrAC9LalLQwAwuofqO2FMq61LhXplJd+3m8VIsaJvh56/Wzp0hqKNXXxrLmFqcVJjW2TgSslpbyKx6BXbXMv/K8xS8gew4YCpJ+ze035OW+YmLqlaZKY97FWiyVhn+smexBy37T+f+J5dUJ7YhToF3VNkJYrNpE3zzo6w5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ufKFrdYpXDYUM3SpIvXjGIQBf95v/tQdlErXTqRG0nHsqpmy4t0rTvC24xEgVXYzGnt36FpWZW59jMj0rQoQA8kKcwwO6egIYqCLmKrdDQY+oY4/dvmk7dasYT89sLG8twi+5HUaes7PPP/cKWxENYkp3arL3zU4FmBgkraa5jtwFf8cTSGdFtujCS6CZ75ZW39aQREyalAQgscaFnxAbO2Bp8V5/G6piRlbkLK+Z6uqr3F0d15ryuoWFk32z2a0zpCf9bkJBk4tAAlTkiTJ/5eN+5wBeJ8Nd8Db1RQAB6CuPXwAAx5yJXbHEZ/sCAAAAAARZWg=="
if __name__ == "__main__":
try:
main()
except (IOError, KeyboardInterrupt):
# We don't want neither IOError nor KeyboardInterrupt throwing a
# traceback into stdout.
pass
|