申请会员ID:Lcys
1、申 请 I D:Lcys2、个人邮箱:root@phpinfo.me
文章标题:python调用必应进行同ip网站查询
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Author: Lcy
# @Date: 2015-07-22 10:41:17
# @Last Modified by: Lcy
# @Last Modified time: 2015-07-22 10:49:44
import urllib2
import re
import sys
import socket
def curl(ip,first):
#设置ip代{过}{滤}理,
proxy_handler = urllib2.ProxyHandler({"http" : 'http://115.47.46.152:1080'})
null_proxy_handler = urllib2.ProxyHandler({})
opener = urllib2.build_opener(proxy_handler)
urllib2.install_opener(opener)
uri = "http://www.bing.com/search?q=ip%3A" + ip +"&go=%E6%8F%90%E4%BA%A4&qs=n&first="+ str(first) +"&form=QBRE&pq=ip%3A" + ip +"&sc=0-0&sp=-1&sk=&cvid=5e52385772e24683a0bdf047de60abfc"
request = urllib2.Request(uri)
request.add_header('User-Agent', 'BaiduSpider')
response = urllib2.urlopen(request, timeout=10)
res = response.read()
return res
def getIp(domain):
myaddr = socket.getaddrinfo(domain,'http')
return myaddr
def get(ip):
ip = getIp(ip)
print "[+] Query IP:" + ip + "\n"
rev = []
first = 1
while True:
res = curl(ip,first)
first = first + 10
r = re.findall(r'<h2><a href="((http|https):\/\/([\w|\.]+)\/)([\w|\/|&|=|\.|\?]+)?" h="ID=\w+,\w+\.\w+">',res)
for i in r:
print "[+] " + i
rev.append(i)
m = re.search(r'<div class="sw_next">', res)
if not m:
break
result = list(set(rev))
return result
if __name__ == "__main__":
print u"""------------------------------------------------------------------------------
必应旁站查询 qq:1141056911
By Lcy
http://phpinfo.me
------------------------------------------------------------------------------
"""
if len(sys.argv) != 2:
print "Usage: %s ip" % sys.argv
exit()
urllist = get(sys.argv)
result = ""
for i in urllist:
result = result + i + "\r\n"
f = open("Result.txt","w")
f.write(result)
f.close()
print u"\r\n结果已经保存为Result.txt"
抱歉,未能达到申请要求,申请不通过,论坛不接受黑客入侵攻击技术申请,也可以关注论坛官方微信(吾爱破解论坛),等待开放注册通知。 查网站也算黑客嘛,不知道黑客是怎么定义的 Hmily 发表于 2015-8-27 12:09
抱歉,未能达到申请要求,申请不通过,论坛不接受黑客入侵攻击技术申请,也可以关注论坛官方微信(吾爱破解 ...
为何我发了3次申请解封的帖子到现在都没反应啊? 只有大牛看的懂啊 只有大神能看的明白这是什么 1002217709 发表于 2015-8-27 18:40
查网站也算黑客嘛,不知道黑客是怎么定义的
说的不单是这一个,楼主后台发了好几个申请贴,只通过一个,其他相关的没放出来,不要产生异议,我还在帖子里说了是黑客入侵。 完全看不懂什么东西 本站不接受黑客
页:
[1]
2