关于sql注入
2016-01-24 23:22
316 查看
删除表,先猜表名,可以使用下面的语名:
If a field only allow number, give it a String or others 假如一个字段仅仅只允许使用一个数字,传给他一个字符串或者其它类型。
Use ‘OR 1=1’, get all records in query function 使用‘or 1=1’ 能得到所有的查询记录
In login function, give user name field like ‘username’--’, “--’ and A.password = ‘’” is commented
在登录功能,给用户传 ‘username’--’, “--’ and A.password = ‘’”
Adding records function, if there is 4 fields in this table, add 5 fields, eg.
添加 一条记录,假如这条表只有4个字段,那就多加一个字段
Input test data in or out of this field data
Add single quotation marks and semicolon, and break off string splicing, this is similar with point 4
Yellow partis test data we input
Select * from A where A.a = ‘testdata’; drop table A---’; |
Use ‘OR 1=1’, get all records in query function 使用‘or 1=1’ 能得到所有的查询记录
Select * from A where A.a = ‘testdata’ OR ‘1’=’1’; |
在登录功能,给用户传 ‘username’--’, “--’ and A.password = ‘’”
Select * from user A where A.username = ‘username’--’ and A.password = ‘’; |
添加 一条记录,假如这条表只有4个字段,那就多加一个字段
Normal: Insert into table A values(‘’,’’,’’,’’); Test Data: Insert into table A values(‘’,’testdata’,’’,’’,’’); |
Add single quotation marks and semicolon, and break off string splicing, this is similar with point 4
Update table A set A.a = ‘testdata’;--’ |
相关文章推荐
- ubuntu 64位下轻松安装mongodb
- mongodb3.2系统性学习——2、write concern mongodb 写安全机制
- MySql免安装版的配置
- 思考:系统的瓶颈到底在哪儿,redis的作用?
- 在linux环境部署redis
- MySQL常用命令
- T-SQL基础--TOP
- 【SQL server】 数据类型
- redis快速入门教程
- Mysql 读写分离实现及代理Amoeba的使用
- 7_Selenium结合数据库sqlite
- MongoDB时间类型
- SQlite存储
- Node.js权威指南 (13) - 数据库访问
- (转)mysql数据类型
- mysql和mysqli使用笔记
- 3.3 创建并使用数据库
- MongoDB的三种启动方式
- 数据库 2015 年最热门的 10 篇技术文章
- Redis能干啥?细看11种Web应用场景