在线子域名爆破

 <?php

 function domainfuzz($domain) {
$ip = gethostbyname($domain);
preg_match("/\d+\.\d+\.\d+\.\d+/",$ip,$arr);
return $arr;
} function main() {
if(isset($_GET['q'])) {
$return = array();
$domain = trim($_GET["domain"]);
//前缀字典
$q = trim($_GET["q"]);
preg_match("/(\w+\.\w+)$/",$domain,$arr);
$fuzz = $q.'.'.$arr[1];
$result = domainfuzz($fuzz);
$return["domain"] = $fuzz;
if(empty($result)) {
$return["status"] = 500;
$return["ip"] = null;
} else {
$return["status"] = 200;
$return["ip"] = $result[0];
}
echo json_encode($return);
}
} main();
if(!isset($_GET['q'])) {
?>
<!DOCTYPE html>
<html>
<head>
<title>在线子域名爆破|Domain fuzz</title>
<meta charset="utf-8">
<meta >
<link rel="stylesheet" href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css">
<link rel="stylesheet" href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">
<script src="//cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>
<script src="//cdn.bootcss.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<style type="text/css" media="screen">
</style>
</head>
<body>
域名:<input type="text" id="domain">
<button>开始</button>
<div id="fuzz"></div>
<div id="info"></div>
</body>
<script>
//字典自己添加
var dist = ["www","mail","ftp","smtp","kaoshi"];
var num = 0;
var domain = "";
$("button").click(function() {
num = 0;
domain = $("#domain").val();
query();
});
function query() { $.get("","domain="+domain+"&q="+dist[num],function(res){
$("#fuzz").html(res.domain);
if(res.status == 200) {
$("#info").append("爆破成功:"+ res.domain + "-" + res.ip+ "<br>");
} },"json");
num++;
if(num<3000) {
query();
}
}
//alert(dist.length);
</script>
</html> <?php }
?>

在线C段查询小工具

 <?php

 function getIp($url) {
$data = file_get_contents("http://www.ip138.com/ips138.asp?ip={$url}&action=2");
preg_match("/(\d+\.\d+\.\d+\.\d+)<\/font>/", $data, $arr);
if(!empty($arr[1])) {
return $arr[1];
}
return $url;
} function getBing($ip) {
$ctx = stream_context_create(array(
'http' => array(
'timeout' => 30,
//'proxy' => 'tcp://113.47.46.152:1080',
'request_fulluri' => True,
'header'=> "User-Agent: BaiduSpider\r\nAccept-Language: zh-CN,zh;q=0.8,en-US;q=0.5,en;q=0.3",
)
)
);
$first = 1;
$res = array();
while(true) {
$url = "http://www.bing.com/search?q=ip%3A{$ip}&go=%E6%8F%90%E4%BA%A4&qs=n&first={$first}&form=QBRE&pq=ip%3A{$ip}&sc=0-0&sp=-1&sk=&cvid=5e52385772e24683a0bdf047de60abfc";
$first = $first + 10;
$result = file_get_contents($url, False, $ctx);
preg_match_all('/<h2><a href="((http|https):\/\/([\w|\.]+)\/)([\w|\/|&|=|\.|\?]+)?" h="ID=\w+,\w+\.\w+">/',$result,$arr);
if(!empty($arr[1])) {
foreach($arr[1] as $v) {
array_push($res, $v);
}
}
if(!preg_match('/<div class="sw_next">/', $result)) {
break;
} }
return array_unique($res);
} //getBing("58.96.186.133"); function main() {
if(isset($_POST["action"])) {
$action = trim($_POST["action"]);
if($action == "getip") {
$domain = trim($_POST["domain"]);
$ip = getIp($domain);
echo $ip;
}
if($action == "query") {
$ip = trim($_POST["ip"]);
$res = getBing($ip);
echo json_encode($res);
}
}
} main();
if(empty($_POST['action'])) {
?>
<!DOCTYPE html>
<html>
<head>
<title>必应接口C段查询|c段查询|旁站查询</title>
<meta charset="utf-8">
<meta >
<link rel="stylesheet" href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css">
<link rel="stylesheet" href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">
<script src="//cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>
<script src="//cdn.bootcss.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<style type="text/css" media="screen">
.main{
width:90%;
//border:1px solid red;
margin-top:20px;
}
.ip{
margin-top:10px;
}
dd{
text-indent:10px;
}
</style>
</head>
<body>
<div class="container">
<div class="main">
<h1>必应接口C段查询 </h1>
<form class="form-inline">
<div class="form-group" style="">
<input type="text" id="domain" class="form-control" placeholder="输入你要查询的ip或域名">
</div>
<button type="submit" class="btn btn-success" id="getip">获取ip</button>
<button type="submit" class="btn btn-info" id="query">查询</button>
</form>
<div class="alert alert-info ip" role="alert" style="display:none">IP:<span id="ip"></span><span id="se"></span></div>
<div class="progress" id="jd" style="display:none">
<div class="progress-bar progress-bar-success progress-bar-striped" role="progressbar" aria-valuenow="40" id="b" aria-valuemin="0" aria-valuemax="100" style="width: 0%">
<span class="sr-only">40% Complete (success)</span>
</div>
</div>
<dl id="result"> </dl>
</div>
</div>
</body>
<script type="text/javascript">
var ipi = 1;
$(function() {
$("#getip").click(function() {
var domain = $("#domain").val();
if(domain == "") {
alert("请输入ip或者域名");
return false;
}
$.post("","action=getip&domain="+domain,function(res) {
var ip = res;
$("#ip").html(ip);
$(".ip").show();
arr = ip.split(".");
start = arr[0] + "." + arr[1] + "." + arr[2] + "." + 1;
end = arr[0] + "." + arr[1] + "." + arr[2] + "." + 255;
$("#se").html(" 查询ip段:" + start + "-" + end)
})
}); $("#query").click(function() {
ipi=1;
$("#b").css("width","0%");
$("#result").html("");
$("#jd").show();
query(); });
}) function query() {
$("#query").click(function() {
return;
});
var html = "";
var b = (ipi/255) * 100;
var ip = $("#ip").html();
if(ip == "") {
alert("骚年请先获取Ip哦");
return;
}
var arr = ip.split(".");
var ips = arr[0] + "." + arr[1] + "." + arr[2] + "." + ipi; $.post("","action=query&ip="+ips,function(res) {
$("#b").css("width",b+"%");
html += "<dt>"+ ips +"</dt>";
for(var i in res) {
html += "<dd><a href=\"" + res[i] + "\" target=\"_blank\">" + res[i]+"</a></dd>"; }
$("#result").append(html);
if(ipi<255) {
ipi++;
query();
}
},"json");
}
</script>
</html> <?php
}
?>

Python调用Bing进行同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')[0][4][0]
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[0]
rev.append(i[0])
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[0]
exit()
urllist = get(sys.argv[1])
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"

子域名爆破&C段查询&调用Bing查询同IP网站的更多相关文章

  1. PJzhang:经典子域名爆破工具subdomainsbrute

    猫宁!!! 参考链接: https://www.waitalone.cn/subdomainsbrute.html https://www.secpulse.com/archives/5900.htm ...

  2. ubuntu进行子域名爆破

    好记性不如烂笔头,此处记录一下,ubuntu进行子域名的爆破. 先记录一个在线的子域名爆破网址,无意中发现,很不错的网址,界面很干净,作者也很用心,很感谢. https://phpinfo.me/do ...

  3. PJzhang:子域名爆破工具wydomain(猪猪侠)

    猫宁!!! 参考链接:https://www.secpulse.com/archives/53182.html https://www.jianshu.com/p/65c85f4b7698 http: ...

  4. 使用python处理子域名爆破工具subdomainsbrute结果txt

    近期学习了一段时间python,结合自己的安全从业经验,越来越感觉到安全测试是一个体力活.如果没有良好的coding能力去自动化的话,无疑会把安全测试效率变得很低. 作为安全测试而言,第一步往往要通过 ...

  5. 子域名爆破工具:OneForALL

    0x00 简介 OneForAll是一款功能强大的子域收集工具 0x01 下载地址 码云: https://gitee.com/shmilylty/OneForAll.git Github: http ...

  6. 无状态子域名爆破工具:ksubdomain

    概述 开源地址:https://github.com/knownsec/ksubdomain 二进制文件下载:https://github.com/knownsec/ksubdomain/releas ...

  7. 子域名查询、DNS记录查询

    目录 子域名信息查询 Layer子域名爆破机 subDomainBrute 利用google查询 HTTP证书查询 DNS记录查询脚本 IP转换为经纬度 利用网页获取对方经纬度信息 首先关于DNS域名 ...

  8. 子域名探测工具Aquatone的使用

    目录 Aquatone Aquatone的安装 Aquatone的使用 子域名爆破 端口扫描

  9. [原创]K8Cscan插件之C段旁站扫描\子域名扫描

    [原创]K8 Cscan 大型内网渗透自定义扫描器 https://www.cnblogs.com/k8gege/p/10519321.html Cscan简介:何为自定义扫描器?其实也是插件化,但C ...

随机推荐

  1. UVa 11636 你好 世界!(贪心)

    https://vjudge.net/problem/UVA-11636 题意: 经过一次复制,一条语句会变成两条语句,再经过一次变成四条语句...求最少需要复制几次能使条数恰好为n? 思路: 贪心水 ...

  2. POJ 1953 World Cup Noise(递推)

    https://vjudge.net/problem/POJ-1953 题意:输入一个n,这n位数只由0和1组成,并且不能两个1相邻.计算共有多少种排列方法. 思路:递推题. 首先a[1]=2,a[2 ...

  3. UVa 10618 跳舞机

    https://vjudge.net/problem/UVA-10618 这道题目题意很复杂,代码也是参考了别人的,因为自己实在是写不出.d[i][a][b][s]表示分析到第i个箭头时,此时左脚处于 ...

  4. Elasticsearch 多字段搜索

    查询很少是对一个字段做 match 查询,通常都是一个 query 查询多个字段,比如一个 doc 有 title.content.pagetag 等文本字段,要在这些字段查询含多个 term 的 q ...

  5. POJ 1509 Glass Beads---最小表示法

    题意: T组数据,每组数据给出一个字符串,求这个字符串的最小表示发(只要求输出起始位置坐标) SAM入门题(检测板子是否正确). 将字符串S加倍丢进SAM中,然后走字符串长度次,每次贪心的沿最小的边走 ...

  6. python tcp

    server import socket host="localhost" port= s=socket.socket(socket.AF_INET,socket.SOCK_STR ...

  7. MongoDB(课时29 MapReduce)

    3.7.4 MapReduce MapReduce 是整个大数据的精髓所在(实际中别用,因为在MongoDB中属于最底层操作). MapReduce是一种计算模型,简单的说就是将大批量的工作分解执行, ...

  8. LeetCode--112--路径总和

    问题描述: 给定一个二叉树和一个目标和,判断该树中是否存在根节点到叶子节点的路径,这条路径上所有节点值相加等于目标和. 说明: 叶子节点是指没有子节点的节点. 示例:  给定如下二叉树,以及目标和 s ...

  9. LeetCode--021--合并两个有序链表

    问题描述: 将两个有序链表合并为一个新的有序链表并返回.新链表是通过拼接给定的两个链表的所有节点组成的. 示例: 输入:1->2->4, 1->3->4 输出:1->1- ...

  10. codeforces 547c// Mike and Foam// Codeforces Round #305(Div. 1)

    题意:给出数组arr和一个空数组dst.从arr中取出一个元素到dst为一次操作.问每次操作后dst数组中gcd等于1的组合数.由于数据都小于10^6,先将10^6以下的数分解质因数.具体来说从2开始 ...