This repository has been archived by the owner on Jul 27, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
169501a
commit e863d6f
Showing
9 changed files
with
105 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
* @Author: rootphantomer [email protected] | ||
* @Date: 2022-09-06 17:58:31 | ||
* @LastEditors: rootphantomer | ||
* @LastEditTime: 2022-09-07 12:38:07 | ||
* @LastEditTime: 2022-09-07 16:19:32 | ||
* @FilePath: /quake_go/src/model/reqjson.go | ||
* @Description:model | ||
* | ||
|
@@ -20,4 +20,5 @@ type Reqjson struct { | |
Start_time Time `json:"start_time,omitempty"` | ||
End_time Time `json:"end_time,omitempty"` | ||
Field string `json:"-"` | ||
Query_txt string `json:"-"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
* @Author: rootphantomer [email protected] | ||
* @Date: 2022-09-06 18:10:53 | ||
* @LastEditors: rootphantomer | ||
* @LastEditTime: 2022-09-07 11:19:02 | ||
* @LastEditTime: 2022-09-07 16:43:31 | ||
* @FilePath: /quake_go/src/model/respjson.go | ||
* @Description: | ||
* | ||
|
@@ -12,9 +12,9 @@ | |
package model | ||
|
||
type ServiceJson struct { | ||
Code int64 `json:"code"` | ||
Code int `json:"code"` | ||
Data []struct { | ||
Asn int64 `json:"asn"` | ||
Asn int `json:"asn"` | ||
Cdn struct { | ||
Domain string `json:"domain"` | ||
IsCdn bool `json:"is_cdn"` | ||
|
@@ -52,7 +52,7 @@ type ServiceJson struct { | |
Org string `json:"org"` | ||
OsName string `json:"os_name"` | ||
OsVersion string `json:"os_version"` | ||
Port int64 `json:"port"` | ||
Port int `json:"port"` | ||
Service struct { | ||
Banner string `json:"banner"` | ||
Cert string `json:"cert"` | ||
|
@@ -69,7 +69,7 @@ type ServiceJson struct { | |
Path string `json:"path"` | ||
ResponseHeaders string `json:"response_headers"` | ||
Server string `json:"server"` | ||
StatusCode int64 `json:"status_code"` | ||
StatusCode int `json:"status_code"` | ||
Title string `json:"title"` | ||
XPoweredBy string `json:"x_powered_by"` | ||
} `json:"http"` | ||
|
@@ -85,22 +85,22 @@ type ServiceJson struct { | |
Message string `json:"message"` | ||
Meta struct { | ||
Pagination struct { | ||
Count int64 `json:"count"` | ||
PageIndex int64 `json:"page_index"` | ||
PageSize int64 `json:"page_size"` | ||
Total int64 `json:"total"` | ||
Count int `json:"count"` | ||
PageIndex int `json:"page_index"` | ||
PageSize int `json:"page_size"` | ||
Total int `json:"total"` | ||
} `json:"pagination"` | ||
} `json:"meta"` | ||
} | ||
|
||
type InfoJson struct { | ||
Code int64 `json:"code"` | ||
Code int `json:"code"` | ||
Data struct { | ||
AvatarID string `json:"avatar_id"` | ||
BanStatus string `json:"ban_status"` | ||
Baned bool `json:"baned"` | ||
ConstantCredit int64 `json:"constant_credit"` | ||
Credit int64 `json:"credit"` | ||
ConstantCredit int `json:"constant_credit"` | ||
Credit int `json:"credit"` | ||
Disable struct { | ||
DisableTime interface{} `json:"disable_time"` | ||
StartTime interface{} `json:"start_time"` | ||
|
@@ -110,17 +110,17 @@ type InfoJson struct { | |
Name interface{} `json:"name"` | ||
Status string `json:"status"` | ||
} `json:"enterprise_information"` | ||
FreeQueryAPICount int64 `json:"free_query_api_count"` | ||
FreeQueryAPICount int `json:"free_query_api_count"` | ||
ID string `json:"id"` | ||
InvitationCodeInfo struct { | ||
Code string `json:"code"` | ||
InviteAcquireCredit int64 `json:"invite_acquire_credit"` | ||
InviteNumber int64 `json:"invite_number"` | ||
InviteAcquireCredit int `json:"invite_acquire_credit"` | ||
InviteNumber int `json:"invite_number"` | ||
} `json:"invitation_code_info"` | ||
IsCashedInvitationCode bool `json:"is_cashed_invitation_code"` | ||
MobilePhone string `json:"mobile_phone"` | ||
MonthRemainingCredit int64 `json:"month_remaining_credit"` | ||
PersistentCredit int64 `json:"persistent_credit"` | ||
MonthRemainingCredit int `json:"month_remaining_credit"` | ||
PersistentCredit int `json:"persistent_credit"` | ||
PersonalInformationStatus bool `json:"personal_information_status"` | ||
PrivacyLog struct { | ||
AnonymousModel bool `json:"anonymous_model"` | ||
|
@@ -130,9 +130,9 @@ type InfoJson struct { | |
Time string `json:"time"` | ||
} `json:"privacy_log"` | ||
Role []struct { | ||
Credit int64 `json:"credit"` | ||
Credit int `json:"credit"` | ||
Fullname string `json:"fullname"` | ||
Priority int64 `json:"priority"` | ||
Priority int `json:"priority"` | ||
} `json:"role"` | ||
RoleValidity struct { | ||
} `json:"role_validity"` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* @Author: rootphantomer [email protected] | ||
* @Date: 2022-09-07 16:27:34 | ||
* @LastEditors: rootphantomer | ||
* @LastEditTime: 2022-09-07 16:31:15 | ||
* @FilePath: /quake_go/src/utils/ReadLine.go | ||
* @Description:逐行读取内容 | ||
* | ||
* Copyright (c) 2022 by rootphantomer, All Rights Reserved. | ||
*/ | ||
package utils | ||
|
||
import ( | ||
"bufio" | ||
"io" | ||
"os" | ||
"strings" | ||
) | ||
|
||
func ReadLine(fileName string) ([]string, error) { | ||
f, err := os.Open(fileName) | ||
if err != nil { | ||
return nil, err | ||
} | ||
buf := bufio.NewReader(f) | ||
var result []string | ||
for { | ||
line, err := buf.ReadString('\n') | ||
line = strings.TrimSpace(line) | ||
if err != nil { | ||
if err == io.EOF { //读取结束,会报EOF | ||
return result, nil | ||
} | ||
return nil, err | ||
} | ||
result = append(result, line) | ||
} | ||
} |