-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdemo_dns.html
72 lines (61 loc) · 2.4 KB
/
demo_dns.html
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
63
64
65
66
67
68
69
70
71
72
<html><!-- Demo with two agents -->
<head>
<link rel="StyleSheet" href="styles.css" type="text/css">
<script language="javascript" src="jquery-1.2.6.js"></script>
<script language="javascript" src="sha1.js"></script>
<script language="javascript" src="demo_helpers.js"></script>
<script language="javascript" src="response.js"></script>
<script language="javascript" src="agent.js"></script>
<script language="javascript" src="proto_dns.js"></script>
<script language="javascript" src="proto_sha1hash.js"></script>
<script language="javascript" src="classes.js"></script>
</head>
<body>
<div id="sample" style="display: none">
<p class="a">src</p>
</div>
<div id="area">
</div>
<div id="log">
</div>
<script type="text/javascript"><!--
// Simulates abstract mapping from scalar address space to objects
var address_map = {
};
// Populate address space
address_map[1] = new Agent( 1, address_map, [ 2 ] );
address_map[1].add_content( '<html>Including important message: ' +
'<iframe src="x-sha1hash:e02aa1b106d5c7c6a98def2b13005d5b84fd8dc8">' );
address_map[1].dump();
address_map[2] = new Agent( 2, address_map, [ 1 ] );
address_map[2].add_content( 'Hello, world' );
address_map[2].dump();
address_map['DR1'] = new Agent( "DR1", address_map, [] );
address_map['DR1'].dump();
address_map['DR2'] = new Agent( "DR2", address_map, [] );
address_map['DR2'].dump();
address_map[1].SHOW( "x-dns:vasya.tld.?class=IN&type=A");
address_map[1].SHOW( "x-dns:vasya.tld.");
address_map[1].SHOW( "x-dns:nonexisting.tld.");
address_map[1].SHOW( "x-dns:unreachable.other_tld.");
log( '--- Playing with 2' );
address_map[2].SHOW( "x-sha1hash:e02aa1b106d5c7c6a98def2b13005d5b84fd8dc8" );
/*
log( '--- Playing with 2' );
address_map[2].SHOW( "x-sha1hash:e02aa1b106d5c7c6a98def2b13005d5b84fd8dc8" );
address_map[2].SHOW( "x-sha1hash:e02aa1b106d5c7c6a98def2b13005d5b84fd8dc9" );
log( '--- Playing with 1' );
address_map[1].SHOW( "x-sha1hash:e02aa1b106d5c7c6a98def2b13005d5b84fd8dc8" );
address_map[1].SHOW( "x-sha1hash:e02aa1b106d5c7c6a98def2b13005d5b84fd8dc9" );
log( '--- Hit using 1' );
address_map[1].SHOW( "x-sha1hash:e02aa1b106d5c7c6a98def2b13005d5b84fd8dc8" );
log( '--- Dumping final state' );
address_map[1].dump();
address_map[2].dump();
log( '--- Complex structure retrieval with 1' );
address_map[1].SHOW( "x-sha1hash:a34bad256859ebdeda3608a0726544d5d00730d9" );
*/
//-->
</script>
</body>
</html>