docs(README): 更新安装后端依赖说明
- 添加安装 Wails 最新版本的命令 - 更新 package.json.md5 校验值
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"equipment-analyzer/internal/model"
|
||||
"fmt"
|
||||
"github.com/google/gopacket/pcap"
|
||||
"log"
|
||||
)
|
||||
|
||||
// GetNetworkInterfaces 获取网络接口列表
|
||||
@@ -13,6 +14,8 @@ func GetNetworkInterfaces() ([]model.NetworkInterface, error) {
|
||||
return nil, fmt.Errorf("failed to find network devices: %v", err)
|
||||
}
|
||||
|
||||
log.Printf("抓取到的网卡设备数量: %d", len(devices)) // 打印网卡总数
|
||||
|
||||
var interfaces []model.NetworkInterface
|
||||
for _, device := range devices {
|
||||
// 跳过回环接口
|
||||
@@ -20,6 +23,8 @@ func GetNetworkInterfaces() ([]model.NetworkInterface, error) {
|
||||
continue
|
||||
}
|
||||
|
||||
log.Printf("网卡名称: %s, 描述: %s", device.Name, device.Description) // 打印每个网卡的名称和描述
|
||||
|
||||
// 提取IP地址
|
||||
var addresses []string
|
||||
for _, address := range device.Addresses {
|
||||
|
||||
@@ -40,6 +40,7 @@ func (ps *ParserService) ParseHexData(hexDataList []string) (*model.CaptureResul
|
||||
ps.logger.Info("开始远程解析数据", "count", len(hexDataList))
|
||||
|
||||
// 远程接口解析
|
||||
//fmt.Println("开始远程解析数据", len(hexDataList))
|
||||
url := "https://krivpfvxi0.execute-api.us-west-2.amazonaws.com/dev/getItems"
|
||||
reqBody := map[string]interface{}{
|
||||
"data": hexDataList,
|
||||
@@ -110,7 +111,7 @@ func (ps *ParserService) ReadRawJsonFile() (string, error) {
|
||||
}
|
||||
|
||||
// 1. 原始装备总数
|
||||
fmt.Println("原始装备总数:", len(equips))
|
||||
//fmt.Println("原始装备总数:", len(equips))
|
||||
|
||||
// 过滤有效装备 (x => !!x.f)
|
||||
var validEquips []interface{}
|
||||
@@ -121,11 +122,11 @@ func (ps *ParserService) ReadRawJsonFile() (string, error) {
|
||||
}
|
||||
}
|
||||
}
|
||||
fmt.Println("过滤f字段后装备数:", len(validEquips))
|
||||
//fmt.Println("过滤f字段后装备数:", len(validEquips))
|
||||
|
||||
// 转换装备数据
|
||||
convertedItems := ps.convertItemsAllWithLog(validEquips)
|
||||
fmt.Println("转换后装备数:", len(convertedItems))
|
||||
//fmt.Println("转换后装备数:", len(convertedItems))
|
||||
|
||||
// 转换英雄数据(只对最大组)
|
||||
convertedHeroes := ps.convertUnits(rawUnits)
|
||||
|
||||
Reference in New Issue
Block a user