Subversion Repositories uuid_mac_utils

Rev

Rev 2 | Rev 12 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
7 daniel-mar 1
<!DOCTYPE html>
2 daniel-mar 2
<html>
3
 
4
<head>
5
        <meta charset="iso-8859-1">
6
        <link rel="stylesheet" type="text/css" href="style.css">
7
        <title>UUID &amp; MAC Utils by Daniel Marschall</title>
8
</head>
9
 
10
<body>
11
 
12
<h1>UUID &amp; MAC Utils by Daniel Marschall</h1>
13
 
14
<p><a href="https://svn.viathinksoft.com/cgi-bin/viewvc.cgi/uuid_mac_utils/">View the source code</a></p>
15
 
16
<h2>Generate an UUID (according to RFC 4122)</h2>
17
 
18
<h3>Generate time based (version 1) UUID</h3>
19
 
20
<form method="GET" action="interprete_uuid.php">
21
        <input type="hidden" name="version" value="1">
22
        <input type="hidden" name="uuid" value="CREATE"> <input type="submit" value="Create an UUID">
23
</form>
24
 
25
<h3>Generate DCE Security (version 2) UUID</h3>
26
 
27
<p><font color="red">Attention: The uniqueness of these UUIDs is not guaranteed! The use of this UUID version is not recommended!</font></p>
28
 
29
<form method="GET" action="interprete_uuid.php">
30
        <input type="hidden" name="version" value="2">
31
        Domain (8 bits): <select name="domain_choose" id="dce_domain_choice" onchange="javascript:dce_domain_choose();">
32
                <option value="uid">POSIX UID</option>
33
                <option value="gid">POSIX GID</option>
34
                <option value="org">Org</option>
35
                <option value="site">Site-defined</option>
36
        </select> <input type="text" name="dce_domain" value="" id="dce_domain" style="width:50px"> (decimal notation)<br>
37
        Value (32 bits): <input type="text" name="dce_id" value="0" id="dce_id" style="width:200px"> (decimal notation)<br><br>
38
        <input type="hidden" name="uuid" value="CREATE"> <input type="submit" value="Create UUID">
39
</form>
40
<script>
41
function dce_domain_choose() {
42
        var ns = document.getElementById('dce_domain_choice').value;
43
        if (ns == "uid") {
44
                document.getElementById('dce_domain').value = "0";
45
        }
46
        if (ns == "gid") {
47
                document.getElementById('dce_domain').value = "1";
48
        }
49
        if (ns == "org") {
50
                document.getElementById('dce_domain').value = "2";
51
        }
52
        if (ns == "site") {
53
                document.getElementById('dce_domain').value = "";
54
        }
55
}
56
dce_domain_choose();
57
</script>
58
 
59
<h3>Generate name based (version 3/5) UUID</h3>
60
 
61
<form method="GET" action="interprete_uuid.php">
62
        Hash: <select name="version">
63
                <option value="3">MD5 (version 3 UUID)</option>
64
                <option value="5">SHA1 (version 5 UUID)</option>
65
        </select><br>
66
        Namespace: <select name="namespace_choose" id="nb_nsc" onchange="javascript:nb_ns_choose();">
67
                <option value="dns">DNS</option>
68
                <option value="url">URL</option>
69
                <option value="oid">OID</option>
70
                <option value="x500">X.500 DN</option>
71
                <option value="oidplus_ns">OIDplus 1.x ns only</option>
72
                <option value="oidplus_ns_val">OIDplus 1.x ns+val</option>
73
                <option value="other">Other</option>
74
        </select> <input type="text" name="nb_ns" value="" id="nb_ns" style="width:300px"><br>
75
        Value: <input type="text" name="nb_val" value="" id="nb_val" style="width:300px"><br><br>
76
        <input type="hidden" name="uuid" value="CREATE"> <input type="submit" value="Create UUID">
77
</form>
78
<script>
79
function nb_ns_choose() {
80
        var ns = document.getElementById('nb_nsc').value;
81
        if (ns == "dns") {
82
                document.getElementById('nb_ns').value = "6ba7b810-9dad-11d1-80b4-00c04fd430c8";
83
                document.getElementById('nb_val').value = "www.example.org";
84
        }
85
        if (ns == "url") {
86
                document.getElementById('nb_ns').value = "6ba7b811-9dad-11d1-80b4-00c04fd430c8";
87
                document.getElementById('nb_val').value = "http://www.example.org/";
88
        }
89
        if (ns == "oid") {
90
                document.getElementById('nb_ns').value = "6ba7b812-9dad-11d1-80b4-00c04fd430c8";
91
                document.getElementById('nb_val').value = "2.999";
92
        }
93
        if (ns == "x500") {
94
                document.getElementById('nb_ns').value = "6ba7b814-9dad-11d1-80b4-00c04fd430c8";
95
                document.getElementById('nb_val').value = "UID=jsmith,DC=example,DC=net";
96
        }
97
        if (ns == "oidplus_ns") {
98
                document.getElementById('nb_ns').value = "0943e3ce-4b79-11e5-b742-78e3b5fc7f22";
99
                document.getElementById('nb_val').value = "ipv4";
100
        }
101
        if (ns == "oidplus_ns_val") {
102
                document.getElementById('nb_ns').value = "ad1654e6-7e15-11e4-9ef6-78e3b5fc7f22";
103
                document.getElementById('nb_val').value = "ipv4:8.8.8.8";
104
        }
105
        if (ns == "other") {
106
                document.getElementById('nb_ns').value = "";
107
                document.getElementById('nb_val').value = "";
108
        }
109
}
110
nb_ns_choose();
111
</script>
112
 
113
<h3>Generate random (version 4) UUID</h3>
114
 
115
<form method="GET" action="interprete_uuid.php">
116
        <input type="hidden" name="version" value="4">
117
        <input type="hidden" name="uuid" value="CREATE"> <input type="submit" value="Create an UUID">
118
</form>
119
 
120
<h2>Interprete an UUID</h2>
121
 
122
<p>You can enter an UUID in the following notations:</p>
123
 
124
<ul>
125
        <li>Classic notation (case insensitive, curly braces optional): <code>9e83839a-5967-11e4-8c1c-78e3b5fc7f22</code></li>
126
        <li>As OID: <code>2.25.210700883446948645633376489934419689250</code></li>
127
</ul>
128
 
129
<p>The script will output:</p>
130
 
131
<ul>
132
        <li>Notation as UUID and OID</li>
133
        <li>Version, variant and additional data (date and time, clock seq, node id etc.)</li>
134
</ul>
135
 
136
<p>Please enter an UUID or UUID OID:</p>
137
 
138
<form method="GET" action="interprete_uuid.php">
139
        <input type="text" name="uuid" value="" style="width:500px"> <input type="submit" value="Go">
140
</form>
141
 
142
<h2>Interprete a MAC address</h2>
143
 
144
<p>You can enter an UUID in the following notations:</p>
145
 
146
<ul>
147
        <li><code>AA-BB-CC-DD-EE-FF</code></li>
148
        <li><code>AA:BB:CC:DD:EE:FF</code></li>
149
        <li><code>AABBCC.DDEEFF</code> (case insensitive)</li>
150
</ul>
151
 
152
<p>The script will output:</p>
153
 
154
<ul>
155
        <li>Information about the I/G and U/L flags.</li>
156
        <li>Information about the entry in the IEEE registry, if available.</li>
157
        <li>Information about the registrant, if available.</li>
158
</ul>
159
 
160
<p>Please enter a MAC address:</p>
161
 
162
<form method="GET" action="interprete_mac.php">
163
        <input type="text" name="mac" value=""> <input type="submit" value="Go">
164
</form>
165
 
166
</body>
167
 
168
</html>