We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
There are no shortcuts to any place worth going.
Django
debug
BeautifulSoup().find_all(href=recompile(正则))
BeautifulSoup
tag
tag.get_text()
tag.string
None
HTML
urllib2.urlopen().read()
find
urllib2.urlopen().read().find(str)
MySQL-Python
Pycharm
Project Interpreter
Python
# 方法一:先找<a>这个tag,找到后在找href,然后匹配 # for each in BeautifulSoup(url_res(vul_public),'html.parser', from_encoding='UTF-8').find_all('a'): # # print each['href'] # # 判断一下是什么类型 unicode# # print type(each['href']) # # /bugs/wooyun-2016-0176846 正则匹配 # # 会有2个网址匹配出来,带个#就只能匹配出一个了 # url_re = re.compile(r'/bugs/.*\d{6}#') # # 返回的是一个列表,没匹配到返回空列表 # each_url = url_re.findall(each['href']) # if each_url != []: # # 每个列表只有一个元素 # # vul_list.append(each_url[0]) # print each_url[0] # # 寻找忽略漏洞 # if get_vul(each_url[0]) > 0: # vul_detail(each_url[0]) # else: # print "Didn't find." # else: # pass # 方法二:更加简单,直接匹配了再找 for each in BeautifulSoup(url_res(vul_public), 'html.parser', from_encoding='UTF-8').find_all(href=re.compile(r'/bugs/.*\d{6}#')): print each['href'] if get_vul(each['href']) > 0: vul_detail(each['href']) else: print "Didn't find."</pre>
The text was updated successfully, but these errors were encountered:
No branches or pull requests
0x01 Wooyun
Django
启用了debug
模式导致敏感信息泄漏0x02 知道创宇爬虫题
BeautifulSoup().find_all(href=recompile(正则))
找到的是一个符合正则的列表BeautifulSoup
模块获取指定tag
内容的方法tag.get_text()
可以获取tag包含的内容,比tag.string
更优秀tag.string
只能获取tag
有且仅有一个子节点,多个子节点,就无法获取了,返回None
HTML
返回源码是否存在某个字符串urllib2.urlopen().read()
中是否包含某个字符串,可以用find
方法urllib2.urlopen().read().find(str)
存在返回位置,不存在返回 -1BeautifulSoup
模块不知道是否有,用find
方法寻找时会因为网页编码问题报错MySQL-Python
安装,Pycharm
中Project Interpreter
无法安装,因为如果你安装的是64位的Python
,这里提供的只有32位的,所以需要自己去寻找64位的MySQL-Python
0x03 一天总结
urllib2.urlopen().read()
中是否包含某个字符串,可以用find
方法BeautifulSoup().find_all(href=recompile(正则))
找到的是一个符合正则的列表The text was updated successfully, but these errors were encountered: