403Webshell
Server IP : 103.119.228.120  /  Your IP : 3.15.239.0
Web Server : Apache
System : Linux v8.techscape8.com 3.10.0-1160.119.1.el7.tuxcare.els2.x86_64 #1 SMP Mon Jul 15 12:09:18 UTC 2024 x86_64
User : nobody ( 99)
PHP Version : 5.6.40
Disable Function : shell_exec,symlink,system,exec,proc_get_status,proc_nice,proc_terminate,define_syslog_variables,syslog,openlog,closelog,escapeshellcmd,passthru,ocinum cols,ini_alter,leak,listen,chgrp,apache_note,apache_setenv,debugger_on,debugger_off,ftp_exec,dl,dll,myshellexec,proc_open,socket_bind,proc_close,escapeshellarg,parse_ini_filepopen,fpassthru,exec,passthru,escapeshellarg,escapeshellcmd,proc_close,proc_open,ini_alter,popen,show_source,proc_nice,proc_terminate,proc_get_status,proc_close,pfsockopen,leak,apache_child_terminate,posix_kill,posix_mkfifo,posix_setpgid,posix_setsid,posix_setuid,dl,symlink,shell_exec,system,dl,passthru,escapeshellarg,escapeshellcmd,myshellexec,c99_buff_prepare,c99_sess_put,fpassthru,getdisfunc,fx29exec,fx29exec2,is_windows,disp_freespace,fx29sh_getupdate,fx29_buff_prepare,fx29_sess_put,fx29shexit,fx29fsearch,fx29ftpbrutecheck,fx29sh_tools,fx29sh_about,milw0rm,imagez,sh_name,myshellexec,checkproxyhost,dosyayicek,c99_buff_prepare,c99_sess_put,c99getsource,c99sh_getupdate,c99fsearch,c99shexit,view_perms,posix_getpwuid,posix_getgrgid,posix_kill,parse_perms,parsesort,view_perms_color,set_encoder_input,ls_setcheckboxall,ls_reverse_all,rsg_read,rsg_glob,selfURL,dispsecinfo,unix2DosTime,addFile,system,get_users,view_size,DirFiles,DirFilesWide,DirPrintHTMLHeaders,GetFilesTotal,GetTitles,GetTimeTotal,GetMatchesCount,GetFileMatchesCount,GetResultFiles,fs_copy_dir,fs_copy_obj,fs_move_dir,fs_move_obj,fs_rmdir,SearchText,getmicrotime
MySQL : ON |  cURL : ON |  WGET : ON |  Perl : ON |  Python : ON |  Sudo : ON |  Pkexec : ON
Directory :  /usr/local/share/man/man3/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /usr/local/share/man/man3/URI::Escape.3pm
.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Set up some character translations and predefined strings.  \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
.\" nothing in troff, for use with C<>.
.tr \(*W-
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
.    ds -- \(*W-
.    ds PI pi
.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
.    ds L" ""
.    ds R" ""
.    ds C` ""
.    ds C' ""
'br\}
.el\{\
.    ds -- \|\(em\|
.    ds PI \(*p
.    ds L" ``
.    ds R" ''
.    ds C`
.    ds C'
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\"
.\" If the F register is turned on, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD.  Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.\"
.\" Avoid warning from groff about undefined register 'F'.
.de IX
..
.nr rF 0
.if \n(.g .if rF .nr rF 1
.if (\n(rF:(\n(.g==0)) \{
.    if \nF \{
.        de IX
.        tm Index:\\$1\t\\n%\t"\\$2"
..
.        if !\nF==2 \{
.            nr % 0
.            nr F 2
.        \}
.    \}
.\}
.rr rF
.\" ========================================================================
.\"
.IX Title "URI::Escape 3"
.TH URI::Escape 3 "2018-04-22" "perl v5.16.3" "User Contributed Perl Documentation"
.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH "NAME"
URI::Escape \- Percent\-encode and percent\-decode unsafe characters
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
.Vb 4
\& use URI::Escape;
\& $safe = uri_escape("10% is enough\en");
\& $verysafe = uri_escape("foo", "\e0\-\e377");
\& $str  = uri_unescape($safe);
.Ve
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
This module provides functions to percent-encode and percent-decode \s-1URI\s0 strings as
defined by \s-1RFC 3986.\s0 Percent-encoding \s-1URI\s0's is informally called \*(L"\s-1URI\s0 escaping\*(R".
This is the terminology used by this module, which predates the formalization of the
terms by the \s-1RFC\s0 by several years.
.PP
A \s-1URI\s0 consists of a restricted set of characters.  The restricted set
of characters consists of digits, letters, and a few graphic symbols
chosen from those common to most of the character encodings and input
facilities available to Internet users.  They are made up of the
\&\*(L"unreserved\*(R" and \*(L"reserved\*(R" character sets as defined in \s-1RFC 3986.\s0
.PP
.Vb 4
\&   unreserved    = ALPHA / DIGIT / "\-" / "." / "_" / "~"
\&   reserved      = ":" / "/" / "?" / "#" / "[" / "]" / "@"
\&                   "!" / "$" / "&" / "\*(Aq" / "(" / ")"
\&                 / "*" / "+" / "," / ";" / "="
.Ve
.PP
In addition, any byte (octet) can be represented in a \s-1URI\s0 by an escape
sequence: a triplet consisting of the character \*(L"%\*(R" followed by two
hexadecimal digits.  A byte can also be represented directly by a
character, using the US-ASCII character for that octet.
.PP
Some of the characters are \fIreserved\fR for use as delimiters or as
part of certain \s-1URI\s0 components.  These must be escaped if they are to
be treated as ordinary data.  Read \s-1RFC 3986\s0 for further details.
.PP
The functions provided (and exported by default) from this module are:
.ie n .IP "uri_escape( $string )" 4
.el .IP "uri_escape( \f(CW$string\fR )" 4
.IX Item "uri_escape( $string )"
.PD 0
.ie n .IP "uri_escape( $string, $unsafe )" 4
.el .IP "uri_escape( \f(CW$string\fR, \f(CW$unsafe\fR )" 4
.IX Item "uri_escape( $string, $unsafe )"
.PD
Replaces each unsafe character in the \f(CW$string\fR with the corresponding
escape sequence and returns the result.  The \f(CW$string\fR argument should
be a string of bytes.  The \fIuri_escape()\fR function will croak if given a
characters with code above 255.  Use \fIuri_escape_utf8()\fR if you know you
have such chars or/and want chars in the 128 .. 255 range treated as
\&\s-1UTF\-8.\s0
.Sp
The \fIuri_escape()\fR function takes an optional second argument that
overrides the set of characters that are to be escaped.  The set is
specified as a string that can be used in a regular expression
character class (between [ ]).  E.g.:
.Sp
.Vb 3
\&  "\ex00\-\ex1f\ex7f\-\exff"          # all control and hi\-bit characters
\&  "a\-z"                         # all lower case characters
\&  "^A\-Za\-z"                     # everything not a letter
.Ve
.Sp
The default set of characters to be escaped is all those which are
\&\fInot\fR part of the \f(CW\*(C`unreserved\*(C'\fR character class shown above as well
as the reserved characters.  I.e. the default is:
.Sp
.Vb 1
\&    "^A\-Za\-z0\-9\e\-\e._~"
.Ve
.ie n .IP "uri_escape_utf8( $string )" 4
.el .IP "uri_escape_utf8( \f(CW$string\fR )" 4
.IX Item "uri_escape_utf8( $string )"
.PD 0
.ie n .IP "uri_escape_utf8( $string, $unsafe )" 4
.el .IP "uri_escape_utf8( \f(CW$string\fR, \f(CW$unsafe\fR )" 4
.IX Item "uri_escape_utf8( $string, $unsafe )"
.PD
Works like \fIuri_escape()\fR, but will encode chars as \s-1UTF\-8\s0 before
escaping them.  This makes this function able to deal with characters
with code above 255 in \f(CW$string\fR.  Note that chars in the 128 .. 255
range will be escaped differently by this function compared to what
\&\fIuri_escape()\fR would.  For chars in the 0 .. 127 range there is no
difference.
.Sp
Equivalent to:
.Sp
.Vb 2
\&    utf8::encode($string);
\&    my $uri = uri_escape($string);
.Ve
.Sp
Note: JavaScript has a function called \fIescape()\fR that produces the
sequence \*(L"%uXXXX\*(R" for chars in the 256 .. 65535 range.  This function
has really nothing to do with \s-1URI\s0 escaping but some folks got confused
since it \*(L"does the right thing\*(R" in the 0 .. 255 range.  Because of
this you sometimes see \*(L"URIs\*(R" with these kind of escapes.  The
JavaScript \fIencodeURIComponent()\fR function is similar to \fIuri_escape_utf8()\fR.
.IP "uri_unescape($string,...)" 4
.IX Item "uri_unescape($string,...)"
Returns a string with each \f(CW%XX\fR sequence replaced with the actual byte
(octet).
.Sp
This does the same as:
.Sp
.Vb 1
\&   $string =~ s/%([0\-9A\-Fa\-f]{2})/chr(hex($1))/eg;
.Ve
.Sp
but does not modify the string in-place as this \s-1RE\s0 would.  Using the
\&\fIuri_unescape()\fR function instead of the \s-1RE\s0 might make the code look
cleaner and is a few characters less to type.
.Sp
In a simple benchmark test I did,
calling the function (instead of the inline \s-1RE\s0 above) if a few chars
were unescaped was something like 40% slower, and something like 700% slower if none were.  If
you are going to unescape a lot of times it might be a good idea to
inline the \s-1RE.\s0
.Sp
If the \fIuri_unescape()\fR function is passed multiple strings, then each
one is returned unescaped.
.PP
The module can also export the \f(CW%escapes\fR hash, which contains the
mapping from all 256 bytes to the corresponding escape codes.  Lookup
in this hash is faster than evaluating \f(CW\*(C`sprintf("%%%02X", ord($byte))\*(C'\fR
each time.
.SH "SEE ALSO"
.IX Header "SEE ALSO"
\&\s-1URI\s0
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
Copyright 1995\-2004 Gisle Aas.
.PP
This program is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.

Youez - 2016 - github.com/yon3zu
LinuXploit