-
Notifications
You must be signed in to change notification settings - Fork 3
/
ApC.go
29 lines (25 loc) · 908 Bytes
/
ApC.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Author: HuMoLix
package main
import (
"os"
"github.com/HuMoLix/airport_collector/common"
"github.com/HuMoLix/airport_collector/common/utils"
"github.com/HuMoLix/airport_collector/platform/fofa"
"github.com/HuMoLix/airport_collector/runner"
)
// 主程序入口
func main() {
var Config common.Conf
var Options common.ApCOptions
// update.ValidVersion() // 检查版本
common.Flag(&Options) // 解析命令行参数
utils.IsInit(&Config) // 检查是否初始化
utils.IsGeoIP(&Options) // 检查是否使用GeoIP库
utils.LoadConfig(&Config) // 读取 config.yaml 配置
ok := fofa.ConnectFofa(&Config) // 检查与Fofa平台的连接状态
if !ok { // 判断运行方式 license or fofakey
os.Exit(0) // 退出程序
} else {
runner.Runner([]string{Config.Fofa.Email, Config.Fofa.Apikey}, &Config, &Options)
}
}