From 5fd3ce70bfb225f2396ceac2e26a12f87c979489 Mon Sep 17 00:00:00 2001 From: Sandeep Singh Date: Mon, 4 Mar 2024 13:53:13 +0530 Subject: [PATCH] docker build + go mod fix + no color env support (#595) --- Dockerfile | 2 +- go.mod | 2 -- internal/runner/banner.go | 2 +- internal/runner/runner.go | 4 ++++ 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 332ea102..53fcfdac 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Base -FROM golang:1.20.5-alpine AS builder +FROM golang:1.21.4-alpine AS builder RUN apk add --no-cache build-base WORKDIR /app diff --git a/go.mod b/go.mod index c4e2c041..dcc39ef5 100644 --- a/go.mod +++ b/go.mod @@ -2,8 +2,6 @@ module github.com/projectdiscovery/dnsx go 1.21 -replace github.com/projectdiscovery/asnmap v1.0.6 => github.com/projectdiscovery/asnmap v1.0.2-0.20240226223956-a41995ab9075 - require ( github.com/logrusorgru/aurora v2.0.3+incompatible github.com/miekg/dns v1.1.56 diff --git a/internal/runner/banner.go b/internal/runner/banner.go index 0cd14aab..22533095 100644 --- a/internal/runner/banner.go +++ b/internal/runner/banner.go @@ -18,7 +18,7 @@ const banner = ` const ToolName = `dnsx` // version is the current version of dnsx -const version = `1.2.0` +const version = `1.2.1` // showBanner is used to show the banner to the user func showBanner() { diff --git a/internal/runner/runner.go b/internal/runner/runner.go index b8598e76..09f16160 100644 --- a/internal/runner/runner.go +++ b/internal/runner/runner.go @@ -142,6 +142,10 @@ func New(options *Options) (*Runner, error) { } } + if os.Getenv("NO_COLOR") == "true" { + options.NoColor = true + } + r := Runner{ options: options, dnsx: dnsX,