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 resolver in katana #340

Merged
merged 4 commits into from
Mar 10, 2023
Merged

Add resolver in katana #340

merged 4 commits into from
Mar 10, 2023

Conversation

ShubhamRasal
Copy link
Contributor

@ShubhamRasal ShubhamRasal commented Mar 6, 2023

eg:

sudo ./tinydns -net udp -upstream 8.8.8.8:53
./katana -u https://projectdiscovery.io/ -r 127.0.0.1:53

@ShubhamRasal ShubhamRasal self-assigned this Mar 7, 2023
@ShubhamRasal ShubhamRasal added the Status: Review Needed The issue has a PR attached to it which needs to be reviewed label Mar 7, 2023
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.

@Mzack9999 Mzack9999 self-requested a review March 7, 2023 10:55
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.

The implementation lgtm - Anyway a few notes:

  • Unfortunately we can't do much with native headless navigation, as custom resolver/mapping must be defined at startup time via host-resolver-rules
  • With invalid resolvers, katana keeps working:
$ cat resolver.txt 
10.10.11.10
$ ping 10.10.11.10
PING 10.10.11.10 (10.10.11.10): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2
^C
$ echo http://projectdiscovery.io | go run . -resolvers resolver.txt 
...
https://projectdiscovery.io/
https://projectdiscovery.io/app.bundle.css
https://projectdiscovery.io/app.js

@Mzack9999 Mzack9999 linked an issue Mar 9, 2023 that may be closed by this pull request
Copy link
Member

@ehsandeep ehsandeep left a comment

Choose a reason for hiding this comment

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

./tinydns -net udp -upstream 8.8.8.8:53

[INF] Listening on: udp:127.0.0.1:53
[INF] Received request for: docs.hackerone.com
[INF] Retrieving records for docs.hackerone.com with upstream 1.1.1.1:53.
[INF] Received request for: docs.hackerone.com
[INF] Retrieving records for docs.hackerone.com with upstream 8.8.8.8:53.
[INF] Saving records for docs.hackerone.com in cache.
[INF] Received request for: docs.hackerone.com
[INF] Received request for: docs.hackerone.com
[INF] Using cached record for docs.hackerone.com.
[INF] Received request for: docs.hackerone.com
echo https://www.hackerone.com | ./katana -r 127.0.0.1

   __        __                
  / /_____ _/ /____ ____  ___ _
 /  '_/ _  / __/ _  / _ \/ _  /
/_/\_\\_,_/\__/\_,_/_//_/\_,_/ v0.0.4-dev							 

		projectdiscovery.io

https://www.hackerone.com/events/rsa-conference-2023
https://www.hackerone.com/6th-annual-hacker-powered-security-report
https://www.hackerone.com/attack-resistance-assessment
https://www.hackerone.com/product/attack-surface-management

@ehsandeep
Copy link
Member

Follow up tickets can be created for the above comments if needed.

@ehsandeep ehsandeep merged commit e518dd2 into dev Mar 10, 2023
@ehsandeep ehsandeep deleted the issue-227-add-resolver branch March 10, 2023 09:47
@ehsandeep ehsandeep removed the Status: Review Needed The issue has a PR attached to it which needs to be reviewed label Mar 10, 2023
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.

Custom resolvers input support
3 participants