SQL注入测试用例
Drop table. Guess table name and drop it, note the next flowing SQL language
Select * from A where A.a = ‘testdata’; drop table A---’; |
- 2. If a field only allow number, give it a String or others
- Use ‘OR 1=1’, get all records in query function
Select * from A where A.a = ‘testdata’ OR ‘1’=’1’; |
- 3. In login function, give user name field like ‘username’--’, “--’ and A.password = ‘’” is commented
Select * from user A where A.username = ‘username’--’ and A.password = ‘’; |
- 4. Adding records function, if there is 4 fields in this table, add 5 fields, eg.
Normal: Insert into table A values(‘’,’’,’’,’’); Test Data: Insert into table A values(‘’,’testdata’,’’,’’,’’); |
- 5. Input test data in or out of this field data
- 6. Add single quotation marks and semicolon, and break off string splicing, this is similar with point 4
Update table A set A.a = ‘testdata’;--’ |
Yellow partis test data we input
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 【自荐】一款简洁、开源的在线白板工具 Drawnix
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
· Docker 太简单,K8s 太复杂?w7panel 让容器管理更轻松!