diff --git a/Makefile b/Makefile deleted file mode 100644 index f0eb638..0000000 --- a/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -all: - go get github.com/lib/pq - go get github.com/sirupsen/logrus - go get golang.org/x/net/publicsuffix - go build sancrawler.go - -clean: - rm sancrawler diff --git a/README.md b/README.md index aea9174..916b239 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ of as "reverse X509" for the same purpose. ## How to build - First, [install golang](https://golang.org/doc/install) -- Then, just do a `make` from the sancrawler2 directory +- Then, just do a `go build` from the sancrawler2 directory ## How to use diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..232b9a7 --- /dev/null +++ b/go.mod @@ -0,0 +1,11 @@ +module github.com/cramppet/sancrawler2 + +go 1.19 + +require ( + github.com/lib/pq v1.10.7 + github.com/sirupsen/logrus v1.9.0 + golang.org/x/net v0.0.0-20221002022538-bcab6841153b +) + +require golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10 // indirect diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..f04f34f --- /dev/null +++ b/go.sum @@ -0,0 +1,20 @@ +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= +github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= +github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +golang.org/x/net v0.0.0-20221002022538-bcab6841153b h1:6e93nYa3hNqAvLr0pD4PN1fFS+gKzp2zAXqrnTCstqU= +golang.org/x/net v0.0.0-20221002022538-bcab6841153b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10 h1:WIoqL4EROvwiPdUtaip4VcDdpZ4kha7wBWZrbVKCIZg= +golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/sancrawler.go b/sancrawler.go index 35e91be..a283967 100644 --- a/sancrawler.go +++ b/sancrawler.go @@ -125,7 +125,7 @@ func loadCrawlerData(orgname string, sanChan chan crawlerData, cnChan chan crawl // Make database connection - connStr := "host=crt.sh user=guest dbname=certwatch" + connStr := "host=crt.sh user=guest dbname=certwatch binary_parameters=yes" db, err := sql.Open("postgres", connStr) if err != nil { log.Fatal(err)