当前位置:网站首页>正则表达式及绕过案例
正则表达式及绕过案例
2022-07-26 21:20:00 【小帆,也会启航】
校验数字:
1. 数字:^[0-9]*$
2. n位的数字:^\d{n}$
3. 至少n位的数字:^\d{n,}$
4. m-n位的数字:^\d{m,n}$
5. 零和非零开头的数字:^(0|[1-9][0-9]*)$
6. 非零开头的最多带两位小数的数字:^([1-9][0-9]*)+(.[0-9]{1,2})?$
7. 带1-2位小数的正数或负数:^(\-)?\d+(\.\d{1,2})?$
8. 正数、负数、和小数:^(\-|\+)?\d+(\.\d+)?$
9. 有两位小数的正实数:^[0-9]+(.[0-9]{2})?$
10. 有1~3位小数的正实数:^[0-9]+(.[0-9]{1,3})?$
11. 非零的正整数:^[1-9]\d*$ 或 ^([1-9][0-9]*){1,3}$ 或 ^\+?[1-9][0-9]*$
12. 非零的负整数:^\-[1-9][]0-9"*$ 或 ^-[1-9]\d*$
13. 非负整数:^\d+$ 或 ^[1-9]\d*|0$
14. 非正整数:^-[1-9]\d*|0$ 或 ^((-\d+)|(0+))$
15. 非负浮点数:^\d+(\.\d+)?$ 或 ^[1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0$
16. 非正浮点数:^((-\d+(\.\d+)?)|(0+(\.0+)?))$ 或 ^(-([1-9]\d*\.\d*|0\.\d*[1-9]\d*))|0?\.0+|0$
17. 正浮点数:^[1-9]\d*\.\d*|0\.\d*[1-9]\d*$ 或 ^(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*))$
18. 负浮点数:^-([1-9]\d*\.\d*|0\.\d*[1-9]\d*)$ 或 ^(-(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*)))$
19. 浮点数:^(-?\d+)(\.\d+)?$ 或 ^-?([1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0)$
校验字符:
1. 汉字:^[\u4e00-\u9fa5]{0,}$
2. 英文和数字:^[A-Za-z0-9]+$ 或 ^[A-Za-z0-9]{4,40}$
3. 长度为3-20的所有字符:^.{3,20}$
4. 由26个英文字母组成的字符串:^[A-Za-z]+$
5. 由26个大写英文字母组成的字符串:^[A-Z]+$
6. 由26个小写英文字母组成的字符串:^[a-z]+$
7. 由数字和26个英文字母组成的字符串:^[A-Za-z0-9]+$
8. 由数字、26个英文字母或者下划线组成的字符串:^\w+$ 或 ^\w{3,20}$
绕过案例:
用户输入
遇到轻量级检测
通过javascript检测绕过
通过MIME类型检测绕过
遇到文件内容检测
通过代码注入绕过
遇到路径、扩展名检测
检测绕过
遇到黑名单检测
文件大小写绕过
名单列表绕过
特殊文件名绕过(windows)
0x00绕过
遇到白名单检测
0x00截断绕过
代码层上传漏洞
直接解析
检测未绕过
解析攻击
代码层解析调用
.htaccess文件解析
本地文件包含解析
概要
代码层上传漏洞
间接解析
应用层解析调用
Apache解析漏洞
IIS解析漏洞
Nginx解析漏洞
概要
代码层上传漏洞
间接解析
测试:
客户端检测绕过(javascript 检测)
首先观察到提示只允许上传图片文件,那么前端的查看代码,当页面发生改变时,会调用这个checkFileExt函数来检查上传的是不是图片,我们只需要在前端将checkFileExt函数删除,就能上传一个一个非图片文件。
也可以使用burpsuit,但是注意要先把木马改成图片格式,才能进行抓包,再进行更改
边栏推荐
- Is it safe to open an account on flush? How to choose a securities firm for opening an account
- Pytoch squeeze() unsqueeze() usage
- A bowl of noodles in a dream
- Protobuf之proto基础语法
- xshell7个人免费下载,使用
- NPM, NPM Chinese documents, NPM learning and using
- 会用redis吗?那还不快来了解下redis protocol
- Xshell7 personal free download, use
- 也谈数据治理
- MOS 管示意图
猜你喜欢

Resume in 2022 is dead in the sea. Don't vote. Software testing positions are saturated

月薪5万的朋友告诉我,你只是在打杂

Matlab draw short-term energy diagram

Technology sharing | do you know the functions of the server interface automated testing and requests library?

Let me show you the MySQL isolation level. What happens when two transactions operate on the same row of data at the same time?
![[mysql]substr usage - query the value of specific digits of a field in the table](/img/d5/68658ff15f204dc97abfe7c9e6b354.png)
[mysql]substr usage - query the value of specific digits of a field in the table

Pytoch -- used by visdom

Altium Designer 22 修改选中元件的层属性

Knowledge base tools | wechat, document center, image display page can be generated by dragging (with template, directly used)

仅需一个依赖给Swagger换上新皮肤,既简单又炫酷
随机推荐
OPPO 自研大规模知识图谱及其在数智工程中的应用
JMeter自定义日志与日志分析
If you do not add waitkey() function after imshow() function, it will not be displayed
软件测试技术之跨平台的移动端UI自动化测试(下)
七月集训(第26天) —— 并查集
mysql推荐书
Flag decodes token, mounts token, decorator, and seven cattle cloud upload
Resume in 2022 is dead in the sea. Don't vote. Software testing positions are saturated
Go----Go 语言命名规范
JS 延迟执行window.onload
NPM, NPM Chinese documents, NPM learning and using
45. Instance segmented labelme dataset to coco dataset and coco dataset to labelme dataset
day07-
Pytoch -- used by visdom
Thoroughly understand the principle and implementation of service discovery
Circular progress bar animation based on cashapelayer and Bezier curve
Triangular wave spectrum of MATLAB excitation model
Database notes (from Lao She)
Knowledge base tools | wechat, document center, image display page can be generated by dragging (with template, directly used)
matlab 画短时平均幅度谱