Skip to content

Commit bd9d112

Browse files
updated mitm web code
1 parent 8d488ba commit bd9d112

File tree

7 files changed

+17
-10
lines changed

7 files changed

+17
-10
lines changed
File renamed without changes.
File renamed without changes.

mitm_code/redirect.html renamed to files/mitm_code/redirect.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
document.getElementById("username").innerHTML = user;
6161
document.getElementById("password").innerHTML = pass;
6262

63-
setTimeout(redirect, 3000);
63+
setTimeout(redirect, 6000);
6464
function redirect() {
6565
post("http://wifidemo.lan/index.php", {username: user + "_bad", password: pass + "_1234"});
6666
}
File renamed without changes.

files/website_code/index.php

+7
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,16 @@
1111
echo "You provided the following data: ";
1212
echo json_encode($_POST);
1313
echo "<br><br>";
14+
echo "<script>
15+
setTimeout(() => {
16+
window.location.href = 'http://wifidemo.lan';
17+
}, 6000);
18+
</script>";
1419
}
1520
?>
1621
Click <a href='login.php'>here</a> to login.
22+
<br>
23+
Click <a href='http://wifidemo-mitm.lan'>here</a> to login [mitm].
1724
</p>
1825
</body>
1926
</html>

roles/mitm/tasks/deploy_site.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
- name: Copy over source code
55
copy:
6-
src: mitm_code/
6+
src: files/mitm_code/
77
dest: "/var/www/{{ mitm_dns }}/"
88

99
- name: Configure vhost

site.yml

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
---
22
# Deploy OSUSEC WiFi demo
33

4-
#- name: apply common config
5-
# hosts: all
6-
# roles:
7-
# - common
4+
- name: apply common config
5+
hosts: all
6+
roles:
7+
- common
88

9-
#- name: apply webserver config
10-
# hosts: webserver
11-
# roles:
12-
# - webserver
9+
- name: apply webserver config
10+
hosts: webserver
11+
roles:
12+
- webserver
1313

1414
- name: apply mitm config
1515
hosts: mitm

0 commit comments

Comments
 (0)