hashcat 进度反馈和列表查询接口

Former-commit-id: f94e9491c05a10491e8fdca57750002c6431226f
This commit is contained in:
zhangwei 2023-09-04 10:41:22 +08:00
parent df3d6bc9b5
commit 8bcfaa9011
4 changed files with 25 additions and 21 deletions

View File

@ -444,12 +444,13 @@ type NodeAsset {
} }
type SaveHashcatReq { type SaveHashcatReq {
CrackTaskId int64 `json:"crackTaskId"` // 任务id CrackTaskId string `json:"crackTaskId"` // 任务id
CrackStatus string `json:"crackStatus"` // 状态 CrackContainerId string `json:"crackContainerId"` // 容器id
CrackStartTime string `json:"crackStartTime"` //开始时间 CrackStatus string `json:"crackStatus"` // 状态
CrackEstimatedTime string `json:"crackEstimatedTime"` // 预计时间 CrackStartTime string `json:"crackStartTime"` //开始时间
CrackProgress string `json:"crackProgress"` // 进度 CrackEstimatedTime string `json:"crackEstimatedTime"` // 预计时间
CrackResult string `json:"crackResult"` // 结果 CrackProgress string `json:"crackProgress"` // 进度
CrackResult string `json:"crackResult"` // 结果
} }
type getHashcatHandlerReq { type getHashcatHandlerReq {
@ -461,6 +462,8 @@ type getHashcatHandlerResp {
} }
type HashCat { type HashCat {
CrackTaskId string `json:"crackTaskId"` // 任务id
CrackContainerId string `json:"crackContainerId"` // 容器id
CrackStatus string `json:"crackStatus"` // 状态 CrackStatus string `json:"crackStatus"` // 状态
CrackStartTime string `json:"crackStartTime"` //开始时间 CrackStartTime string `json:"crackStartTime"` //开始时间
CrackEstimatedTime string `json:"crackEstimatedTime"` // 预计时间 CrackEstimatedTime string `json:"crackEstimatedTime"` // 预计时间

View File

@ -26,7 +26,7 @@ func NewGetHashcatLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetHas
} }
func (l *GetHashcatLogic) GetHashcat() (resp *types.GetHashcatHandlerResp, err error) { func (l *GetHashcatLogic) GetHashcat() (resp *types.GetHashcatHandlerResp, err error) {
// todo: add your logic here and delete this line
var hashcatList []*model.THashcat var hashcatList []*model.THashcat
tx := l.svcCtx.DbEngin.Find(&hashcatList) tx := l.svcCtx.DbEngin.Find(&hashcatList)
if tx.Error != nil { if tx.Error != nil {

View File

@ -414,7 +414,8 @@ type NodeAsset struct {
} }
type SaveHashcatReq struct { type SaveHashcatReq struct {
CrackTaskId int64 `json:"crackTaskId"` // 任务id CrackTaskId string `json:"crackTaskId"` // 任务id
CrackContainerId string `json:"crackContainerId"` // 容器id
CrackStatus string `json:"crackStatus"` // 状态 CrackStatus string `json:"crackStatus"` // 状态
CrackStartTime string `json:"crackStartTime"` //开始时间 CrackStartTime string `json:"crackStartTime"` //开始时间
CrackEstimatedTime string `json:"crackEstimatedTime"` // 预计时间 CrackEstimatedTime string `json:"crackEstimatedTime"` // 预计时间
@ -431,6 +432,8 @@ type GetHashcatHandlerResp struct {
} }
type HashCat struct { type HashCat struct {
CrackTaskId string `json:"crackTaskId"` // 任务id
CrackContainerId string `json:"crackContainerId"` // 容器id
CrackStatus string `json:"crackStatus"` // 状态 CrackStatus string `json:"crackStatus"` // 状态
CrackStartTime string `json:"crackStartTime"` //开始时间 CrackStartTime string `json:"crackStartTime"` //开始时间
CrackEstimatedTime string `json:"crackEstimatedTime"` // 预计时间 CrackEstimatedTime string `json:"crackEstimatedTime"` // 预计时间

View File

@ -3,7 +3,6 @@
package model package model
import ( import (
"database/sql"
"github.com/zeromicro/go-zero/core/stores/sqlx" "github.com/zeromicro/go-zero/core/stores/sqlx"
) )
@ -14,18 +13,17 @@ type (
} }
THashcat struct { THashcat struct {
Id int64 `db:"id"` // id Id int64 `db:"id"` // id
CrackTaskId int64 `db:"crack_task_id"` // 任务id CrackTaskId string `db:"crack_task_id"` // 任务id
CrackStatus string `db:"crack_status"` // 状态 CrackContainerId string `db:"container_id"` // 任务id
CrackStartTime string `db:"crack_start_time"` //开始时间 CrackStatus string `db:"crack_status"` // 状态
CrackEstimatedTime string `db:"crack_estimated_time"` // 预计时间 CrackStartTime string `db:"crack_start_time"` //开始时间
CrackProgress string `db:"crack_progress"` // 进度 CrackEstimatedTime string `db:"crack_estimated_time"` // 预计时间
CrackResult string `db:"crack_result"` // 结果 CrackProgress string `db:"crack_progress"` // 进度
CreatedBy int64 `db:"created_by"` // 创建人 CrackResult string `db:"crack_result"` // 结果
CreatedTime sql.NullTime `db:"created_time"` // 创建时间 CreatedBy int64 `db:"created_by"` // 创建人
UpdatedBy int64 `db:"updated_by"` // 更新人 UpdatedBy int64 `db:"updated_by"` // 更新人
UpdatedTime sql.NullTime `db:"updated_time"` // 更新时间 DeletedFlag int64 `db:"deleted_flag"` // 是否删除0-否1-是)
DeletedFlag int64 `db:"deleted_flag"` // 是否删除0-否1-是)
} }
) )