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查询工具
免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉。
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论