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

Issue 495 ASN support #562

Merged
merged 6 commits into from
Apr 7, 2022
Merged

Issue 495 ASN support #562

merged 6 commits into from
Apr 7, 2022

Conversation

LuitelSamikshya
Copy link
Contributor

@LuitelSamikshya LuitelSamikshya commented Apr 1, 2022

This PR adds ASN support.

chaos -d tesla.com | ./httpx -asn

    __    __  __       _  __
   / /_  / /_/ /_____ | |/ /
  / __ \/ __/ __/ __ \|   /
 / / / / /_/ /_/ /_/ /   |
/_/ /_/\__/\__/ .___/_/|_|
             /_/              v1.2.1-dev

		projectdiscovery.io

Use with caution. You are responsible for your actions.
Developers assume no liability and are not responsible for any misuse or damage.
http://autodiscover.tesla.com [AS8075, MICROSOFT-CORP-MSN-AS-BLOCK, US, 40.96.0.0/13]
https://akamai-apigateway-profileapi.tesla.com [AS16625, AKAMAI-AS, US, 184.29.74.0/23]
https://akamai-apigateway-vehicleextinfogw-prdsvc-st.tesla.com [AS16625, AKAMAI-AS, US, 184.29.74.0/23]
https://auth-global.tesla.com [AS16625, AKAMAI-AS, US, 184.29.74.0/23]
https://cdns-content.tesla.com [AS16625, AKAMAI-AS, US, 184.29.74.0/23]
https://auth.tesla.com [AS16625, AKAMAI-AS, US, 104.122.0.0/20]
https://apacvpn.tesla.com [AS394161, TESLA, US, 8.244.67.0/24]
https://auth-global-stage.tesla.com [AS16625, AKAMAI-AS, US, 104.122.0.0/20]
https://cdn-design.tesla.com [AS16625, AKAMAI-AS, US, 104.122.0.0/20]
https://digitalassets-energy.tesla.com [AS54113, FASTLY, US, 151.101.0.0/22]
https://apps.tesla.com [AS16625, AKAMAI-AS, US, 184.29.74.0/23]
https://business-ui-ownership.tesla.com [AS16625, AKAMAI-AS, US, 104.122.0.0/20]
https://3.tesla.com [AS16625, AKAMAI-AS, US, 104.122.0.0/20]

@LuitelSamikshya LuitelSamikshya self-assigned this Apr 1, 2022
@LuitelSamikshya LuitelSamikshya linked an issue Apr 1, 2022 that may be closed by this pull request
@LuitelSamikshya LuitelSamikshya added Type: Enhancement Most issues will probably ask for additions or changes. Status: Review Needed The issue has a PR attached to it which needs to be reviewed labels Apr 1, 2022
runner/runner.go Outdated Show resolved Hide resolved
runner/runner.go Outdated Show resolved Hide resolved
@ehsandeep ehsandeep requested a review from Mzack9999 April 5, 2022 14:42
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.

chaos -d tesla.com | ./httpx -asn

    __    __  __       _  __
   / /_  / /_/ /_____ | |/ /
  / __ \/ __/ __/ __ \|   /
 / / / / /_/ /_/ /_/ /   |
/_/ /_/\__/\__/ .___/_/|_|
             /_/              v1.2.1-dev

		projectdiscovery.io

Use with caution. You are responsible for your actions.
Developers assume no liability and are not responsible for any misuse or damage.
http://autodiscover.tesla.com [AS8075, MICROSOFT-CORP-MSN-AS-BLOCK, US, 40.96.0.0/13]
https://akamai-apigateway-profileapi.tesla.com [AS16625, AKAMAI-AS, US, 184.29.74.0/23]
https://akamai-apigateway-vehicleextinfogw-prdsvc-st.tesla.com [AS16625, AKAMAI-AS, US, 184.29.74.0/23]
https://auth-global.tesla.com [AS16625, AKAMAI-AS, US, 184.29.74.0/23]
https://cdns-content.tesla.com [AS16625, AKAMAI-AS, US, 184.29.74.0/23]
https://auth.tesla.com [AS16625, AKAMAI-AS, US, 104.122.0.0/20]
https://apacvpn.tesla.com [AS394161, TESLA, US, 8.244.67.0/24]
https://auth-global-stage.tesla.com [AS16625, AKAMAI-AS, US, 104.122.0.0/20]
https://cdn-design.tesla.com [AS16625, AKAMAI-AS, US, 104.122.0.0/20]
https://digitalassets-energy.tesla.com [AS54113, FASTLY, US, 151.101.0.0/22]
https://apps.tesla.com [AS16625, AKAMAI-AS, US, 184.29.74.0/23]
https://business-ui-ownership.tesla.com [AS16625, AKAMAI-AS, US, 104.122.0.0/20]
https://3.tesla.com [AS16625, AKAMAI-AS, US, 104.122.0.0/20]
[ERR] parse ASN "4812 17621": parse "4812 17621": strconv.Atoi: parsing "4812 17621": invalid syntax
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x20 pc=0x102b1826c]

goroutine 396 [running]:
github.com/projectdiscovery/httpx/runner.(*Runner).analyze(0x1400000d560, 0x1400007d270, {0x102b2c7a4, 0xa}, {0x140009ad0e0, 0xf}, {0x102b1f083, 0x3}, {0x140009ad0e0, 0xf}, ...)
	/Users/geekboy/Github/httpx/runner/runner.go:1138 +0x3fcc
github.com/projectdiscovery/httpx/runner.(*Runner).process.func1(0x14000156940, 0x1400000d560, 0x1400007d270, {0x140009ad0e0, 0xf}, 0x1400000d578, 0x14000164060, {0x140009ad0e0, 0xf}, {0x102b1f083, ...}, ...)
	/Users/geekboy/Github/httpx/runner/runner.go:673 +0xa8
created by github.com/projectdiscovery/httpx/runner.(*Runner).process
	/Users/geekboy/Github/httpx/runner/runner.go:671 +0x624

@Mzack9999
Copy link
Member

Multiple ASNs aren't parsed correctly - Proposed solution at ammario/ipisp#23 (alternatively, forking is an option)

@sonarcloud
Copy link

sonarcloud bot commented Apr 6, 2022

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@ehsandeep ehsandeep merged commit df5f69f into dev Apr 7, 2022
@ehsandeep ehsandeep deleted the issue-495-asn-support branch April 7, 2022 07:12
@ehsandeep ehsandeep added Status: Completed Nothing further to be done with this issue. Awaiting to be closed. and removed Status: Review Needed The issue has a PR attached to it which needs to be reviewed labels Apr 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Completed Nothing further to be done with this issue. Awaiting to be closed. Type: Enhancement Most issues will probably ask for additions or changes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ASN support
3 participants