Home >Backend Development >PHP Problem >What is the PHP pseudo-protocol?

What is the PHP pseudo-protocol?

王林
王林Original
2019-09-18 17:58:5610711browse

What is the PHP pseudo-protocol?

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

<?php
include($_GET[&#39;file&#39;])
?>

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Related articles

See more