Skip to content

DNS feature and refactoring for V2#205

Merged
ravlio merged 7 commits intomainfrom
CLOUD-1121-commands
Nov 6, 2023
Merged

DNS feature and refactoring for V2#205
ravlio merged 7 commits intomainfrom
CLOUD-1121-commands

Conversation

@ravlio
Copy link
Copy Markdown
Contributor

@ravlio ravlio commented Oct 26, 2023

Proposed changes

  • Add DNS lookup
  • Change commands (breaking change)
  • Tests

@ravlio ravlio requested a review from dogancanbakir October 26, 2023 14:49
@Mzack9999 Mzack9999 marked this pull request as draft October 30, 2023 08:20
@ravlio ravlio changed the title refactor DNS feature and refactoring for V2 Oct 30, 2023
@ravlio ravlio marked this pull request as ready for review October 30, 2023 14:55
Copy link
Copy Markdown
Member

@dogancanbakir dogancanbakir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM; left comments for further improvement -optional

}
}

if opts.hasStdin() || opts.DomainsFile != "" {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optional: we can make it more readable this way:

if opts.Domain != "" || opts.hasStdin() || opts.DomainsFile != "" {
		domains := GetDomains(...)
		for _, domain := range domains {
			processDomain(domain)
		}
	}

Copy link
Copy Markdown
Member

@Mzack9999 Mzack9999 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!
Listing few possible optimizations:

  • Deduping same values in record types (eg via sliceutil.dedupe(..)
  • Validate the record types we accept (for example the following command accepts cc as record type
$ go run . dns projectdiscovery.io -t a,soa,cc,dd
...
{
  "soa": [
    "alexandra.ns.cloudflare.com",
    "alexandra.ns.cloudflare.com",
...
    "alexandra.ns.cloudflare.com",
    "alexandra.ns.cloudflare.com",
    "alexandra.ns.cloudflare.com"
  ]
}

@ravlio ravlio merged commit 610a5d4 into main Nov 6, 2023
@ravlio ravlio deleted the CLOUD-1121-commands branch November 7, 2023 12:57
ravlio added a commit that referenced this pull request Nov 7, 2023
ehsandeep pushed a commit that referenced this pull request Nov 7, 2023
ehsandeep added a commit that referenced this pull request Apr 22, 2024
* Update link for invites

* DNS feature and refactoring for V2 (#205)

* subdomains
* dns

* Revert "DNS feature and refactoring for V2 (#205)" (#206)

This reverts commit 610a5d4.

* Update README.md

* workflow updates

* template update

---------

Co-authored-by: Brendan O'Leary <github@olearycrew.com>
Co-authored-by: Mzack9999 <mzack9999@protonmail.com>
Co-authored-by: Maxim Bogdanov <muravlion@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants