Skip to content

Commit

Permalink
更新0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
sanjinhub committed Apr 12, 2020
1 parent ed6a698 commit 56e174a
Show file tree
Hide file tree
Showing 22 changed files with 2,110 additions and 137 deletions.
34 changes: 0 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -223,40 +223,6 @@ URL(Get): http://localhost:9001/api/v1/get/fish_info?key=585e2ba265d965b1929148d

```
URL(Get): http://localhost:9001/api/v1/get/passwd_list?key=585e2ba265d965b1929148d0f0e33133
返回数据格式:
{
code: 200,
data: [
{
agent: "本机",
city: "",
country: "本机地址",
create_time: "2019-08-26 21:29:00",
id: 224,
info: "127.0.0.1:51548 已经连接&&stats&&&&set foo 0 6",
ip: "127.0.0.1",
project_name: "MemCache蜜罐",
region: "本机地址",
type: "MEMCACHE"
},
],
msg: "success"
}
字段说明:
agent : 集群名称
country : 国家
region : 省份/地区
city : 城市
ip : IP 地址
project_name : 项目名称
type : 蜜罐类型
info : 上钩信息
id : 数据库唯一标识
create_time : 上钩时间
```


Expand Down
20 changes: 14 additions & 6 deletions admin/colony.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ <h4 class="page-title">分布式集群</h4>
<thead>
<tr>
<th width="10%">集群名称</th>
<th width="10%">集群 IP</th>
<th width="8%">集群 IP</th>
<th width="6%" style="text-align: center;">插件</th>
<th width="6%" style="text-align: center;">WEB</th>
<th width="6%" style="text-align: center;">暗网</th>
Expand All @@ -76,12 +76,13 @@ <h4 class="page-title">分布式集群</h4>
<th width="6%" style="text-align: center;">TFTP</th>
<th width="6%" style="text-align: center;">VNC</th>
<th width="6%" style="text-align: center;">ES</th>
<th width="6%" style="text-align: center;">CUSTOM</th>
<th width="1%"></th>
</tr>
</thead>
<tbody id="tableList">
<tr style="text-align: center;">
<td style="line-height: 200px;font-size: 20px;color: #a9a9a9;" colspan="15">暂无数据</td>
<td style="line-height: 200px;font-size: 20px;color: #a9a9a9;" colspan="16">暂无数据</td>
</tr>
</tbody>
</table>
Expand Down Expand Up @@ -132,8 +133,8 @@ <h4 class="page-title">分布式集群</h4>
var curr_time = Math.round(new Date() / 1000);

if ((curr_time - parseInt(db_time)) < 60) {
_h += ' <td class="td agent_name"><span class="openx"></span>' + data[i].agent_name + '</td>';
_h += ' <td class="td"><span>' + data[i].agent_ip + '</span></td>';
_h += ' <td class="td agent_name"><span class="openx"></span>' + filterXSS(data[i].agent_name) + '</td>';
_h += ' <td class="td"><span>' + filterXSS(data[i].agent_ip) + '</span></td>';

if (data[i].plug_status == 1) {
_h += ' <td class="td" style="text-align: center;"><span class="openx"></span></td>';
Expand Down Expand Up @@ -213,6 +214,12 @@ <h4 class="page-title">分布式集群</h4>
_h += ' <td class="td" style="text-align: center;"><span class="closex"></span></td>';
}

if (data[i].custom_status == 1) {
_h += ' <td class="td" style="text-align: center;"><span class="openx"></span></td>';
} else {
_h += ' <td class="td" style="text-align: center;"><span class="closex"></span></td>';
}


// if (data[i].http_status == "1") {
// _h += ' <td class="td" style="text-align: center;"><span class="openx"></span></td>';
Expand All @@ -224,8 +231,9 @@ <h4 class="page-title">分布式集群</h4>
_h += ' <i class="fa fa-trash-o" onclick="del(' + data[i].id + ')"></i>';
_h += ' </td>';
} else {
_h += ' <td class="td agent_name"><span class="closex"></span>' + data[i].agent_name + '</td>';
_h += ' <td class="td"><span>' + data[i].agent_ip + '</span></td>';
_h += ' <td class="td agent_name"><span class="closex"></span>' + filterXSS(data[i].agent_name) + '</td>';
_h += ' <td class="td"><span>' + filterXSS(data[i].agent_ip) + '</span></td>';
_h += ' <td class="td" style="text-align: center;"><span class="closex"></span></td>';
_h += ' <td class="td" style="text-align: center;"><span class="closex"></span></td>';
_h += ' <td class="td" style="text-align: center;"><span class="closex"></span></td>';
_h += ' <td class="td" style="text-align: center;"><span class="closex"></span></td>';
Expand Down
152 changes: 105 additions & 47 deletions admin/dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@
.lb_http {
color: #56a996;
}

.lb_custom {
color: #8c600e;
}
</style>
<div class="row">
<div class="col-sm-12">
Expand Down Expand Up @@ -154,54 +158,62 @@ <h2 class="m-b-10"><span data-plugin="counterup">{{.telnetSum}}</span></h2>
</div>
</div>

<div class="col-xs-12 col-md-6 col-lg-6 col-xl-2">
<div class="col-xs-12 col-md-6 col-lg-6 col-xl-3">
<div class="card-box tilebox-two">
<i class="icon-fire pull-xs-right text-muted"></i>
<h6 class="lb_web text-uppercase m-b-15 m-t-10">WEB</h6>
<h2 class="m-b-10"><span data-plugin="counterup">{{.webSum}}</span></h2>
</div>
</div>

<div class="col-xs-12 col-md-6 col-lg-6 col-xl-2">
<div class="col-xs-12 col-md-6 col-lg-6 col-xl-3">
<div class="card-box tilebox-two">
<i class="icon-globe pull-xs-right text-muted"></i>
<h6 class="lb_deep text-uppercase m-b-15 m-t-10">DEEP</h6>
<h2 class="m-b-10"><span data-plugin="counterup">{{.deepSum}}</span></h2>
</div>
</div>

<div class="col-xs-12 col-md-6 col-lg-6 col-xl-2">
<div class="col-xs-12 col-md-6 col-lg-6 col-xl-3">
<div class="card-box tilebox-two">
<i class="icon-plane pull-xs-right text-muted"></i>
<h6 class="lb_http text-uppercase m-b-15 m-t-10">HTTP代理</h6>
<h2 class="m-b-10"><span data-plugin="counterup">{{.httpSum}}</span></h2>
</div>
</div>

<div class="col-xs-12 col-md-6 col-lg-6 col-xl-2">
<div class="col-xs-12 col-md-6 col-lg-6 col-xl-3">
<div class="card-box tilebox-two">
<i class="icon-cursor pull-xs-right text-muted"></i>
<h6 class="lb_tftp text-uppercase m-b-15 m-t-10">TFTP</h6>
<h2 class="m-b-10"><span data-plugin="counterup">{{.tftpSum}}</span></h2>
</div>
</div>

<div class="col-xs-12 col-md-6 col-lg-6 col-xl-2">
<div class="col-xs-12 col-md-6 col-lg-6 col-xl-4">
<div class="card-box tilebox-two">
<i class="icon-diamond pull-xs-right text-muted"></i>
<h6 class="lb_es text-uppercase m-b-15 m-t-10">ES</h6>
<h2 class="m-b-10"><span data-plugin="counterup">{{.esSum}}</span></h2>
</div>
</div>

<div class="col-xs-12 col-md-6 col-lg-6 col-xl-2">
<div class="col-xs-12 col-md-6 col-lg-6 col-xl-4">
<div class="card-box tilebox-two">
<i class="icon-target pull-xs-right text-muted"></i>
<h6 class="lb_vnc text-uppercase m-b-15 m-t-10">VNC</h6>
<h6 class="lb_custom text-uppercase m-b-15 m-t-10">VNC</h6>
<h2 class="m-b-10"><span data-plugin="counterup">{{.vncSum}}</span></h2>
</div>
</div>

<div class="col-xs-12 col-md-6 col-lg-6 col-xl-4">
<div class="card-box tilebox-two">
<i class="icon-cup pull-xs-right text-muted"></i>
<h6 class="lb_vnc text-uppercase m-b-15 m-t-10">CUSTOM</h6>
<h2 class="m-b-10"><span data-plugin="counterup">{{.customSum}}</span></h2>
</div>
</div>

<div class="col-md-12">
<div class="card-box">
<p class="titlea">最近24小时</p>
Expand Down Expand Up @@ -298,6 +310,12 @@ <h2 class="m-b-10"><span data-plugin="counterup">{{.vncSum}}</span></h2>
<p><span class="closex"></span>VNC</p>
{{end}}

{{if eq .customStatus "1"}}
<p><span class="openx"></span>CUSTOM</p>
{{else}}
<p><span class="closex"></span>CUSTOM</p>
{{end}}

</div>
</div>

Expand Down Expand Up @@ -331,37 +349,37 @@ <h2 class="m-b-10"><span data-plugin="counterup">{{.vncSum}}</span></h2>

</div>
{{/*<div id="myRegInfo" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">*/}}
{{/*<div class="modal-dialog" style="width: 486px;">*/}}
{{/*<div class="modal-content">*/}}
{{/*<div class="modal-header">*/}}
{{/*<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>*/}}
{{/*<h6 class="modal-title" id="myModalLabel">请填写 - 收集需求为了更好的 HFish</h6>*/}}
{{/*</div>*/}}
{{/*<div class="modal-body">*/}}
{{/*<div class="form-horizontal">*/}}

{{/*<div class="form-group form-x">*/}}
{{/*<label for="inputPassword3" class="col-sm-2 control-label"><span*/}}
{{/*class="xing">*</span>使用者</label>*/}}
{{/*<div class="col-sm-10">*/}}
{{/*<input type="text" class="form-control" id="reg_use" placeholder="请输入企业名或个人网名(真名)">*/}}
{{/*</div>*/}}
{{/*</div>*/}}

{{/*<div class="form-group form-x">*/}}
{{/*<label for="reg_mail" class="col-sm-2 control-label"><span class="xing">*</span>邮箱</label>*/}}
{{/*<div class="col-sm-10">*/}}
{{/*<input type="email" class="form-control" id="reg_mail" placeholder="请输入公司或个人邮箱">*/}}
{{/*</div>*/}}
{{/*</div>*/}}
{{/*</div>*/}}
{{/*<div style="clear: both"></div>*/}}
{{/*</div>*/}}
{{/*<div class="modal-footer">*/}}
{{/*<button type="button" class="btn btn-primary">提交信息</button>*/}}
{{/*</div>*/}}
{{/*</div>*/}}
{{/*</div>*/}}
{{/*<div class="modal-dialog" style="width: 486px;">*/}}
{{/*<div class="modal-content">*/}}
{{/*<div class="modal-header">*/}}
{{/*<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>*/}}
{{/*<h6 class="modal-title" id="myModalLabel">请填写 - 收集需求为了更好的 HFish</h6>*/}}
{{/*</div>*/}}
{{/*<div class="modal-body">*/}}
{{/*<div class="form-horizontal">*/}}

{{/*<div class="form-group form-x">*/}}
{{/*<label for="inputPassword3" class="col-sm-2 control-label"><span*/}}
{{/*class="xing">*</span>使用者</label>*/}}
{{/*<div class="col-sm-10">*/}}
{{/*<input type="text" class="form-control" id="reg_use" placeholder="请输入企业名或个人网名(真名)">*/}}
{{/*</div>*/}}
{{/*</div>*/}}

{{/*<div class="form-group form-x">*/}}
{{/*<label for="reg_mail" class="col-sm-2 control-label"><span class="xing">*</span>邮箱</label>*/}}
{{/*<div class="col-sm-10">*/}}
{{/*<input type="email" class="form-control" id="reg_mail" placeholder="请输入公司或个人邮箱">*/}}
{{/*</div>*/}}
{{/*</div>*/}}
{{/*</div>*/}}
{{/*<div style="clear: both"></div>*/}}
{{/*</div>*/}}
{{/*<div class="modal-footer">*/}}
{{/*<button type="button" class="btn btn-primary">提交信息</button>*/}}
{{/*</div>*/}}
{{/*</div>*/}}
{{/*</div>*/}}
{{/*</div>*/}}
{{template "footer" }}
<script type="text/javascript" src="/static/data/js/echarts-3.8.5.min.js"></script>
Expand Down Expand Up @@ -711,6 +729,33 @@ <h2 class="m-b-10"><span data-plugin="counterup">{{.vncSum}}</span></h2>
0
];

var customData = [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
];

var myChart = echarts.init(document.getElementById('myChart'));

$.ajax({
Expand Down Expand Up @@ -761,24 +806,30 @@ <h2 class="m-b-10"><span data-plugin="counterup">{{.vncSum}}</span></h2>
memCacheData[index] = parseInt(d.memCache[item]);
}

for (var item in d.memCache) {
for (var item in d.httpMap) {
var index = xdata.indexOf(item);
httpData[index] = parseInt(d.memCache[item]);
httpData[index] = parseInt(d.httpMap[item]);
}

for (var item in d.memCache) {
for (var item in d.vncMap) {
var index = xdata.indexOf(item);
vncData[index] = parseInt(d.memCache[item]);
vncData[index] = parseInt(d.vncMap[item]);
}

for (var item in d.memCache) {
for (var item in d.tftpMap) {
var index = xdata.indexOf(item);
tftpData[index] = parseInt(d.memCache[item]);
tftpData[index] = parseInt(d.tftpMap[item]);
}

for (var item in d.memCache) {
for (var item in d.esMap) {
var index = xdata.indexOf(item);
esData[index] = parseInt(d.esMap[item]);
}


for (var item in d.customMap) {
var index = xdata.indexOf(item);
esData[index] = parseInt(d.memCache[item]);
customData[index] = parseInt(d.customMap[item]);
}


Expand All @@ -793,7 +844,7 @@ <h2 class="m-b-10"><span data-plugin="counterup">{{.vncSum}}</span></h2>
}
},
legend: {
data: ['WEB', 'DEEP', 'SSH', 'REDIS', 'MYSQL', 'TELNET', 'FTP', 'MEMCACHE', 'HTTP', 'TFTP', 'VNC', 'ES']
data: ['WEB', 'DEEP', 'SSH', 'REDIS', 'MYSQL', 'TELNET', 'FTP', 'MEMCACHE', 'HTTP', 'TFTP', 'VNC', 'ES', 'CUSTOM']
},
grid: {
left: '0%',
Expand Down Expand Up @@ -897,6 +948,13 @@ <h2 class="m-b-10"><span data-plugin="counterup">{{.vncSum}}</span></h2>
stack: '总',
areaStyle: {normal: {}},
data: esData
},
{
name: 'CUSTOM',
type: 'line',
stack: '总',
areaStyle: {normal: {}},
data: customData
}
]
};
Expand Down
17 changes: 9 additions & 8 deletions admin/data.html
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ <h3>HFish 全球态势感知</h3>
<script type="text/javascript" src="/static/data/js/jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="/static/data/js/echarts-3.8.5.min.js"></script>
<script type="text/javascript" src="/static/data/js/echarts-wordcloud.min.js"></script>
<script type="text/javascript" src="/static/js/xss.min.js"></script>
<script type="text/javascript">

window.onresize = function () {
Expand Down Expand Up @@ -479,10 +480,10 @@ <h3>HFish 全球态势感知</h3>
var result = d.result;
for (var i = 0; i < result.length; i++) {
_h += ' <tr class="data_list">';
_h += ' <td>' + result[i].type + '</td>';
_h += ' <td>' + result[i].agent + '</td>';
_h += ' <td>' + result[i].ip + '</td>';
_h += ' <td>' + result[i].country + ' ' + result[i].region + '</td>';
_h += ' <td>' + filterXSS(result[i].type) + '</td>';
_h += ' <td>' + filterXSS(result[i].agent) + '</td>';
_h += ' <td>' + filterXSS(result[i].ip) + '</td>';
_h += ' <td>' + filterXSS(result[i].country) + ' ' + filterXSS(result[i].region) + '</td>';
_h += ' </tr>';
}

Expand Down Expand Up @@ -513,10 +514,10 @@ <h3>HFish 全球态势感知</h3>
var _h = '';

_h += ' <tr class="data_list">';
_h += ' <td>' + d.type + '</td>';
_h += ' <td>' + d.agent + '</td>';
_h += ' <td>' + d.ipx + '</td>';
_h += ' <td>' + d.country + ' ' + d.region + '</td>';
_h += ' <td>' + filterXSS(d.type) + '</td>';
_h += ' <td>' + filterXSS(d.agent) + '</td>';
_h += ' <td>' + filterXSS(d.ipx) + '</td>';
_h += ' <td>' + filterXSS(d.country) + ' ' + filterXSS(d.region) + '</td>';
_h += ' </tr>';

$(".data_list").before(_h);
Expand Down
Loading

0 comments on commit 56e174a

Please sign in to comment.