渗透测试岗位职能分析?
0x00目标
0x01开始工作
智**招聘搜索关键字:测试渗透地址:
HTTP://sou.zhaop**.com/jobs/searchresult.ashx JL =%E8%BE%93%E5%85%A5%E9%80%89%E6%8B%A9%E5%9F%8E %E5%B8%82千瓦=%E6%B8%97%E9%80%8F%E6%B5%8B%E8%AF%95&SM = 0&p = 1
发现点击p
参数控制页码,一共14页。
可以使用队列,制造这些数据摆进去:
def create():
queue = Queue()
对于我在范围(1,15):
queue.put( '''的http://sou.zhaop**.com/jobs/searchresult.ashx JL = \
%E8%BE%93%E5%85%A5%E9%80%89%E6%8B%A9%E5%9F%8E%E5%B8%82千瓦=%E6%B8%97%E9%80%8F% E6%B5%8B%E8%AF%95&SM = 0&p = '''+ STR(i))的
接着,使用gevent,多线程的去把队列数据放入蜘蛛,让蜘蛛取出url地址进行爬取和采集。
gevent部分:
def main():
queue = create()
gevent_pool = []
thread_count = 5
对于我在范围(thread_count):
gevent_pool.append(gevent.spawn(蜘蛛,队列))
gevent.joinall(gevent_pool)
蜘蛛部分:
def蜘蛛(队列):
而不是queue.empty():
url = queue.get_nowait()
尝试:
r = requests.get(url)
soup = bs(r.content.replace('<b>','')。replace('</ b>',''),'lxml')
jobs = soup.find_all(name ='td',attrs = {'class':'zwmc'})
#job.div.a.string
companys = soup.find_all(name ='td',attrs = {'class':'gsmc'})
#company.a.string
wages = soup.find_all(name ='td',attrs = {'class':'zwyx'})
#wages.string
locations = soup.find_all(name ='td',attrs = {'class':'gzdd'})
#location.string
工作,公司,工资,邮政地址(工作,公司,工资,地点):
#print job.div.a.string,company.a.string,working.string,location.string
j = job.div.a.string
c = company.a.string
w =工资
l = location.string
job_detail_url = job.div.a ['href']
job_detail_req = requests.get(job_detail_url)
contents = re.findall(r'SWSStringCutStart - >(。*?)<! - SWSStringCutEnd',job_detail_req.content,re.S)
内容= re.sub(r'<[^>] +>','',contents [0])replace('','')replace('\ r \ n','') '&NBSP;', '')
打印j,c,w,l
print content.decode('utf-8')
sqlin(J,C,W,L,内容)
除异常外,e:
打印e
通过
值得注意的是:
content = re.sub(r'<[^>] +>','',contents [0])
0×02获取数据
一共采集到795条信息,并存放入的MySQL数据库
0×03分析
本来想用python的生成词云,但是网上有现成的工具,而且效果很不错。
地址:HTTPS://timdream.org/wordcloud/
最终生成的关于就职地址的词云为:
可以明显的看到,北上广,杭州,深圳,南京等这些地区对岗位需求较高。
最终生成的关于岗能的词云为:
可以看出,岗位需要的能力主要包括:测试,经验,网络,系统,漏洞
对工程师薪酬进行统计分析:
可以看出,薪酬在6K-9K较多的
在数据库中,统计需要蟒关键字的岗能需求:
一共是198项,占24.9%,其他数据分析的玩法,就靠大家自己去扩展了。