-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
66 lines (47 loc) · 1.04 KB
/
index.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<html>
<head>
<meta http-equiv="refresh" content="60">
</head>
<body>
<h1>PGP-PermanentParty</h1>
<?
/*
* PGP-PermanentParty was deployed during
* NinuxDay09 http://wiki.ninux.org/NinuxDay2009en
*
* Copyright (C) 2009 Claudio Mignanti
*
*/
if (isset($_POST["uid"])) {
//check uid
if ( ereg("[A-F0-9]{8}", $_POST["uid"])) {
$ret = fopen("./chiavi", "a+");
fwrite ($ret, $_POST["uid"] ."\n");
fclose ($ret);
echo "<p>uid ". $_POST["uid"] ." added!</p><br>";
} else {
echo "not a valid uid key";
}
}
?>
<form method="post">
Insert your uid key:<input type="text" name="uid">
<input type="submit" value="Add me!">
</form>
<?
// open a file
if ( file_exists("ninux.org.png") ) {
$fp = fopen("ninux.org.png", "r");
$fstat = fstat($fp);
// close the file
fclose($fp);
echo "Last <a href=\"http://en.wikipedia.org/wiki/Web_of_trust\">wot</a>
update ". date( "r", $fstat["mtime"] ) ."<br>";
echo '<br>
<img src="./ninux.org.png">
<br>';
}
?>
<small>Deployed by Claudio Mignanti for NinuxDay09</small>
</body>
</html>