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

Distinguish between HTTP and HTTPS response #15

Closed
stanley101music opened this issue Nov 24, 2023 · 5 comments
Closed

Distinguish between HTTP and HTTPS response #15

stanley101music opened this issue Nov 24, 2023 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@stanley101music
Copy link

stanley101music commented Nov 24, 2023

Is your feature request related to a problem? Please describe.
When checking headers for HTTP and HTTPS the output file has the same name, thus overwriting the result of another one.
Also, the result of the header should stick to the given URL. Currently, humble will follow the redirection or get the response headers using HTTPS even when HTTP schema is specified

Describe the solution you'd like
Provide an option for specifying the output file name.
I've seen the previous issue #5 and it's solution. However, I think it'll be more flexible to allow others to choose their own filename instead of adding the new attribute to the original filename.

Provide an option for the user to choose whether automatic redirection is necessary.

@rfc-st rfc-st self-assigned this Nov 24, 2023
@rfc-st rfc-st added the enhancement New feature or request label Nov 24, 2023
rfc-st added a commit that referenced this issue Nov 24, 2023
- If this new parameter is omitted, the last redirected URL will be analyzed (default behavior).
- Added a note at the beginning of the analysis result, indicating that it has been expressly indicated not to follow redirects.
- Added URL scheme to the exported file name; and removed the "headers" literal.
#15
@rfc-st
Copy link
Owner

rfc-st commented Nov 24, 2023

Hello again @stanley101music,

Thanks for your contributions, as always. Please take a look at this commit: 92664d1

  • I have modified the name of the file where the results are exported, including in it the URL scheme; ex. "https_www.spacex.com_20231124.json" (I have removed the literal 'headers').

  • I have included a new parameter, '-df', which indicates that no redirects will be followed: the URL indicated will be exactly the one analyzed.

  • I have included a note in the first section of the results ("[0. Info]" section) when this new parameter is provided.

Please check it. I think that, except for your suggestion to define a custom name in the result export file (I prefer, for now, to keep it that way) it would be all done.

Thanks and have a nice weekend!

Best regards,

@stanley101music
Copy link
Author

Hi @rfc-st,

Thanks for your prompt response as always.
I have tested the latest version, and it works very well.
One more thing that might need to be considered is that there might be different ports open on the same website with identical schema, e.g., cloudflare.com uses 80 and 8080 ports with HTTP. In this case, the output file will have the same issue as overwriting each other. Perhaps the port attribute can also be added to the filename.

Best regards,

@rfc-st
Copy link
Owner

rfc-st commented Nov 24, 2023

Hello,

Hum ... interesting. I'll take a look tomorrow.

Thanks!

@rfc-st
Copy link
Owner

rfc-st commented Nov 25, 2023

Hi @stanley101music,

Please take a look at this commit: 4bf057b

.- Now, if a port is specified in the URL to be analyzed, the export filename will include it.
E.g., for the URL https://www.spacex.com:443, the filename would be https_www.spacex.com_443_20231125.html.

Please check it and confirm that with this change I can close this issue.

Thank you!

@stanley101music
Copy link
Author

Hi @rfc-st ,

I've checked with the commit.
Everything works well, and the result won't overwrite each other.

Thanks for the enhancement, the issue can now be closed.

Best regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants