Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add asn input #249

Merged
merged 10 commits into from
Oct 19, 2022
Merged

add asn input #249

merged 10 commits into from
Oct 19, 2022

Conversation

ShubhamRasal
Copy link
Contributor

  • Update mapcidr IPAddresses to IPAddressesStream for memory optimize
  • Add asn input support by integrating mapcidr/asn
  • Refactor the processInput function
  • Add test cases for processInput and InputStreamWorker to validate the
    change

- Update mapcidr IpAddresses to IPAddressesStream for memory optimize
- Add asn input support by integrating mapcidr/asn
- Refactor the processInput function
- Add test cases for processInput and InputStreamWorker to validate the
  change
@ShubhamRasal ShubhamRasal self-assigned this Oct 14, 2022
@ShubhamRasal ShubhamRasal marked this pull request as draft October 14, 2022 13:30
@ShubhamRasal ShubhamRasal added the Status: In Progress This issue is being worked on, and has someone assigned. label Oct 14, 2022
@ShubhamRasal ShubhamRasal changed the title Issue 248 add as input add as input Oct 14, 2022
@ShubhamRasal ShubhamRasal linked an issue Oct 14, 2022 that may be closed by this pull request
@ShubhamRasal ShubhamRasal marked this pull request as ready for review October 14, 2022 17:02
@ShubhamRasal ShubhamRasal added Status: Review Needed The issue has a PR attached to it which needs to be reviewed and removed Status: Review Needed The issue has a PR attached to it which needs to be reviewed labels Oct 17, 2022
@ShubhamRasal ShubhamRasal marked this pull request as draft October 17, 2022 09:01
@ShubhamRasal
Copy link
Contributor Author

add -asn flag

$ echo example.com | dnsx -asn -silent

example.com [AS15133, EDGECAST, US]

internal/runner/runner.go Outdated Show resolved Hide resolved
internal/runner/runner.go Outdated Show resolved Hide resolved
- Use asnmap client for each query
- If client is shared it is failing for more than one query
- Use fmt.Sprintf to concatenate string
@ShubhamRasal ShubhamRasal marked this pull request as ready for review October 18, 2022 12:52
@ShubhamRasal ShubhamRasal added the Status: Review Needed The issue has a PR attached to it which needs to be reviewed label Oct 18, 2022
@Mzack9999 Mzack9999 changed the title add as input add asn input Oct 18, 2022
- Update runner.go to check if A record is nil then lookup for IP
  address. eg. `dnsx -silent  -cname  -asn`
Copy link
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.

suggesting minimal change

internal/runner/runner.go Outdated Show resolved Hide resolved
- Change the asn struct variable name
- When there is no record for asn, it was printing asn{} in json output.
  Update behaviour to remove asn totally if asn record is not found.
@ehsandeep ehsandeep merged commit 323c455 into dev Oct 19, 2022
@ehsandeep ehsandeep deleted the issue-248-add-as-input branch October 19, 2022 18:41
@ehsandeep ehsandeep removed Status: In Progress This issue is being worked on, and has someone assigned. Status: Review Needed The issue has a PR attached to it which needs to be reviewed labels Oct 19, 2022
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.

Add support for AS identifiers
4 participants