I am trying to distuingish two cases:
one is when I am behind (no access) a public wifi hotspot that requires a licence thing.
two is when I am past it.
Now the local firewall of that wifi hotspot disallows everything but 80 and 443, and redirects every request for those ports to its own authentication servers.
Meaning, if I "nc -z $host 80" I always get a success because it simply redirects me to itself. Pings don't work.
I mean currently I can probably check my routing table to see if it agrees with the local wifi that I am talking about. But that is a not very general approach. I would have to check the default route but that doesn't tell me whether I am past the firewall or not. Past the router/gateway or not.
I can retrieve a random webpage that I know for sure should have a certain content, such as certain identification strings. But a problematic thing is that the thing often bugs out and starts endlessly redirecting me.
A random web page retrieval would then either retrieve something fishy (uncongruent with my request) or I get a redirect loop which in this case indicates the same condition.
Alright thanks for reading. I have been able to concoct something within a minute or 10. Regular bash scripting this time without fancy conditionals. Makes coding a dozen of times faster. Makes it possible to actually know what you're doing and read what you're writing ;-).
Going to try it again, hope my links come back. Cya.
one is when I am behind (no access) a public wifi hotspot that requires a licence thing.
two is when I am past it.
Now the local firewall of that wifi hotspot disallows everything but 80 and 443, and redirects every request for those ports to its own authentication servers.
Meaning, if I "nc -z $host 80" I always get a success because it simply redirects me to itself. Pings don't work.
I mean currently I can probably check my routing table to see if it agrees with the local wifi that I am talking about. But that is a not very general approach. I would have to check the default route but that doesn't tell me whether I am past the firewall or not. Past the router/gateway or not.
I can retrieve a random webpage that I know for sure should have a certain content, such as certain identification strings. But a problematic thing is that the thing often bugs out and starts endlessly redirecting me.
A random web page retrieval would then either retrieve something fishy (uncongruent with my request) or I get a redirect loop which in this case indicates the same condition.
Alright thanks for reading. I have been able to concoct something within a minute or 10. Regular bash scripting this time without fancy conditionals. Makes coding a dozen of times faster. Makes it possible to actually know what you're doing and read what you're writing ;-).
Going to try it again, hope my links come back. Cya.
Comment