20250228
@ -141,7 +141,7 @@ func Fw_event(cookieStr string) {
|
|||||||
}
|
}
|
||||||
Con = Con + 1
|
Con = Con + 1
|
||||||
//存储今日攻击事件
|
//存储今日攻击事件
|
||||||
today := conn.DT_POST("https://11.2.68.146/wnm/get.j", header, bytes.NewBufferString(values_1.Encode()))
|
today := conn.DT_POST("https://11.2.68.146/wnm/get.j", header, bytes.NewBufferString(values.Encode()))
|
||||||
num_1, _ := strconv.Atoi(Date_v(today).NTOP.LogPaging[0].TotalCounts)
|
num_1, _ := strconv.Atoi(Date_v(today).NTOP.LogPaging[0].TotalCounts)
|
||||||
if num_1 > 200 {
|
if num_1 > 200 {
|
||||||
a, err := strconv.ParseFloat(Date_v(today).NTOP.LogPaging[0].TotalCounts, 64)
|
a, err := strconv.ParseFloat(Date_v(today).NTOP.LogPaging[0].TotalCounts, 64)
|
||||||
@ -158,7 +158,7 @@ func Fw_event(cookieStr string) {
|
|||||||
today := conn.DT_POST("https://11.2.68.146/wnm/get.j", header, bytes.NewBufferString(values.Encode()))
|
today := conn.DT_POST("https://11.2.68.146/wnm/get.j", header, bytes.NewBufferString(values.Encode()))
|
||||||
log.Println(values_1, i)
|
log.Println(values_1, i)
|
||||||
for v, k := range Date_v(today).NTOP.LogPaging {
|
for v, k := range Date_v(today).NTOP.LogPaging {
|
||||||
sheet.Cell("A" + strconv.Itoa(Con+v)).SetString(strconv.Itoa(Con)) // 第一列 (A1)
|
sheet.Cell("A" + strconv.Itoa(Con+v)).SetString(strconv.Itoa(Con + v)) // 第一列 (A1)
|
||||||
sheet.Cell("B" + strconv.Itoa(Con+v)).SetString(k.OutputJSON.(map[string]interface{})["Time"].(string))
|
sheet.Cell("B" + strconv.Itoa(Con+v)).SetString(k.OutputJSON.(map[string]interface{})["Time"].(string))
|
||||||
sheet.Cell("C" + strconv.Itoa(Con+v)).SetString(k.OutputJSON.(map[string]interface{})["SrcZoneName"].(string))
|
sheet.Cell("C" + strconv.Itoa(Con+v)).SetString(k.OutputJSON.(map[string]interface{})["SrcZoneName"].(string))
|
||||||
sheet.Cell("D" + strconv.Itoa(Con+v)).SetString(k.OutputJSON.(map[string]interface{})["DestZoneName"].(string))
|
sheet.Cell("D" + strconv.Itoa(Con+v)).SetString(k.OutputJSON.(map[string]interface{})["DestZoneName"].(string))
|
||||||
@ -179,7 +179,7 @@ func Fw_event(cookieStr string) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for v, k := range Date_v(today).NTOP.LogPaging {
|
for v, k := range Date_v(today).NTOP.LogPaging {
|
||||||
sheet.Cell("A" + strconv.Itoa(Con+v)).SetString(strconv.Itoa(Con)) // 第一列 (A1)
|
sheet.Cell("A" + strconv.Itoa(Con+v)).SetString(strconv.Itoa(Con + v)) // 第一列 (A1)
|
||||||
sheet.Cell("B" + strconv.Itoa(Con+v)).SetString(k.OutputJSON.(map[string]interface{})["Time"].(string))
|
sheet.Cell("B" + strconv.Itoa(Con+v)).SetString(k.OutputJSON.(map[string]interface{})["Time"].(string))
|
||||||
sheet.Cell("C" + strconv.Itoa(Con+v)).SetString(k.OutputJSON.(map[string]interface{})["SrcZoneName"].(string))
|
sheet.Cell("C" + strconv.Itoa(Con+v)).SetString(k.OutputJSON.(map[string]interface{})["SrcZoneName"].(string))
|
||||||
sheet.Cell("D" + strconv.Itoa(Con+v)).SetString(k.OutputJSON.(map[string]interface{})["DestZoneName"].(string))
|
sheet.Cell("D" + strconv.Itoa(Con+v)).SetString(k.OutputJSON.(map[string]interface{})["DestZoneName"].(string))
|
||||||
@ -205,7 +205,7 @@ func Fw_event(cookieStr string) {
|
|||||||
log.Fatalf("验证文件时出错: %s", err)
|
log.Fatalf("验证文件时出错: %s", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := ss.SaveToFile("防火墙安全事件.xlsx"); err != nil {
|
if err := ss.SaveToFile("防火墙安全事件" + time.Unix(tool.Timestamp("second"), 0).Format("20060102") + ".xlsx"); err != nil {
|
||||||
log.Fatalf("保存文件时出错: %s", err)
|
log.Fatalf("保存文件时出错: %s", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
##临时数据存放点
|
##临时数据存放点
|
||||||
cookie:
|
cookie: vindex==3b=16=0AB00=0R;supportLang=cn%2Cen;lang=cn;sessionid=200001a48a30c1c8fefb3ce8eb2389ac07ad;loginid=31f13e42f943b38bf2cd3c8fd04983f1;200001a48a30c1c8fefb3ce8eb2389ac07ad=true;abcd1234=
|
||||||
mysql:
|
mysql:
|
||||||
url: 127.0.0.1
|
url: 127.0.0.1
|
||||||
port: 3306
|
port: 3306
|
||||||
|
Before Width: | Height: | Size: 178 KiB After Width: | Height: | Size: 178 KiB |
Before Width: | Height: | Size: 242 KiB After Width: | Height: | Size: 243 KiB |
BIN
img/capt.png
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 7.2 KiB |
BIN
img/hw_baolj.png
Before Width: | Height: | Size: 185 KiB After Width: | Height: | Size: 196 KiB |
Before Width: | Height: | Size: 269 KiB After Width: | Height: | Size: 269 KiB |
Before Width: | Height: | Size: 254 KiB After Width: | Height: | Size: 256 KiB |
Before Width: | Height: | Size: 260 KiB After Width: | Height: | Size: 259 KiB |
Before Width: | Height: | Size: 224 KiB After Width: | Height: | Size: 224 KiB |
Before Width: | Height: | Size: 355 KiB After Width: | Height: | Size: 107 KiB |
Before Width: | Height: | Size: 174 KiB After Width: | Height: | Size: 175 KiB |
Before Width: | Height: | Size: 289 KiB After Width: | Height: | Size: 292 KiB |
BIN
img/hw_fw1.png
Before Width: | Height: | Size: 380 KiB After Width: | Height: | Size: 376 KiB |
BIN
img/hw_tsgz.png
Before Width: | Height: | Size: 303 KiB After Width: | Height: | Size: 238 KiB |
Before Width: | Height: | Size: 186 KiB After Width: | Height: | Size: 188 KiB |
Before Width: | Height: | Size: 259 KiB After Width: | Height: | Size: 258 KiB |
Before Width: | Height: | Size: 254 KiB After Width: | Height: | Size: 254 KiB |
Before Width: | Height: | Size: 255 KiB After Width: | Height: | Size: 256 KiB |
Before Width: | Height: | Size: 228 KiB After Width: | Height: | Size: 227 KiB |
Before Width: | Height: | Size: 114 KiB After Width: | Height: | Size: 114 KiB |
Before Width: | Height: | Size: 189 KiB After Width: | Height: | Size: 107 KiB |
Before Width: | Height: | Size: 174 KiB After Width: | Height: | Size: 174 KiB |
Before Width: | Height: | Size: 288 KiB After Width: | Height: | Size: 288 KiB |
BIN
img/zww_fw1.png
Before Width: | Height: | Size: 181 KiB After Width: | Height: | Size: 185 KiB |
BIN
img/zww_tsgz.png
Before Width: | Height: | Size: 253 KiB After Width: | Height: | Size: 210 KiB |
15
main.go
@ -1,8 +1,8 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"dt_automate/attackevent"
|
|
||||||
"dt_automate/tool"
|
"dt_automate/tool"
|
||||||
|
"dt_automate/wps"
|
||||||
"flag"
|
"flag"
|
||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
"log"
|
||||||
@ -73,19 +73,18 @@ func main() {
|
|||||||
// method.HW_DTCLOUD() //截取运维中心的图片
|
// method.HW_DTCLOUD() //截取运维中心的图片
|
||||||
// method.HW_BAOLJ() //截取堡垒机的图片
|
// method.HW_BAOLJ() //截取堡垒机的图片
|
||||||
//运维巡检文档生成
|
//运维巡检文档生成
|
||||||
// wps.HW_SYS_Word() //运维平台word文档生成
|
wps.HW_SYS_Word() //运维平台word文档生成
|
||||||
// //政务网区截图
|
// //政务网区截图
|
||||||
// method.ZWW_FW1() //截取防火墙的图片
|
// method.ZWW_FW1() //截取防火墙的图片
|
||||||
// method.ZWW_TSGZ() //截取态势感知的图片
|
// method.ZWW_TSGZ() //截取态势感知的图片
|
||||||
// method.ZWW_DTCLOUD() //截取运维中心的图片
|
// method.ZWW_DTCLOUD() //截取运维中心的图片
|
||||||
// method.ZWWW_BAOLJ() //截取堡垒机的图片
|
// method.ZWWW_BAOLJ() //截取堡垒机的图片
|
||||||
//运维巡检文档生成
|
//运维巡检文档生成
|
||||||
// wps.ZWW_SYS_Word() //运维平台word文档生成
|
wps.ZWW_SYS_Word() //运维平台word文档生成
|
||||||
//安全巡检文档生成
|
//安全巡检文档生成
|
||||||
// wps.SAFET_Word() //安全巡检文档生成
|
wps.SAFET_Word() //安全巡检文档生成
|
||||||
//安全事件表格生成(需要先执行互联网区防火墙截图)
|
//安全事件表格生成(需要先执行互联网区防火墙截图)
|
||||||
attackevent.Fw_event("vindex==3a=18=0AB00=0R; supportLang=cn%2Cen; lang=cn; sessionid=200001b7412db35d796213e8e98a20f69ccd; loginid=6c0a82d050f61bf767ea5b5398eb6d17; 200001b7412db35d796213e8e98a20f69ccd=true; abcd1234=true; login=false") //将防火墙安全事件存放到xlsx文件中
|
// attackevent.Fw_event(conf.GET_Config_yaml("cookie").(string)) //将防火墙安全事件存放到xlsx文件中
|
||||||
// attackevent.Ceshi()
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
log.Println("没有授权")
|
log.Println("没有授权")
|
||||||
|