Skip to content

Comments

Adding missing response json tags#213

Merged
ehsandeep merged 3 commits intodevfrom
bugfix-212-json-tag
Nov 9, 2023
Merged

Adding missing response json tags#213
ehsandeep merged 3 commits intodevfrom
bugfix-212-json-tag

Conversation

@Mzack9999
Copy link
Member

@Mzack9999 Mzack9999 commented Nov 9, 2023

Closes #212

$ go run . -a AS15169

   ___   _____  __              
  / _ | / __/ |/ /_ _  ___ ____ 
 / __ |_\ \/    /  ' \/ _  / _ \
/_/ |_/___/_/|_/_/_/_/\_,_/ .__/
                         /_/ 

                projectdiscovery.io

[INF] Current asnmap version v1.0.5 (latest)
8.8.4.0/24
...

@Mzack9999 Mzack9999 added the Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors. label Nov 9, 2023
@Mzack9999 Mzack9999 linked an issue Nov 9, 2023 that may be closed by this pull request
@tarunKoyalwar tarunKoyalwar marked this pull request as ready for review November 9, 2023 13:58
Copy link
Member

@tarunKoyalwar tarunKoyalwar left a comment

Choose a reason for hiding this comment

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

lgtm !

before

$ go run . -a AS15169

   ___   _____  __              
  / _ | / __/ |/ /_ _  ___ ____ 
 / __ |_\ \/    /  ' \/ _  / _ \
/_/ |_/___/_/|_/_/_/_/\_,_/ .__/
                         /_/ 

		projectdiscovery.io

[INF] Current asnmap version v1.0.5 (latest)
panic: runtime error: index out of range [15] with length 0

goroutine 1 [running]:
github.com/projectdiscovery/mapcidr.ipNetToRange({{0x0, 0x0, 0x0}, {0x1400023c6b0, 0x10, 0x10}})
	/Users/tarun/go/pkg/mod/github.com/projectdiscovery/[email protected]/ip.go:289 +0x498
github.com/projectdiscovery/mapcidr.partitionCIDR({{0x1400023c640, 0x10, 0x10}, {0x1400023c650, 0x10, 0x10}}, {{0x0, 0x0, 0x0}, {0x1400023c6b0, ...}})
	/Users/tarun/go/pkg/mod/github.com/projectdiscovery/[email protected]/ip.go:622 +0x178
github.com/projectdiscovery/mapcidr.rangeToCIDRs({0x0, 0x0, 0x0}, {0x0, 0x0, 0x0})
	/Users/tarun/go/pkg/mod/github.com/projectdiscovery/[email protected]/ip.go:599 +0x548
github.com/projectdiscovery/mapcidr.GetCIDRFromIPRange({0x0, 0x0, 0x0}, {0x0, 0x0, 0x0})
	/Users/tarun/go/pkg/mod/github.com/projectdiscovery/[email protected]/ip.go:1058 +0xe0
github.com/projectdiscovery/asnmap/libs.GetCIDR({0x140003b0000, 0xb8, 0x10?})
	/Users/tarun/Codebase/asnmap/libs/cidr.go:12 +0x180
github.com/projectdiscovery/asnmap/runner.(*Runner).writeOutput(0x140003912a8, {0x140003b0000?, 0x14000

after

$ go run . -a AS15169 | head

   ___   _____  __              
  / _ | / __/ |/ /_ _  ___ ____ 
 / __ |_\ \/    /  ' \/ _  / _ \
/_/ |_/___/_/|_/_/_/_/\_,_/ .__/
                         /_/ 

		projectdiscovery.io

[INF] Current asnmap version v1.0.5 (latest)
8.8.4.0/24
8.8.8.0/24
8.35.200.0/21
34.0.48.0/20
34.0.96.0/19
34.0.128.0/18
34.0.192.0/19
34.0.224.0/22
34.0.240.0/20
34.1.16.0/20

@ehsandeep ehsandeep merged commit e9585f7 into dev Nov 9, 2023
@ehsandeep ehsandeep deleted the bugfix-212-json-tag branch November 9, 2023 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

panic: runtime error: index out of range [15] with length 0

3 participants