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

Option to follow redirects #110

Open
kpcyrd opened this issue Jul 16, 2019 · 2 comments
Open

Option to follow redirects #110

kpcyrd opened this issue Jul 16, 2019 · 2 comments

Comments

@kpcyrd
Copy link
Owner

kpcyrd commented Jul 16, 2019

There should be a way to automatically resolve redirects, like

req = http_request(session, 'GET', 'https://example.com', {
    follow_redirects=true,
})
@kpcyrd kpcyrd changed the title Optin to follow redirects Option to follow redirects Jul 16, 2019
@0x646e78
Copy link

0x646e78 commented May 25, 2020

I was about to open an issue re redirects, an example here is after running url-scan 30x's has identified an https:// URL (sandbox.), which has not been added to the urls table.

[sn0int][test][kpcyrd/url-scan] > select urls
#1, "http://example.com/" (301 => "https://example.com")
#2, "https://example.com/" (200)
#3, "http://www.example.com/" (301 => "http://example.com/")
#4, "https://www.example.com/" (301 => "https://example.com/")
#5, "http://sandbox.example.com/" (301 => "https://sandbox.example.com/")

@kpcyrd
Copy link
Owner Author

kpcyrd commented Jun 6, 2020

hmm, url-scan is supposed to find the https:// variant (not by following redirects, but because it's supposed to try both http:// and https://. I'm suspecting either the certificate was invalid (which can't be disabled yet, unfortunately) or the tls library used didn't like the configuration of the server (which is a more elaborate issue to tackle). You can try to get a more specific error like this:

% sn0int repl
:: sn0int v0.18.2 lua repl
Assign variables with `a = sn0int_version()` and `return a` to print
Read the docs at https://sn0int.readthedocs.io/en/stable/reference.html

> session = http_mksession()
> r = http_request(session, 'GET', 'https://example.com', {})
> r = http_send(r)
> return r['status']
200.0
> 

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

No branches or pull requests

2 participants