20250320
@ -1,4 +1,4 @@
|
||||
cookie: vindex==46=14=0AB00=0R;supportLang=cn%2Cen;lang=cn;sessionid=2000016ad6e6ddeb6173e9f602c697bb417f;loginid=44b72d88e78e25b5e44f27ad636b5936;2000016ad6e6ddeb6173e9f602c697bb417f=true;abcd1234=true;login=false;
|
||||
cookie: vindex==9e=04=0AB00=0R;supportLang=cn%2Cen;lang=cn;sessionid=200002084bb575d0bfb196c95e46a064f7ba;loginid=4c04949a8bccd6e64f28cdd1606134a0;200002084bb575d0bfb196c95e46a064f7ba=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: 269 KiB After Width: | Height: | Size: 269 KiB |
Before Width: | Height: | Size: 252 KiB After Width: | Height: | Size: 253 KiB |
Before Width: | Height: | Size: 185 KiB After Width: | Height: | Size: 881 KiB |
Before Width: | Height: | Size: 225 KiB After Width: | Height: | Size: 224 KiB |
Before Width: | Height: | Size: 105 KiB After Width: | Height: | Size: 114 KiB |
Before Width: | Height: | Size: 145 KiB After Width: | Height: | Size: 198 KiB |
Before Width: | Height: | Size: 176 KiB After Width: | Height: | Size: 175 KiB |
Before Width: | Height: | Size: 1000 KiB After Width: | Height: | Size: 288 KiB |
Before Width: | Height: | Size: 260 KiB After Width: | Height: | Size: 259 KiB |
Before Width: | Height: | Size: 251 KiB After Width: | Height: | Size: 253 KiB |
Before Width: | Height: | Size: 255 KiB After Width: | Height: | Size: 258 KiB |
Before Width: | Height: | Size: 227 KiB After Width: | Height: | Size: 227 KiB |
Before Width: | Height: | Size: 129 KiB After Width: | Height: | Size: 114 KiB |
Before Width: | Height: | Size: 232 KiB After Width: | Height: | Size: 242 KiB |
Before Width: | Height: | Size: 697 KiB After Width: | Height: | Size: 690 KiB |
Before Width: | Height: | Size: 290 KiB After Width: | Height: | Size: 291 KiB |
14
main.go
@ -46,21 +46,21 @@ func main() {
|
||||
// method.HW_TSGZ() //截取态势感知的图片
|
||||
// method.HW_BAOLJ() //截取堡垒机的图片
|
||||
// method.HW_DTCLOUD() //截取运维中心的图片
|
||||
// // 政务网区截图
|
||||
// 政务网区截图
|
||||
// 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事件获取 安全事件表格生成
|
||||
// attackevent.Fw_event(attackevent.HW_fw1_cookie(), "2025-03-18") //将防火墙安全事件存放到xlsx文件中
|
||||
// //政务网防火墙ips事件获取 安全事件表格生成
|
||||
// attackevent.Zww_event(attackevent.HW_zww1_cookie(), "2025-03-18") //将防火墙安全事件存放到xlsx文件中
|
||||
// attackevent.Fw_event(attackevent.HW_fw1_cookie(), "2025-03-20") //将防火墙安全事件存放到xlsx文件中
|
||||
//政务网防火墙ips事件获取 安全事件表格生成
|
||||
// attackevent.Zww_event(attackevent.HW_zww1_cookie(), "2025-03-20") //将防火墙安全事件存放到xlsx文件中
|
||||
//nessus的csv文件生成docx报告
|
||||
// nessus.CSV_damo()
|
||||
//翻译模块调用腾讯xt翻译月500万字限制
|
||||
@ -92,7 +92,7 @@ func init() {
|
||||
flag.Usage = func() {
|
||||
fmt.Fprintf(os.Stderr, "Usage of %s:\n", os.Args[0])
|
||||
fmt.Println(" -v 查看授权状态")
|
||||
fmt.Println(" -run 开始截取图片")
|
||||
fmt.Println(" -run 开始截取图片和生成文档")
|
||||
// fmt.Println(" -h, 帮助信息")
|
||||
}
|
||||
}
|
||||
|
@ -71,6 +71,7 @@ func HW_DTCLOUD() {
|
||||
})
|
||||
// tool.Jietu("img/hw_dtcloud_man.png")
|
||||
|
||||
log.Printf("Page title is: %s\n", "运维中心主页")
|
||||
page.Goto("https://ops.hlw.dtcloud.com/console/om/capacity/overview?regionId=-1", playwright.PageGotoOptions{WaitUntil: playwright.WaitUntilStateCommit}) //跳转到运维中心概览
|
||||
page.WaitForTimeout(10000)
|
||||
page.Screenshot(playwright.PageScreenshotOptions{
|
||||
@ -79,6 +80,7 @@ func HW_DTCLOUD() {
|
||||
})
|
||||
// tool.Jietu("img/hw_dtcloud_01.png")
|
||||
|
||||
log.Printf("Page title is: %s\n", "运维中心概览")
|
||||
page.Goto("https://ops.hlw.dtcloud.com/console/om/capacity/resource?regionId=-1", playwright.PageGotoOptions{WaitUntil: playwright.WaitUntilStateCommit}) //运维-资源容量
|
||||
page.WaitForTimeout(10000)
|
||||
page.Screenshot(playwright.PageScreenshotOptions{
|
||||
@ -87,6 +89,7 @@ func HW_DTCLOUD() {
|
||||
})
|
||||
// tool.Jietu("img/hw_dtcloud_02.png")
|
||||
|
||||
log.Printf("Page title is: %s\n", "运维-资源容量")
|
||||
page.Goto("https://ops.hlw.dtcloud.com/region/dtcloud1/console/om/monitor/overview", playwright.PageGotoOptions{WaitUntil: playwright.WaitUntilStateCommit}) //监控-概览
|
||||
page.WaitForTimeout(10000)
|
||||
page.Screenshot(playwright.PageScreenshotOptions{
|
||||
@ -95,7 +98,8 @@ func HW_DTCLOUD() {
|
||||
})
|
||||
// tool.Jietu("img/hw_dtcloud_03.png")
|
||||
|
||||
page.Goto("https://ops.hlw.dtcloud.com/region/dtcloud1/console/om/monitor/resource", playwright.PageGotoOptions{WaitUntil: playwright.WaitUntilStateCommit}) //监控-资源监控
|
||||
log.Printf("Page title is: %s\n", "监控-概览")
|
||||
page.Goto("https://ops.hlw.dtcloud.com/region/dtcloud1/console/om/monitor/resource", playwright.PageGotoOptions{WaitUntil: playwright.WaitUntilStateCommit}) //监控-资源监控-物理服务器
|
||||
page.WaitForTimeout(10000)
|
||||
page.Locator(`.arco-tree.arco-tree-show-line`).Locator(`div`).Nth(8).Locator(`span`).Nth(2).Locator(`span`).Nth(0).Click()
|
||||
page.Locator(`div[data-test-id="PhysicalServer"]`).Click()
|
||||
@ -106,6 +110,7 @@ func HW_DTCLOUD() {
|
||||
})
|
||||
// tool.Jietu("img/hw_dtcloud_04.png")
|
||||
|
||||
log.Printf("Page title is: %s\n", "监控-资源监控-物理服务器")
|
||||
page.Goto("https://ops.hlw.dtcloud.com/region/dtcloud1/console/om/alert/view", playwright.PageGotoOptions{WaitUntil: playwright.WaitUntilStateCommit}) //监控-告警-告警查看
|
||||
page.WaitForTimeout(10000)
|
||||
page.Locator(`.arco-space-item`).Nth(0).Locator(`div`).Nth(1).Locator(`button`).Click()
|
||||
@ -116,6 +121,7 @@ func HW_DTCLOUD() {
|
||||
})
|
||||
// tool.Jietu("img/hw_dtcloud_05.png")
|
||||
|
||||
log.Printf("Page title is: %s\n", "监控-告警-告警查看")
|
||||
page.Goto("https://ops.hlw.dtcloud.com/region/dtcloud1/console/om/alert/history", playwright.PageGotoOptions{WaitUntil: playwright.WaitUntilStateCommit}) //监控-告警--告警历史
|
||||
page.WaitForTimeout(10000)
|
||||
page.Locator(`.arco-btn.arco-btn-outline.arco-btn-size-default.arco-btn-shape-square`).Nth(0).Click()
|
||||
@ -130,6 +136,7 @@ func HW_DTCLOUD() {
|
||||
})
|
||||
// tool.Jietu("img/hw_dtcloud_06.png")
|
||||
|
||||
log.Printf("Page title is: %s\n", "监控-告警--告警历史")
|
||||
page.Goto("https://ops.hlw.dtcloud.com/region/dtcloud1/console/om/health-inspection/outputs?page=1&size=10&order=createTime%3Adesc&searchResult=%7B%7D", playwright.PageGotoOptions{WaitUntil: playwright.WaitUntilStateCommit}) //运维-监控巡检-巡检结果
|
||||
page.WaitForTimeout(10000)
|
||||
page.Screenshot(playwright.PageScreenshotOptions{
|
||||
@ -137,19 +144,21 @@ func HW_DTCLOUD() {
|
||||
FullPage: playwright.Bool(false),
|
||||
})
|
||||
// tool.Jietu("img/hw_dtcloud_07.png")
|
||||
// 获取页面标题
|
||||
|
||||
log.Printf("Page title is: %s\n", "运维-监控巡检-巡检结果")
|
||||
page.Goto("https://ops.hlw.dtcloud.com/console/om/capacity/service?regionId=-1", playwright.PageGotoOptions{WaitUntil: playwright.WaitUntilStateCommit}) //运维-容量-云服务容量
|
||||
page.WaitForTimeout(10000)
|
||||
page.Screenshot(playwright.PageScreenshotOptions{
|
||||
Path: playwright.String("img/hw_dtcloud_08.png"),
|
||||
FullPage: playwright.Bool(false),
|
||||
})
|
||||
log.Printf("Page title is: %s\n", "运维-容量-云服务容量")
|
||||
// 获取页面标题
|
||||
title, err := page.Title()
|
||||
if err != nil {
|
||||
log.Fatalf("could not get title: %v", err)
|
||||
log.Println(err)
|
||||
}
|
||||
log.Printf("Page title is: %s\n", title)
|
||||
|
||||
page.WaitForTimeout(5000)
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ func ZWW_DTCLOUD() {
|
||||
FullPage: playwright.Bool(false),
|
||||
})
|
||||
// tool.Jietu("img/hw_dtcloud_man.png")
|
||||
|
||||
log.Printf("Page title is: %s\n", "运维中心主页")
|
||||
page.Goto("https://ops.zww.dtcloud.com/console/om/capacity/overview?regionId=-1", playwright.PageGotoOptions{WaitUntil: playwright.WaitUntilStateCommit}) //跳转到运维中心概览
|
||||
page.WaitForTimeout(20000)
|
||||
page.Screenshot(playwright.PageScreenshotOptions{
|
||||
@ -80,7 +80,7 @@ func ZWW_DTCLOUD() {
|
||||
FullPage: playwright.Bool(false),
|
||||
})
|
||||
// tool.Jietu("img/hw_dtcloud_01.png")
|
||||
|
||||
log.Printf("Page title is: %s\n", "运维中心概览")
|
||||
page.Goto("https://ops.zww.dtcloud.com/console/om/capacity/resource?regionId=-1", playwright.PageGotoOptions{WaitUntil: playwright.WaitUntilStateCommit}) //运维-资源容量
|
||||
page.WaitForTimeout(20000)
|
||||
page.Screenshot(playwright.PageScreenshotOptions{
|
||||
@ -88,7 +88,7 @@ func ZWW_DTCLOUD() {
|
||||
FullPage: playwright.Bool(false),
|
||||
})
|
||||
// tool.Jietu("img/hw_dtcloud_02.png")
|
||||
|
||||
log.Printf("Page title is: %s\n", "运维-资源容量")
|
||||
page.Goto("https://ops.zww.dtcloud.com/region/dtcloud2/console/om/monitor/overview", playwright.PageGotoOptions{WaitUntil: playwright.WaitUntilStateCommit}) //监控-概览
|
||||
page.WaitForTimeout(20000)
|
||||
page.Screenshot(playwright.PageScreenshotOptions{
|
||||
@ -96,7 +96,7 @@ func ZWW_DTCLOUD() {
|
||||
FullPage: playwright.Bool(false),
|
||||
})
|
||||
// tool.Jietu("img/hw_dtcloud_03.png")
|
||||
|
||||
log.Printf("Page title is: %s\n", "监控-概览")
|
||||
page.Goto("https://ops.zww.dtcloud.com/region/dtcloud2/console/om/monitor/resource", playwright.PageGotoOptions{WaitUntil: playwright.WaitUntilStateCommit}) //监控-资源监控-物理服务器
|
||||
page.WaitForTimeout(20000)
|
||||
page.Locator(`.arco-tree.arco-tree-show-line`).Locator(`div`).Nth(8).Locator(`span`).Nth(2).Locator(`span`).Nth(0).Click()
|
||||
@ -107,7 +107,7 @@ func ZWW_DTCLOUD() {
|
||||
FullPage: playwright.Bool(false),
|
||||
})
|
||||
// tool.Jietu("img/hw_dtcloud_04.png")
|
||||
|
||||
log.Printf("Page title is: %s\n", "监控-资源监控-物理服务器")
|
||||
page.Goto("https://ops.zww.dtcloud.com/region/dtcloud2/console/om/alert/view", playwright.PageGotoOptions{WaitUntil: playwright.WaitUntilStateCommit}) //监控-告警-告警查看
|
||||
page.WaitForTimeout(20000)
|
||||
page.Locator(`.arco-space-item`).Nth(0).Locator(`div`).Nth(1).Locator(`button`).Click()
|
||||
@ -117,7 +117,7 @@ func ZWW_DTCLOUD() {
|
||||
FullPage: playwright.Bool(false),
|
||||
})
|
||||
// tool.Jietu("img/hw_dtcloud_05.png")
|
||||
|
||||
log.Printf("Page title is: %s\n", "监控-告警-告警查看")
|
||||
page.Goto("https://ops.zww.dtcloud.com/region/dtcloud2/console/om/alert/history", playwright.PageGotoOptions{WaitUntil: playwright.WaitUntilStateCommit}) //监控-告警历史
|
||||
page.WaitForTimeout(20000)
|
||||
page.Locator(`.arco-btn.arco-btn-outline.arco-btn-size-default.arco-btn-shape-square`).Nth(0).Click()
|
||||
@ -131,7 +131,7 @@ func ZWW_DTCLOUD() {
|
||||
FullPage: playwright.Bool(false),
|
||||
})
|
||||
// tool.Jietu("img/hw_dtcloud_06.png")
|
||||
|
||||
log.Printf("Page title is: %s\n", "监控-告警--告警历史")
|
||||
page.Goto("https://ops.zww.dtcloud.com/region/dtcloud2/console/om/health-inspection/outputs?page=1&size=10&order=createTime%3Adesc&searchResult=%7B%7D", playwright.PageGotoOptions{WaitUntil: playwright.WaitUntilStateCommit}) //运维-监控巡检-巡检结果
|
||||
page.WaitForTimeout(20000)
|
||||
page.Screenshot(playwright.PageScreenshotOptions{
|
||||
@ -139,19 +139,19 @@ func ZWW_DTCLOUD() {
|
||||
FullPage: playwright.Bool(false),
|
||||
})
|
||||
// tool.Jietu("img/hw_dtcloud_07.png")
|
||||
|
||||
log.Printf("Page title is: %s\n", "运维-监控巡检-巡检结果")
|
||||
page.Goto("https://ops.zww.dtcloud.com/console/om/capacity/service?regionId=-1", playwright.PageGotoOptions{WaitUntil: playwright.WaitUntilStateCommit}) //运维-容量-云服务容量
|
||||
page.WaitForTimeout(20000)
|
||||
page.Screenshot(playwright.PageScreenshotOptions{
|
||||
Path: playwright.String("img/zww_dtcloud_08.png"),
|
||||
FullPage: playwright.Bool(false),
|
||||
})
|
||||
log.Printf("Page title is: %s\n", "运维-容量-云服务容量")
|
||||
// 获取页面标题
|
||||
title, err := page.Title()
|
||||
if err != nil {
|
||||
log.Fatalf("could not get title: %v", err)
|
||||
}
|
||||
log.Printf("Page title is: %s\n", title)
|
||||
|
||||
page.WaitForTimeout(5000)
|
||||
}
|
||||
|
@ -85,6 +85,7 @@ func HW_SYS_Word() {
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
log.Println("文档生成完成======大同信创云5.2.0 互联网区-" + time.Unix(tool.Timestamp("second"), 0).Format("2006年01月02日") + "巡检报告.docx")
|
||||
doc.SaveToFile("大同信创云5.2.0 互联网区-" + time.Unix(tool.Timestamp("second"), 0).Format("2006年01月02日") + "巡检报告.docx")
|
||||
}
|
||||
func ZWW_SYS_Word() {
|
||||
@ -163,5 +164,6 @@ func ZWW_SYS_Word() {
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
log.Println("文档生成完成======大同信创云5.2.0 政务网区-" + time.Unix(tool.Timestamp("second"), 0).Format("2006年01月02日") + "巡检报告.docx")
|
||||
doc.SaveToFile("大同信创云5.2.0 政务网区-" + time.Unix(tool.Timestamp("second"), 0).Format("2006年01月02日") + "巡检报告.docx")
|
||||
}
|
||||
|