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 /
lib /
python3 /
dist-packages /
reportlab /
pdfbase /
[ HOME SHELL ]
Name
Size
Permission
Action
__pycache__
[ DIR ]
drwxr-xr-x
acroform.py
44.61
KB
-rw-r--r--
_can_cmap_data.py
1.75
KB
-rw-r--r--
_cidfontdata.py
31.29
KB
-rw-r--r--
cidfonts.py
18.38
KB
-rw-r--r--
_fontdata_enc_macexpert.py
2.99
KB
-rw-r--r--
_fontdata_enc_macroman.py
2.87
KB
-rw-r--r--
_fontdata_enc_pdfdoc.py
2.25
KB
-rw-r--r--
_fontdata_enc_standard.py
1.79
KB
-rw-r--r--
_fontdata_enc_symbol.py
3.11
KB
-rw-r--r--
_fontdata_enc_winansi.py
2.93
KB
-rw-r--r--
_fontdata_enc_zapfdingbats.py
2.17
KB
-rw-r--r--
_fontdata.py
8.35
KB
-rw-r--r--
_fontdata_widths_courierboldoblique.py
3.58
KB
-rw-r--r--
_fontdata_widths_courierbold.py
3.58
KB
-rw-r--r--
_fontdata_widths_courieroblique.py
3.58
KB
-rw-r--r--
_fontdata_widths_courier.py
3.58
KB
-rw-r--r--
_fontdata_widths_helveticaboldoblique.py
3.58
KB
-rw-r--r--
_fontdata_widths_helveticabold.py
3.58
KB
-rw-r--r--
_fontdata_widths_helveticaoblique.py
3.58
KB
-rw-r--r--
_fontdata_widths_helvetica.py
3.58
KB
-rw-r--r--
_fontdata_widths_symbol.py
3.29
KB
-rw-r--r--
_fontdata_widths_timesbolditalic.py
3.58
KB
-rw-r--r--
_fontdata_widths_timesbold.py
3.59
KB
-rw-r--r--
_fontdata_widths_timesitalic.py
3.58
KB
-rw-r--r--
_fontdata_widths_timesroman.py
3.58
KB
-rw-r--r--
_fontdata_widths_zapfdingbats.py
2.67
KB
-rw-r--r--
_glyphlist.py
105.92
KB
-rw-r--r--
__init__.py
275
B
-rw-r--r--
pdfdoc.py
88.02
KB
-rw-r--r--
pdfform.py
15.34
KB
-rw-r--r--
pdfmetrics.py
29.23
KB
-rw-r--r--
pdfpattern.py
3.67
KB
-rw-r--r--
pdfutils.py
9.9
KB
-rw-r--r--
rl_codecs.py
55.1
KB
-rw-r--r--
ttfonts.py
51.88
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : pdfpattern.py
__doc__="""helper for importing pdf structures into a ReportLab generated document """ from reportlab.pdfbase.pdfdoc import format, PDFObject, pdfdocEnc from reportlab.lib.utils import strTypes def _patternSequenceCheck(pattern_sequence): allowedTypes = strTypes if isinstance(strTypes, tuple) else (strTypes,) allowedTypes = allowedTypes + (PDFObject,PDFPatternIf) for x in pattern_sequence: if not isinstance(x,allowedTypes): if len(x)!=1: raise ValueError("sequence elts must be strings/bytes/PDFPatternIfs or singletons containing strings: "+ascii(x)) if not isinstance(x[0],strTypes): raise ValueError("Singletons must contain strings/bytes or PDFObject instances only: "+ascii(x[0])) class PDFPattern(PDFObject): __RefOnly__ = 1 def __init__(self, pattern_sequence, **keywordargs): """ Description of a kind of PDF object using a pattern. Pattern sequence should contain strings, singletons of form [string] or PDFPatternIf objects. Strings are literal strings to be used in the object. Singletons are names of keyword arguments to include. PDFpatternIf objects allow some conditionality. Keyword arguments can be non-instances which are substituted directly in string conversion, or they can be object instances in which case they should be pdfdoc.* style objects with a x.format(doc) method. Keyword arguments may be set on initialization or subsequently using __setitem__, before format. "constant object" instances can also be inserted in the patterns. """ _patternSequenceCheck(pattern_sequence) self.pattern = pattern_sequence self.arguments = keywordargs def __setitem__(self, item, value): self.arguments[item] = value def __getitem__(self, item): return self.arguments[item] def eval(self,L): arguments = self.arguments document = self.__document for x in L: if isinstance(x,strTypes): yield pdfdocEnc(x) elif isinstance(x,PDFObject): yield x.format(document) elif isinstance(x,PDFPatternIf): result = list(self.eval(x.cond)) cond = result and result[0] for z in self.eval(x.thenPart if cond else x.elsePart): yield z else: name = x[0] value = arguments.get(name, None) if value is None: raise ValueError("%s value not defined" % ascii(name)) if isinstance(value,PDFObject): yield format(value,document) elif isinstance(value,strTypes): yield pdfdocEnc(value) else: yield pdfdocEnc(str(value)) def format(self, document): self.__document = document try: return b"".join(self.eval(self.pattern)) finally: del self.__document def clone(self): c = object.__new__(self.__class__) c.pattern = self.pattern c.arguments = self.arguments return c class PDFPatternIf: '''cond will be evaluated as [cond] in PDFpattern eval. It should evaluate to a list with value 0/1 etc etc. thenPart is a list to be evaluated if the cond evaulates true, elsePart is the false sequence. ''' def __init__(self,cond,thenPart=[],elsePart=[]): if not isinstance(cond,list): cond = [cond] for x in cond, thenPart, elsePart: _patternSequenceCheck(x) self.cond = cond self.thenPart = thenPart self.elsePart = elsePart
Close