https://github.com/SleepingBag945/IPSearch
Binary was compiled with 'CGO_ENABLED=0', go-sqlite3 requires cgo to work. This is a stub
export GOROOT=/usr/local/go
export PATH=$GOROOT/bin:$PATH
export GOPROXY=https://proxy.golang.com.cn,direct
export CGO_ENABLED=1
export GOOS=windows
export GOARCH=amd64
gcc: error: unrecognized command line option ‘-mthreads’; did you mean ‘-pthread’?
apt-get install gcc-mingw-w64
apt-get install gcc-multilib
CC=x86_64-w64-mingw32-gcc
go build
queryInfoByIP
queryInfoByKey
query := "select inetnum,netname,country,descr,status,"last-modified" from ipseg where start <= %d and end >= %d order by end-start ASC limit 0,1;"
query = fmt.Sprintf(query, ip, ip)
rows, err := db.Query(query)
原文始发于微信公众号(here404):一款go语言的IP查询工具
特别标注:
本站(CN-SEC.COM)所有文章仅供技术研究,若将其信息做其他用途,由用户承担全部法律及连带责任,本站不承担任何法律及连带责任,请遵守中华人民共和国安全法.
- 我的微信
- 微信扫一扫
-
- 我的微信公众号
- 微信扫一扫
-
评论