diff --git a/api/desc/core/pcm-core.api b/api/desc/core/pcm-core.api index e67496da..266e58f2 100644 --- a/api/desc/core/pcm-core.api +++ b/api/desc/core/pcm-core.api @@ -531,6 +531,19 @@ type SaveHashcatReq { CrackResult string `json:"crackResult"` // 结果 Started string `json:"started"` // 开始时间 Stopped string `json:"stopped"` // 结束时间 + KernelFeature string `json:"kernelFeature"` + HashMode string `json:"hashMode"` + Rejected string `json:"rejected"` + Session string `json:"session"` + HashTarget string `json:"hashTarget"` + Speed string `json:"speed"` + Candidates string `json:"candidates"` + RestorePoint string `json:"restorePoint"` + Recovered string `json:"recovered"` + GuessQueue string `json:"guessQueue"` + CandidateEngine string `json:"candidateEngine"` + GuessMask string `json:"guessMask"` + RestoreSub string `json:"restoreSub"` } type getHashcatHandlerReq { diff --git a/api/internal/logic/core/savehashcatlogic.go b/api/internal/logic/core/savehashcatlogic.go index 738ef371..377beb7e 100644 --- a/api/internal/logic/core/savehashcatlogic.go +++ b/api/internal/logic/core/savehashcatlogic.go @@ -38,10 +38,10 @@ func NewSaveHashcatLogic(ctx context.Context, svcCtx *svc.ServiceContext) *SaveH } func (l *SaveHashcatLogic) SaveHashcat(req *types.SaveHashcatReq) error { - var hashcat models.THashcat - utils.Convert(req, &hashcat) - hashcat.Id = utils.GenSnowflakeID() - tx := l.svcCtx.DbEngin.Save(hashcat) + var hashCat models.THashcat + utils.Convert(req, &hashCat) + hashCat.Id = utils.GenSnowflakeID() + tx := l.svcCtx.DbEngin.Save(hashCat) if tx.Error != nil { return tx.Error } diff --git a/api/internal/types/types.go b/api/internal/types/types.go index fd533cd2..931b2454 100644 --- a/api/internal/types/types.go +++ b/api/internal/types/types.go @@ -495,6 +495,19 @@ type SaveHashcatReq struct { CrackResult string `json:"crackResult"` // 结果 Started string `json:"started"` // 开始时间 Stopped string `json:"stopped"` // 结束时间 + KernelFeature string `json:"kernelFeature"` + HashMode string `json:"hashMode"` + Rejected string `json:"rejected"` + Session string `json:"session"` + HashTarget string `json:"hashTarget"` + Speed string `json:"speed"` + Candidates string `json:"candidates"` + RestorePoint string `json:"restorePoint"` + Recovered string `json:"recovered"` + GuessQueue string `json:"guessQueue"` + CandidateEngine string `json:"candidateEngine"` + GuessMask string `json:"guessMask"` + RestoreSub string `json:"restoreSub"` } type GetHashcatHandlerReq struct { diff --git a/pkg/models/thashcat.go b/pkg/models/thashcat.go index 7fd58f90..ce3f4944 100644 --- a/pkg/models/thashcat.go +++ b/pkg/models/thashcat.go @@ -26,6 +26,19 @@ type ( CreatedBy int64 `db:"created_by"` // 创建人 UpdatedBy int64 `db:"updated_by"` // 更新人 DeletedFlag int64 `db:"deleted_flag"` // 是否删除(0-否,1-是) + KernelFeature string `db:"kernel_feature"` + HashMode string `db:"hash_mode"` + Rejected string `db:"rejected"` + Session string `db:"session"` + HashTarget string `db:"hash_target"` + Speed string `db:"speed"` + Candidates string `db:"candidates"` + RestorePoint string `db:"restore_point"` + Recovered string `db:"recovered"` + GuessQueue string `db:"guess_queue"` + CandidateEngine string `db:"candidate_engine"` + GuessMask string `db:"guess_mask"` + RestoreSub string `db:"restore_sub"` } ) diff --git a/rpc/internal/logic/pcmcore/syncinfologic.go b/rpc/internal/logic/pcmcore/syncinfologic.go index 8acb5c9e..4670682a 100644 --- a/rpc/internal/logic/pcmcore/syncinfologic.go +++ b/rpc/internal/logic/pcmcore/syncinfologic.go @@ -57,14 +57,20 @@ func (l *SyncInfoLogic) SyncInfo(in *pcmCore.SyncInfoReq) (*pcmCore.SyncInfoResp switch kind { case constants.CLOUD: for _, cloudInfo := range in.CloudInfoList { - l.svcCtx.DbEngin.Exec("update cloud set status = ?,start_time = ?,result = ? where participant_id = ? and id = ?", + tx := l.svcCtx.DbEngin.Exec("update cloud set status = ?,start_time = ?,result = ? where participant_id = ? and id = ?", cloudInfo.Status, cloudInfo.StartTime, cloudInfo.Result, in.ParticipantId, cloudInfo.Id) + if tx.Error != nil { + logx.Error(tx.Error) + } syncTask(l.svcCtx.DbEngin, cloudInfo.TaskId) } case constants.HPC: for _, hpcInfo := range in.HpcInfoList { - l.svcCtx.DbEngin.Exec("update hpc set status = ?,start_time = ?,job_id = ? where participant_id = ? and task_id = ? and name = ?", + tx := l.svcCtx.DbEngin.Exec("update hpc set status = ?,start_time = ?,job_id = ? where participant_id = ? and task_id = ? and name = ?", hpcInfo.Status, hpcInfo.StartTime, hpcInfo.RunningTime, hpcInfo.JobId, in.ParticipantId, hpcInfo.TaskId, hpcInfo.Name) + if tx.Error != nil { + logx.Error(tx.Error) + } syncTask(l.svcCtx.DbEngin, hpcInfo.TaskId) } case constants.AI: