Merge pull request #56 from H4xl0r/master

Https Block fix / support Https destinations
pull/63/head
Marc 2019-04-09 21:39:27 +01:00 committed by GitHub
commit a482f64dcc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 3 deletions

View File

@ -575,6 +575,8 @@ class EvilPortal extends Module
exec("iptables -A INPUT -s 172.16.42.1 -j ACCEPT");
exec("iptables -A OUTPUT -s 172.16.42.1 -j ACCEPT");
//Block https till login
exec("iptables -t nat -A PREROUTING -i br-lan -p tcp --dport 443 -j DNAT --to-destination 172.16.42.1:80");
//exec("iptables -A INPUT -i br-lan -p tcp --dport 443 -j DROP");
//exec("iptables -t nat -A PREROUTING -i br-lan -j DROP");
@ -610,6 +612,7 @@ class EvilPortal extends Module
}
exec("iptables -t nat -D PREROUTING -i br-lan -p tcp --dport 80 -j DNAT --to-destination 172.16.42.1:80");
exec("iptables -t nat -D PREROUTING -i br-lan -p tcp --dport 443 -j DNAT --to-destination 172.16.42.1:80"); //enable https again
exec("iptables -D INPUT -p tcp --dport 53 -j ACCEPT");
exec("iptables -D INPUT -j DROP");

View File

@ -1,5 +1,5 @@
<?php
$destination = "http://" . $_SERVER['HTTP_HOST'] . $_SERVER['HTTP_URI'] . "";
$destination = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
require_once('helper.php');
?>

View File

@ -6,5 +6,5 @@
"tetra"
],
"title": "Evil Portal",
"version": "3.1"
}
"version": "3.2"
}