Skip to content

Commit

Permalink
批量查询时 api 超过 fofa 最大查询次数直接退出
Browse files Browse the repository at this point in the history
  • Loading branch information
Becivells committed Apr 3, 2022
1 parent 34de64f commit 1e9bc51
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/fofa/fofa_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,10 @@ func (f *FoFa) Fetch(queryStr string) bool {
//}

func getApiErrInfo(code string) string {
// {errmsg: "Request overrun on the day, restrict access, try again tomorrow", error: true}
if strings.Contains(code, "try again tomorrow") {
printer.Fatal(code)
}
switch code {
case "820000":
return "查询语法错误"
Expand Down

0 comments on commit 1e9bc51

Please sign in to comment.