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

Fixed Panic and added support for printing errors - AssociatedIPs #9

Merged
merged 5 commits into from
Mar 25, 2022

Conversation

jordanpotti
Copy link
Contributor

When running the associated IP's command, if your SecurityTrails subscription didn't support that feature, this tool crashed. I pulled a fix from commit #79fcb965aec519c6e4dba0b9d630eab189cfa913 and place it in associatedips.go.

I also added support in utilities.go to grab the response code to be used for validating that the request was valid (response 200).

I also added a defer to close the http request once we are done with it.

Added checking for HTTP response status code
Added check to prevent a panic (pulled from subdomains.go). Also added printing of the error message so that the tool doesn't silently fail.
@jordanpotti
Copy link
Contributor Author

Initial behavior:
image

Behavior after fix:

image

@hakluke hakluke merged commit 7e82732 into hakluke:main Mar 25, 2022
@hakluke
Copy link
Owner

hakluke commented Mar 25, 2022

Nice one thank you!

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.

2 participants