20250321
@ -1,4 +1,4 @@
|
||||
cookie: vindex==9e=04=0AB00=0R;supportLang=cn%2Cen;lang=cn;sessionid=200002084bb575d0bfb196c95e46a064f7ba;loginid=4c04949a8bccd6e64f28cdd1606134a0;200002084bb575d0bfb196c95e46a064f7ba=true;abcd1234=true;login=false;
|
||||
cookie: vindex==9e=0c=0AB00=0R;supportLang=cn%2Cen;lang=cn;sessionid=2000023bc98ca1ded042e15316d623cda711;loginid=5ed31f7903992f1817dbfae4a8b4a2b2;2000023bc98ca1ded042e15316d623cda711=true;abcd1234=true;login=false;
|
||||
dtcloud_cookie: Hm_lvt_d980fb2543f406139975c7a72a5a0387=1740971050,1740974075,1741246647; ea6ee7ef65afa3fa0312817d0b12190e=787b65e4f93b05a0765ee0e7a6e2d24c; CECLOUD_OPS_SID=Tm1Sa01tUTRaakF0WW1FeE1DMDBNelUwTFdJMFl6QXROR1ppWWpWallqVXdNMlZsfGRYTmxjaTVvYkhjdVpIUmpiRzkxWkM1amIyMD0=; CECLOUD_OPS_CID=TmpObVpEbG1ORGd0WmpjNU1DMDBObUZtTFdKbVptWXRZVEJpWkRNd1pERTFOakk1fGRYTmxjaTVvYkhjdVpIUmpiRzkxWkM1amIyMD0=
|
||||
mysql:
|
||||
password: sLy1ZxZBEroGcoSv75P/xigUJ59/Yhsz1Z7896WzArcImdobrwg5+N6QEo4yT6CcpW22Y6bYy6a0ZWYAEzDaKZhOQG0odaUAv/SDP7JM7l7hH987XFJkUauaETu97Ev0kObsbS4laEiEg/+VG8fQrPuD2iRax1IWGXTKOtn+gHlyzSp016OhKOUUKKdW16OaC8AbVX9F3tVp10c2hsQNvLJl27MN5m3jXpoq9CTdcXsk15oHZVuIp3Kj9RWa8azpauiCPEKVE1KPvuJAhPYYakZBAdxGNU7Ye/YPZq68PJZHm6otEsaQxGJB1+DRNYh0oFWN9+aSYph6kAn0p5/c4g==
|
||||
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 37 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 182 KiB After Width: | Height: | Size: 186 KiB |
Before Width: | Height: | Size: 247 KiB After Width: | Height: | Size: 246 KiB |
BIN
img/capt.png
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 6.0 KiB |
BIN
img/hw_baolj.png
Before Width: | Height: | Size: 197 KiB After Width: | Height: | Size: 197 KiB |
Before Width: | Height: | Size: 269 KiB After Width: | Height: | Size: 269 KiB |
Before Width: | Height: | Size: 253 KiB After Width: | Height: | Size: 252 KiB |
Before Width: | Height: | Size: 881 KiB After Width: | Height: | Size: 253 KiB |
Before Width: | Height: | Size: 224 KiB After Width: | Height: | Size: 225 KiB |
Before Width: | Height: | Size: 114 KiB After Width: | Height: | Size: 126 KiB |
Before Width: | Height: | Size: 198 KiB After Width: | Height: | Size: 133 KiB |
Before Width: | Height: | Size: 175 KiB After Width: | Height: | Size: 176 KiB |
Before Width: | Height: | Size: 157 KiB After Width: | Height: | Size: 158 KiB |
Before Width: | Height: | Size: 288 KiB After Width: | Height: | Size: 289 KiB |
BIN
img/hw_fw1.png
Before Width: | Height: | Size: 381 KiB After Width: | Height: | Size: 383 KiB |
BIN
img/hw_tsgz.png
Before Width: | Height: | Size: 213 KiB After Width: | Height: | Size: 228 KiB |
Before Width: | Height: | Size: 194 KiB After Width: | Height: | Size: 192 KiB |
Before Width: | Height: | Size: 259 KiB After Width: | Height: | Size: 260 KiB |
Before Width: | Height: | Size: 253 KiB After Width: | Height: | Size: 251 KiB |
Before Width: | Height: | Size: 258 KiB After Width: | Height: | Size: 259 KiB |
Before Width: | Height: | Size: 227 KiB After Width: | Height: | Size: 227 KiB |
Before Width: | Height: | Size: 114 KiB After Width: | Height: | Size: 114 KiB |
Before Width: | Height: | Size: 242 KiB After Width: | Height: | Size: 243 KiB |
Before Width: | Height: | Size: 690 KiB After Width: | Height: | Size: 175 KiB |
Before Width: | Height: | Size: 291 KiB After Width: | Height: | Size: 290 KiB |
BIN
img/zww_fw1.png
Before Width: | Height: | Size: 183 KiB After Width: | Height: | Size: 390 KiB |
BIN
img/zww_tsgz.png
Before Width: | Height: | Size: 150 KiB After Width: | Height: | Size: 142 KiB |
37
main.go
@ -41,25 +41,25 @@ func main() {
|
||||
if auth.Auth() {
|
||||
//可执行程序位置
|
||||
// 互联网区截图
|
||||
// method.HW_FAC1() //截取流量清洗的图片
|
||||
// method.HW_FW1() //截取防火墙的图片
|
||||
// method.HW_TSGZ() //截取态势感知的图片
|
||||
// method.HW_BAOLJ() //截取堡垒机的图片
|
||||
// method.HW_FAC1() //截取流量清洗的图片
|
||||
// method.HW_FW1() //截取防火墙的图片
|
||||
// method.HW_TSGZ() //截取态势感知的图片
|
||||
// method.HW_BAOLJ() //截取堡垒机的图片
|
||||
// method.HW_DTCLOUD() //截取运维中心的图片
|
||||
// 政务网区截图
|
||||
// method.ZWW_FW1() //截取防火墙的图片
|
||||
// method.ZWW_TSGZ() //截取态势感知的图片
|
||||
// method.ZWWW_BAOLJ() //截取堡垒机的图片
|
||||
// // 政务网区截图
|
||||
// method.ZWW_FW1() //截取防火墙的图片
|
||||
// method.ZWW_TSGZ() //截取态势感知的图片
|
||||
// method.ZWWW_BAOLJ() //截取堡垒机的图片
|
||||
// method.ZWW_DTCLOUD() //截取运维中心的图片
|
||||
// 互联网区运维巡检文档生成
|
||||
// // 互联网区运维巡检文档生成
|
||||
// wps.HW_SYS_Word() //运维平台word文档生成
|
||||
// 政务网区运维巡检文档生成
|
||||
// // 政务网区运维巡检文档生成
|
||||
// wps.ZWW_SYS_Word() //运维平台word文档生成
|
||||
// 安全巡检文档生成
|
||||
// // 安全巡检文档生成
|
||||
// wps.SAFET_Word() //安全巡检文档生成
|
||||
//互联网防火墙ips事件获取 安全事件表格生成
|
||||
// //互联网防火墙ips事件获取 安全事件表格生成
|
||||
// attackevent.Fw_event(attackevent.HW_fw1_cookie(), "2025-03-20") //将防火墙安全事件存放到xlsx文件中
|
||||
//政务网防火墙ips事件获取 安全事件表格生成
|
||||
// //政务网防火墙ips事件获取 安全事件表格生成
|
||||
// attackevent.Zww_event(attackevent.HW_zww1_cookie(), "2025-03-20") //将防火墙安全事件存放到xlsx文件中
|
||||
//nessus的csv文件生成docx报告
|
||||
// nessus.CSV_damo()
|
||||
@ -74,7 +74,16 @@ func main() {
|
||||
// dtcloud.TenantList() //获取租户列表(完成)
|
||||
//获取docx文档中所有的图片
|
||||
// wps.Weekly_get_img("")
|
||||
// wps.DrawHorizontalBarChart()
|
||||
//生成条形图
|
||||
// wps.DrawHorizontalBarChart([]float64{486, 158, 91, 76, 52}, []string{"11.2.144.8", "11.2.144.18", "11.2.144.129", "11.2.144.139", "11.2.144.121"})
|
||||
//生成环形图
|
||||
// wps.Weekly_chart([]wps.Data{
|
||||
// {Angle: 246, Label: "1、扫描探测:246", Color: "#FF6384"}, // 红色
|
||||
// {Angle: 240, Label: "2、敏感信息泄露:240", Color: "#36A2EB"}, // 蓝色
|
||||
// {Angle: 148, Label: "3、弱密码:148", Color: "#FFCE56"}, // 黄色
|
||||
// {Angle: 66, Label: "4、可疑访问:66", Color: "#4bc0c0"}, // 绿色
|
||||
// {Angle: 61, Label: "5、SQL注入:61", Color: "#c12c1f"}, // 红色
|
||||
// })
|
||||
|
||||
} else {
|
||||
log.Println("没有授权,请联系管理员")
|
||||
|
@ -118,7 +118,29 @@ func Weekly_get_img(file_img_path string) {
|
||||
}
|
||||
|
||||
// 生成环形图表
|
||||
func Weekly_chart() {
|
||||
// 数据示例:每个部分的角度、标签和颜色
|
||||
//
|
||||
// data := []struct {
|
||||
// angle float64
|
||||
// label string
|
||||
// color string
|
||||
// }{
|
||||
//
|
||||
// {275, "1、敏感信息泄露:275", "#FF6384"}, // 红色
|
||||
// {75, "2、代码执行:75", "#36A2EB"}, // 蓝色
|
||||
// {68, "3、命令注入:68", "#FFCE56"}, // 黄色
|
||||
// {47, "4、目录遍历:47", "#4bc0c0"}, // 绿色
|
||||
// {28, "5、安全措施绕过:28", "#c12c1f"}, // 红色
|
||||
// {12, "6、HTTP弱口令尝试:12", "#779649"}, // 绿色
|
||||
// {10, "7、SQL注入:10", "#9BA0C9"}, // 绿色
|
||||
// }
|
||||
type Data struct {
|
||||
Angle float64
|
||||
Label string
|
||||
Color string
|
||||
}
|
||||
|
||||
func Weekly_chart(data []Data) {
|
||||
const (
|
||||
width, height = 900, 700
|
||||
centerX, centerY = width / 2, height / 2
|
||||
@ -131,20 +153,19 @@ func Weekly_chart() {
|
||||
dc.Clear()
|
||||
|
||||
// 数据示例:每个部分的角度、标签和颜色
|
||||
data := []struct {
|
||||
angle float64
|
||||
label string
|
||||
color string
|
||||
}{
|
||||
{275, "1、敏感信息泄露:275", "#FF6384"}, // 红色
|
||||
{75, "2、代码执行:75", "#36A2EB"}, // 蓝色
|
||||
{68, "3、命令注入:68", "#FFCE56"}, // 黄色
|
||||
{47, "4、目录遍历:47", "#4bc0c0"}, // 绿色
|
||||
{28, "5、安全措施绕过:28", "#c12c1f"}, // 红色
|
||||
{12, "6、HTTP弱口令尝试:12", "#779649"}, // 绿色
|
||||
{10, "7、SQL注入:10", "#9BA0C9"}, // 绿色
|
||||
}
|
||||
|
||||
// data := []struct {
|
||||
// angle float64
|
||||
// label string
|
||||
// color string
|
||||
// }{
|
||||
// {275, "1、敏感信息泄露:275", "#FF6384"}, // 红色
|
||||
// {75, "2、代码执行:75", "#36A2EB"}, // 蓝色
|
||||
// {68, "3、命令注入:68", "#FFCE56"}, // 黄色
|
||||
// {47, "4、目录遍历:47", "#4bc0c0"}, // 绿色
|
||||
// {28, "5、安全措施绕过:28", "#c12c1f"}, // 红色
|
||||
// {12, "6、HTTP弱口令尝试:12", "#779649"}, // 绿色
|
||||
// {10, "7、SQL注入:10", "#9BA0C9"}, // 绿色
|
||||
// }
|
||||
// 加载支持中文的字体
|
||||
fontPath := "font/SIMFANG.TTF" // 确保字体文件在当前目录或指定路径下
|
||||
fontSize := 16.0
|
||||
@ -160,8 +181,8 @@ func Weekly_chart() {
|
||||
// 绘制圆环图表
|
||||
startAngle := 0.0
|
||||
for _, d := range data {
|
||||
endAngle := startAngle + d.angle
|
||||
drawDonutSegment(dc, centerX, centerY, radius, startAngle, endAngle, d.color)
|
||||
endAngle := startAngle + d.Angle
|
||||
drawDonutSegment(dc, centerX, centerY, radius, startAngle, endAngle, d.Color)
|
||||
startAngle = endAngle
|
||||
}
|
||||
|
||||
@ -170,9 +191,9 @@ func Weekly_chart() {
|
||||
labelY := float64(centerY - (len(data)*20)/2)
|
||||
for _, d := range data {
|
||||
// 绘制颜色一致的小圆点
|
||||
drawColorDot(dc, labelX, labelY-5, d.color)
|
||||
drawColorDot(dc, labelX, labelY-5, d.Color)
|
||||
// 绘制标签文本
|
||||
dc.DrawString(d.label, labelX+15, labelY)
|
||||
dc.DrawString(d.Label, labelX+15, labelY)
|
||||
labelY += 20
|
||||
}
|
||||
|
||||
@ -199,7 +220,9 @@ func drawColorDot(dc *gg.Context, x, y float64, color string) {
|
||||
}
|
||||
|
||||
// 绘制横向条形图
|
||||
func DrawHorizontalBarChart() {
|
||||
// data := []float64{100, 200, 150, 250, 300}
|
||||
// labels := []string{"11.2.144.18", "11.2.144.139", "11.2.144.156", "11.2.144.127", "11.2.144.129"}
|
||||
func DrawHorizontalBarChart(data []float64, labels []string) {
|
||||
const (
|
||||
width = 800
|
||||
height = 400
|
||||
@ -224,8 +247,8 @@ func DrawHorizontalBarChart() {
|
||||
dc.DrawStringAnchored("被外网攻击IP Top10", float64(width/2), 40, 0.5, 0)
|
||||
|
||||
// 定义数据和标签
|
||||
data := []float64{100, 200, 150, 250, 300}
|
||||
labels := []string{"11.2.144.18", "11.2.144.139", "11.2.144.156", "11.2.144.127", "11.2.144.129"}
|
||||
// data := []float64{100, 200, 150, 250, 300}
|
||||
// labels := []string{"11.2.144.18", "11.2.144.139", "11.2.144.156", "11.2.144.127", "11.2.144.129"}
|
||||
// 创建一个索引数组
|
||||
indices := make([]int, len(data))
|
||||
for i := range indices {
|
||||
|