diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml new file mode 100644 index 0000000..5be54da --- /dev/null +++ b/.gitea/workflows/ci.yml @@ -0,0 +1,27 @@ +name: CI + +on: + push: + branches: [main, master] + pull_request: + branches: [main, master] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-go@v5 + with: + go-version: '1.24' + cache: true + + - name: Vet + run: go vet ./... + + - name: Test + run: go test -v -race -coverprofile=coverage.out ./... + + - name: Build + run: go build -v ./... diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..db817b5 --- /dev/null +++ b/Makefile @@ -0,0 +1,19 @@ +BINARY_NAME=exploredns +BUILD_DIR=bin +GO=go +GOFLAGS=-v + +.PHONY: build test lint clean + +build: + $(GO) build $(GOFLAGS) -o $(BUILD_DIR)/$(BINARY_NAME) ./cmd/exploredns + +test: + $(GO) test -v -race -coverprofile=coverage.out ./... + +lint: + $(GO) vet ./... + +clean: + rm -rf $(BUILD_DIR) + rm -f coverage.out diff --git a/README.md b/README.md index f2b2511..107c448 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,44 @@ # ExploreDNS +DNS reconnaissance and exploration tool. + +## Build + +```sh +go build -o bin/exploredns ./cmd/exploredns +``` + +Or use the Makefile: + +```sh +make build +``` + +## Usage + +```sh +./bin/exploredns +``` + +## Development + +```sh +make test # run tests +make lint # run go vet +make clean # remove build artifacts +``` + +## Project Structure + +``` +cmd/exploredns/ CLI entry point +internal/dns/ DNS query operations +internal/traverse/ DNS tree traversal +internal/fingerprint/ DNS server fingerprinting +internal/output/ Result formatting and output +internal/config/ Configuration management +``` + +## License + +MIT diff --git a/cmd/exploredns/main.go b/cmd/exploredns/main.go new file mode 100644 index 0000000..cadef08 --- /dev/null +++ b/cmd/exploredns/main.go @@ -0,0 +1,26 @@ +package main + +import ( + "flag" + "fmt" + "os" +) + +func main() { + flag.Usage = func() { + fmt.Fprintf(os.Stderr, "ExploreDNS - DNS reconnaissance and exploration tool\n\n") + fmt.Fprintf(os.Stderr, "Usage:\n") + fmt.Fprintf(os.Stderr, " exploredns [flags] \n\n") + fmt.Fprintf(os.Stderr, "Flags:\n") + flag.PrintDefaults() + } + + flag.Parse() + + if flag.NArg() == 0 { + flag.Usage() + os.Exit(1) + } + + fmt.Printf("ExploreDNS - exploring: %s\n", flag.Arg(0)) +} diff --git a/internal/config/config.go b/internal/config/config.go new file mode 100644 index 0000000..d912156 --- /dev/null +++ b/internal/config/config.go @@ -0,0 +1 @@ +package config diff --git a/internal/dns/dns.go b/internal/dns/dns.go new file mode 100644 index 0000000..1ffe03d --- /dev/null +++ b/internal/dns/dns.go @@ -0,0 +1 @@ +package dns diff --git a/internal/fingerprint/fingerprint.go b/internal/fingerprint/fingerprint.go new file mode 100644 index 0000000..f1b53d1 --- /dev/null +++ b/internal/fingerprint/fingerprint.go @@ -0,0 +1 @@ +package fingerprint diff --git a/internal/output/output.go b/internal/output/output.go new file mode 100644 index 0000000..ad89311 --- /dev/null +++ b/internal/output/output.go @@ -0,0 +1 @@ +package output diff --git a/internal/traverse/traverse.go b/internal/traverse/traverse.go new file mode 100644 index 0000000..5550fe0 --- /dev/null +++ b/internal/traverse/traverse.go @@ -0,0 +1 @@ +package traverse