Closed yvesago closed 3 months ago
Hi @yvesago, thanks for your effort! Your tests are failing though:
$ go test ./...
? github.com/jreisinger/checkip/cli [no test files]
? github.com/jreisinger/checkip/cmd/checkip [no test files]
ok github.com/jreisinger/checkip 0.085s
2024/06/06 16:16:17 downloading http://127.0.0.1:56325
--- FAIL: TestOnyphe (0.00s)
--- FAIL: TestOnyphe/given_valid_response_then_result_and_no_error_is_returned (0.00s)
onyphe_test.go:37:
Error Trace: onyphe_test.go:37
Error: Not equal:
expected: true
actual : false
Test: TestOnyphe/given_valid_response_then_result_and_no_error_is_returned
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x20 pc=0x104ce5e28]
goroutine 86 [running]:
testing.tRunner.func1.2({0x104dbf820, 0x105026730})
/opt/homebrew/Cellar/go/1.22.3/libexec/src/testing/testing.go:1631 +0x1c4
testing.tRunner.func1()
/opt/homebrew/Cellar/go/1.22.3/libexec/src/testing/testing.go:1634 +0x33c
panic({0x104dbf820?, 0x105026730?})
/opt/homebrew/Cellar/go/1.22.3/libexec/src/runtime/panic.go:770 +0x124
github.com/jreisinger/checkip/check.TestOnyphe.func1(0x14000201380)
/Users/jozef.reisinger/github.com/yvesago/checkip/check/onyphe_test.go:38 +0x1e8
testing.tRunner(0x14000201380, 0x104e1da58)
/opt/homebrew/Cellar/go/1.22.3/libexec/src/testing/testing.go:1689 +0xec
created by testing.(*T).Run in goroutine 85
/opt/homebrew/Cellar/go/1.22.3/libexec/src/testing/testing.go:1742 +0x318
FAIL github.com/jreisinger/checkip/check 0.131s
FAIL
a stupid error with the api key name, is now fixed onyphe publish network port in number or string format :-/ here is a more robust way to manage this weird behavior
Thanks for your code @yvesago! I merged the censys code. I didn't merge onyphe code because they have draconic rules for registration (you must use company email address). Also I don't want to complicate the tool's interface - I want to have a minimal numbers of flags. Thanks again 👍.
Thx for your nice tool
here a pull request with censys and onyphe checks
and ability to selects checks by flag or in config file with a CHECKS key CHECKS: BlockList, CinsScore,