简单说清楚什么是SQL Injection?

最近看完了《The Pragmatic Programmer: 20th Anniversary Edition, 2nd Edition: Your Journey to Mastery》,在第7章:While You Are Coding的footnotes中,提到了一幅漫画:

这不仅用简单的方式说清楚了什么是SQL Injection,而且这个网站还提供各种编程语言下的SQL Injection示例。

其实如果你熟悉Shell脚本,我也一个更简单的例子来演示injection。虽然不是SQL Injection,而是Shell脚本注入,但意思是一样的。

bash 复制代码
$ ls *.out
a.out

$ cat a.sh
eval "ls -l $*"

$ ./a.sh "*.c;rm *.out"
-rw-r--r-- 1 oracle oinstall 67 Mar  1 05:29 a.c

$ ls *.out
ls: cannot access '*.out': No such file or directory
相关推荐
泷泷_2 天前
SQL注入实战
数据库·sql·sqlserver·sql注入
营赢盈英3 天前
use embeddings stored in vector db to reduce work for LLM generating response
python·langchain·llm·vector·openai·database
Gauss松鼠会4 天前
GaussDB关键技术原理:高性能(二)
数据库·sql·oracle·架构·database·gaussdb
拉达曼迪斯II4 天前
小语言模型SLM 百科全书
3d·stable diffusion·aigc·database·agi·ai-native
Gauss松鼠会4 天前
SiftDB2024 华为-CCF胡杨林基金数据库专项研讨会精彩报告集锦
数据库·sql·mysql·oracle·database·gaussdb
仁者乐于水6 天前
Oracle 字符集 简体中文 转换 UTF8
oracle·database·system·character
许给你的爱7 天前
pg_rewind实现原理简单分析
数据库·postgresql·database
Eiceblue8 天前
Python实现数据库与Excel文件之间的数据导入与导出
数据库·python·sql·excel·database
dingdingfish10 天前
又一个SQL Developer中调试存储过程的例子
oracle·debug·database·sqldeveloper·procedure
chat2tomorrow11 天前
如何在 MySQL 中创建和使用事务?
数据库·ide·mysql·database·sqlynx