当前位置:网站首页>正则表达式及绕过案例
正则表达式及绕过案例
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,但是注意要先把木马改成图片格式,才能进行抓包,再进行更改
边栏推荐
- [shutter -- geTx] pop up - dialog, snackBar, bottomsheet
- matlab 激励模型 三角波频谱
- Search Yiwu shopping (PAI Li Tao) API by image
- Flash source code startup phase
- Pytoch -- used by visdom
- Keyword maintenance of dream weaving document doesn't work
- VB.net Chart1的处理
- imshow()函数后面如果不加waitKey()函数就不显示
- JS verify complex password
- Go --- identifiers and keywords in go language
猜你喜欢
![[shutter -- geTx] pop up - dialog, snackBar, bottomsheet](/img/17/af2e45620e96a78235081145b7bb76.png)
[shutter -- geTx] pop up - dialog, snackBar, bottomsheet

Selenium automated test interview questions family bucket

Supplement - nonlinear programming

06 cp 命令

07 df 命令

Just one dependency to give swagger a new skin, which is simple and cool~

FreeRTOS personal notes - Events

08 du 命令

Implementation of MATLAB short-time autocorrelation

08 Du command
随机推荐
Matlab pitch period estimation post-processing
45. Instance segmented labelme dataset to coco dataset and coco dataset to labelme dataset
JS verify complex password
09 expr 命令
Knowledge base tools | wechat, document center, image display page can be generated by dragging (with template, directly used)
Go -- go language naming specification
Get network time by unity
My SQL is OK. Why is it still so slow? MySQL locking rules
A bowl of noodles in a dream
unity 获取网络时间
JS delay execution window.onload
Search eBay product API by keyword
Development to testing: a six-year road to automation from scratch
matlab 激励模型 三角波频谱
SQL注入 Less26(过滤空格和注释符,使用不带空格的报错注入)
Resume in 2022 is dead in the sea. Don't vote. Software testing positions are saturated
Pytorch--Visdom使用
JDBC总结
xshell7个人免费下载,使用
What you need to know about mobile video compatibility