PHP pseudo-protocol
First of all, we need to understand the file inclusion functions we may encounter in CTF:
1、include
2、require
3、include_once
4、require_once
5、highlight_file
6、show_source
7.readfile
8.file_get_contents
9.fopen
10.file
(Compare Common)
PHP pseudo-protocol is actually the supported protocol and encapsulation protocol (12 types)
a. file:// — access the local file system
b. http:// — Access HTTP(s) URLs
c. ftp:// — Access FTP(s) URLs
d. php:// — Access various Input/output streams (I/O streams)
e. zlib:// — Compressed stream
f. data:// — Data (RFC 2397)
g . glob:// — Find matching file path pattern
h. phar:// — PHP archive
i. ssh2:// — Secure Shell 2
j . rar:// — RAR
k. ogg:// — audio stream
l. expect:// — handle interactive streams
Whether truncation is required
1. No need to truncate
2. Need to truncate(can be used for testing in php version
The above is the detailed content of What is the PHP pseudo-protocol?. For more information, please follow other related articles on the PHP Chinese website!