-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdaemon.c
More file actions
executable file
·497 lines (453 loc) · 23.9 KB
/
Copy pathdaemon.c
File metadata and controls
executable file
·497 lines (453 loc) · 23.9 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
#include "tp.h"
unsigned char *google=(unsigned char*)"\x16\x03\x01\x02\x00\x01\x00\x01\xfc\x03\x03\xc7\x44\x06\xe3\x51" \
"\xff\x5a\x63\x6e\x89\xef\xa9\xda\x83\x29\xa4\x9a\x25\x66\x8e\x5c" \
"\x7a\xfa\x1c\x1f\x0a\x8e\xd3\xb5\xa5\x99\x6b\x00\x00\x7a\xc0\x2b" \
"\xc0\x2f\xc0\x2c\xc0\x30\xc0\x13\xc0\x14\x00\x9c\x00\x9d\x00\x2f" \
"\x00\x35\x00\x0a\xc0\x28\xc0\x24\xc0\x0a\x00\xa5\x00\xa3\x00\xa1" \
"\x00\x9f\x00\x6b\x00\x6a\x00\x69\x00\x68\x00\x39\x00\x38\x00\x37" \
"\x00\x36\xc0\x32\xc0\x2e\xc0\x2a\xc0\x26\xc0\x0f\xc0\x05\x00\x3d" \
"\xc0\x27\xc0\x23\xc0\x09\x00\xa4\x00\xa2\x00\xa0\x00\x9e\x00\x67" \
"\x00\x40\x00\x3f\x00\x3e\x00\x33\x00\x32\x00\x31\x00\x30\xc0\x31" \
"\xc0\x2d\xc0\x29\xc0\x25\xc0\x0e\xc0\x04\x00\x3c\x00\x9a\x00\x99" \
"\x00\x98\x00\x97\x00\x96\x00\xff\x01\x00\x01\x59\x00\x00\x00\x1f" \
"\x00\x1d\x00\x00\x1a\x61\x6e\x64\x72\x6f\x69\x64\x2e\x63\x6c\x69" \
"\x65\x6e\x74\x73\x2e\x67\x6f\x6f\x67\x6c\x65\x2e\x63\x6f\x6d\x00" \
"\x0b\x00\x04\x03\x00\x01\x02\x00\x0a\x00\x1c\x00\x1a\x00\x17\x00" \
"\x19\x00\x1c\x00\x1b\x00\x18\x00\x1a\x00\x16\x00\x0e\x00\x0d\x00" \
"\x0b\x00\x0c\x00\x09\x00\x0a\x00\x23\x00\x00\x00\x0d\x00\x20\x00" \
"\x1e\x06\x01\x06\x02\x06\x03\x05\x01\x05\x02\x05\x03\x04\x01\x04" \
"\x02\x04\x03\x03\x01\x03\x02\x03\x03\x02\x01\x02\x02\x02\x03\x00" \
"\x0f\x00\x01\x01\x00\x15\x00\xdd\x00\x00\x00\x00\x00\x00\x00\x00" \
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" \
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" \
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" \
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" \
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" \
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" \
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" \
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" \
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" \
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" \
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" \
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" \
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" \
"\x00\x00\x00\x00\x00" \
"\x16\x03\x03\x00\x3b\x02\x00\x00\x37\x03\x03\x5b\xe9\x0e\x4e\x57" \
"\x72\x73\x1c\x0d\x8b\x8e\x09\x15\x74\xb4\x10\x8d\xfa\x92\x51\xf1" \
"\xcc\xb6\xf5\x78\x0f\x79\xcc\x79\xb7\x2f\x96\x00\xc0\x2b\x00\x00" \
"\x0f\xff\x01\x00\x01\x00\x00\x0b\x00\x02\x01\x00\x00\x23\x00\x00" \
"\x16\x03\x03\x0c\x38\x0b\x00\x0c\x34\x00\x0c\x31\x00\x07\xcb\x30" \
"\x82\x07\xc7\x30\x82\x06\xaf\xa0\x03\x02\x01\x02\x02\x08\x4b\xc2" \
"\x53\x4c\x6b\x44\x6d\xc5\x30\x0d\x06\x09\x2a\x86\x48\x86\xf7\x0d" \
"\x01\x01\x0b\x05\x00\x30\x54\x31\x0b\x30\x09\x06\x03\x55\x04\x06" \
"\x13\x02\x55\x53\x31\x1e\x30\x1c\x06\x03\x55\x04\x0a\x13\x15\x47" \
"\x6f\x6f\x67\x6c\x65\x20\x54\x72\x75\x73\x74\x20\x53\x65\x72\x76" \
"\x69\x63\x65\x73\x31\x25\x30\x23\x06\x03\x55\x04\x03\x13\x1c\x47" \
"\x6f\x6f\x67\x6c\x65\x20\x49\x6e\x74\x65\x72\x6e\x65\x74\x20\x41" \
"\x75\x74\x68\x6f\x72\x69\x74\x79\x20\x47\x33\x30\x1e\x17\x0d\x31" \
"\x38\x31\x30\x32\x33\x31\x36\x35\x34\x30\x30\x5a\x17\x0d\x31\x39" \
"\x30\x31\x31\x35\x31\x36\x35\x34\x30\x30\x5a\x30\x66\x31\x0b\x30" \
"\x09\x06\x03\x55\x04\x06\x13\x02\x55\x53\x31\x13\x30\x11\x06\x03" \
"\x55\x04\x08\x0c\x0a\x43\x61\x6c\x69\x66\x6f\x72\x6e\x69\x61\x31" \
"\x16\x30\x14\x06\x03\x55\x04\x07\x0c\x0d\x4d\x6f\x75\x6e\x74\x61" \
"\x69\x6e\x20\x56\x69\x65\x77\x31\x13\x30\x11\x06\x03\x55\x04\x0a" \
"\x0c\x0a\x47\x6f\x6f\x67\x6c\x65\x20\x4c\x4c\x43\x31\x15\x30\x13" \
"\x06\x03\x55\x04\x03\x0c\x0c\x2a\x2e\x67\x6f\x6f\x67\x6c\x65\x2e" \
"\x63\x6f\x6d\x30\x59\x30\x13\x06\x07\x2a\x86\x48\xce\x3d\x02\x01" \
"\x06\x08\x2a\x86\x48\xce\x3d\x03\x01\x07\x03\x42\x00\x04\x38\x80" \
"\x40\xfd\x56\xb2\xcb\xba\x06\x1a\x19\x4e\xcb\x12\x3c\xd5\xc2\x27" \
"\x66\xdb\x1d\xe8\x44\x83\xd4\xe7\x42\x4a\xd7\x47\xd8\xb1\x58\x34" \
"\x0b\xde\x95\x82\x74\x00\x26\x87\x9d\x10\x5c\xa1\xf8\xc5\x3b\xbe" \
"\x59\xf0\x96\xc9\x49\x42\xe6\xfd\x7c\x3d\x05\x29\x1b\x12\xa3\x82" \
"\x05\x54\x30\x82\x05\x50\x30\x13\x06\x03\x55\x1d\x25\x04\x0c\x30" \
"\x0a\x06\x08\x2b\x06\x01\x05\x05\x07\x03\x01\x30\x0e\x06\x03\x55" \
"\x1d\x0f\x01\x01\xff\x04\x04\x03\x02\x07\x80\x30\x82\x04\x19\x06" \
"\x03\x55\x1d\x11\x04\x82\x04\x10\x30\x82\x04\x0c\x82\x0c\x2a\x2e" \
"\x67\x6f\x6f\x67\x6c\x65\x2e\x63\x6f\x6d\x82\x0d\x2a\x2e\x61\x6e" \
"\x64\x72\x6f\x69\x64\x2e\x63\x6f\x6d\x82\x16\x2a\x2e\x61\x70\x70" \
"\x65\x6e\x67\x69\x6e\x65\x2e\x67\x6f\x6f\x67\x6c\x65\x2e\x63\x6f" \
"\x6d\x82\x12\x2a\x2e\x63\x6c\x6f\x75\x64\x2e\x67\x6f\x6f\x67\x6c" \
"\x65\x2e\x63\x6f\x6d\x82\x06\x2a\x2e\x67\x2e\x63\x6f\x82\x0e\x2a" \
"\x2e\x67\x63\x70\x2e\x67\x76\x74\x32\x2e\x63\x6f\x6d\x82\x0a\x2a" \
"\x2e\x67\x67\x70\x68\x74\x2e\x63\x6e\x82\x16\x2a\x2e\x67\x6f\x6f" \
"\x67\x6c\x65\x2d\x61\x6e\x61\x6c\x79\x74\x69\x63\x73\x2e\x63\x6f" \
"\x6d\x82\x0b\x2a\x2e\x67\x6f\x6f\x67\x6c\x65\x2e\x63\x61\x82\x0b" \
"\x2a\x2e\x67\x6f\x6f\x67\x6c\x65\x2e\x63\x6c\x82\x0e\x2a\x2e\x67" \
"\x6f\x6f\x67\x6c\x65\x2e\x63\x6f\x2e\x69\x6e\x82\x0e\x2a\x2e\x67" \
"\x6f\x6f\x67\x6c\x65\x2e\x63\x6f\x2e\x6a\x70\x82\x0e\x2a\x2e\x67" \
"\x6f\x6f\x67\x6c\x65\x2e\x63\x6f\x2e\x75\x6b\x82\x0f\x2a\x2e\x67" \
"\x6f\x6f\x67\x6c\x65\x2e\x63\x6f\x6d\x2e\x61\x72\x82\x0f\x2a\x2e" \
"\x67\x6f\x6f\x67\x6c\x65\x2e\x63\x6f\x6d\x2e\x61\x75\x82\x0f\x2a" \
"\x2e\x67\x6f\x6f\x67\x6c\x65\x2e\x63\x6f\x6d\x2e\x62\x72\x82\x0f" \
"\x2a\x2e\x67\x6f\x6f\x67\x6c\x65\x2e\x63\x6f\x6d\x2e\x63\x6f\x82" \
"\x0f\x2a\x2e\x67\x6f\x6f\x67\x6c\x65\x2e\x63\x6f\x6d\x2e\x6d\x78" \
"\x82\x0f\x2a\x2e\x67\x6f\x6f\x67\x6c\x65\x2e\x63\x6f\x6d\x2e\x74" \
"\x72\x82\x0f\x2a\x2e\x67\x6f\x6f\x67\x6c\x65\x2e\x63\x6f\x6d\x2e" \
"\x76\x6e\x82\x0b\x2a\x2e\x67\x6f\x6f\x67\x6c\x65\x2e\x64\x65\x82" \
"\x0b\x2a\x2e\x67\x6f\x6f\x67\x6c\x65\x2e\x65\x73\x82\x0b\x2a\x2e" \
"\x67\x6f\x6f\x67\x6c\x65\x2e\x66\x72\x82\x0b\x2a\x2e\x67\x6f\x6f" \
"\x67\x6c\x65\x2e\x68\x75\x82\x0b\x2a\x2e\x67\x6f\x6f\x67\x6c\x65" \
"\x2e\x69\x74\x82\x0b\x2a\x2e\x67\x6f\x6f\x67\x6c\x65\x2e\x6e\x6c" \
"\x82\x0b\x2a\x2e\x67\x6f\x6f\x67\x6c\x65\x2e\x70\x6c\x82\x0b\x2a" \
"\x2e\x67\x6f\x6f\x67\x6c\x65\x2e\x70\x74\x82\x12\x2a\x2e\x67\x6f" \
"\x6f\x67\x6c\x65\x61\x64\x61\x70\x69\x73\x2e\x63\x6f\x6d\x82\x0f" \
"\x2a\x2e\x67\x6f\x6f\x67\x6c\x65\x61\x70\x69\x73\x2e\x63\x6e\x82" \
"\x14\x2a\x2e\x67\x6f\x6f\x67\x6c\x65\x63\x6f\x6d\x6d\x65\x72\x63" \
"\x65\x2e\x63\x6f\x6d\x82\x11\x2a\x2e\x67\x6f\x6f\x67\x6c\x65\x76" \
"\x69\x64\x65\x6f\x2e\x63\x6f\x6d\x82\x0c\x2a\x2e\x67\x73\x74\x61" \
"\x74\x69\x63\x2e\x63\x6e\x82\x0d\x2a\x2e\x67\x73\x74\x61\x74\x69" \
"\x63\x2e\x63\x6f\x6d\x82\x12\x2a\x2e\x67\x73\x74\x61\x74\x69\x63" \
"\x63\x6e\x61\x70\x70\x73\x2e\x63\x6e\x82\x0a\x2a\x2e\x67\x76\x74" \
"\x31\x2e\x63\x6f\x6d\x82\x0a\x2a\x2e\x67\x76\x74\x32\x2e\x63\x6f" \
"\x6d\x82\x14\x2a\x2e\x6d\x65\x74\x72\x69\x63\x2e\x67\x73\x74\x61" \
"\x74\x69\x63\x2e\x63\x6f\x6d\x82\x0c\x2a\x2e\x75\x72\x63\x68\x69" \
"\x6e\x2e\x63\x6f\x6d\x82\x10\x2a\x2e\x75\x72\x6c\x2e\x67\x6f\x6f" \
"\x67\x6c\x65\x2e\x63\x6f\x6d\x82\x16\x2a\x2e\x79\x6f\x75\x74\x75" \
"\x62\x65\x2d\x6e\x6f\x63\x6f\x6f\x6b\x69\x65\x2e\x63\x6f\x6d\x82" \
"\x0d\x2a\x2e\x79\x6f\x75\x74\x75\x62\x65\x2e\x63\x6f\x6d\x82\x16" \
"\x2a\x2e\x79\x6f\x75\x74\x75\x62\x65\x65\x64\x75\x63\x61\x74\x69" \
"\x6f\x6e\x2e\x63\x6f\x6d\x82\x11\x2a\x2e\x79\x6f\x75\x74\x75\x62" \
"\x65\x6b\x69\x64\x73\x2e\x63\x6f\x6d\x82\x07\x2a\x2e\x79\x74\x2e" \
"\x62\x65\x82\x0b\x2a\x2e\x79\x74\x69\x6d\x67\x2e\x63\x6f\x6d\x82" \
"\x1a\x61\x6e\x64\x72\x6f\x69\x64\x2e\x63\x6c\x69\x65\x6e\x74\x73" \
"\x2e\x67\x6f\x6f\x67\x6c\x65\x2e\x63\x6f\x6d\x82\x0b\x61\x6e\x64" \
"\x72\x6f\x69\x64\x2e\x63\x6f\x6d\x82\x1b\x64\x65\x76\x65\x6c\x6f" \
"\x70\x65\x72\x2e\x61\x6e\x64\x72\x6f\x69\x64\x2e\x67\x6f\x6f\x67" \
"\x6c\x65\x2e\x63\x6e\x82\x1c\x64\x65\x76\x65\x6c\x6f\x70\x65\x72" \
"\x73\x2e\x61\x6e\x64\x72\x6f\x69\x64\x2e\x67\x6f\x6f\x67\x6c\x65" \
"\x2e\x63\x6e\x82\x04\x67\x2e\x63\x6f\x82\x08\x67\x67\x70\x68\x74" \
"\x2e\x63\x6e\x82\x06\x67\x6f\x6f\x2e\x67\x6c\x82\x14\x67\x6f\x6f" \
"\x67\x6c\x65\x2d\x61\x6e\x61\x6c\x79\x74\x69\x63\x73\x2e\x63\x6f" \
"\x6d\x82\x0a\x67\x6f\x6f\x67\x6c\x65\x2e\x63\x6f\x6d\x82\x12\x67" \
"\x6f\x6f\x67\x6c\x65\x63\x6f\x6d\x6d\x65\x72\x63\x65\x2e\x63\x6f" \
"\x6d\x82\x18\x73\x6f\x75\x72\x63\x65\x2e" \
"\x61\x6e\x64\x72\x6f\x69\x64\x2e\x67\x6f\x6f\x67\x6c\x65\x2e\x63" \
"\x6e\x82\x0a\x75\x72\x63\x68\x69\x6e\x2e\x63\x6f\x6d\x82\x0a\x77" \
"\x77\x77\x2e\x67\x6f\x6f\x2e\x67\x6c\x82\x08\x79\x6f\x75\x74\x75" \
"\x2e\x62\x65\x82\x0b\x79\x6f\x75\x74\x75\x62\x65\x2e\x63\x6f\x6d" \
"\x82\x14\x79\x6f\x75\x74\x75\x62\x65\x65\x64\x75\x63\x61\x74\x69" \
"\x6f\x6e\x2e\x63\x6f\x6d\x82\x0f\x79\x6f\x75\x74\x75\x62\x65\x6b" \
"\x69\x64\x73\x2e\x63\x6f\x6d\x82\x05\x79\x74\x2e\x62\x65\x30\x68" \
"\x06\x08\x2b\x06\x01\x05\x05\x07\x01\x01\x04\x5c\x30\x5a\x30\x2d" \
"\x06\x08\x2b\x06\x01\x05\x05\x07\x30\x02\x86\x21\x68\x74\x74\x70" \
"\x3a\x2f\x2f\x70\x6b\x69\x2e\x67\x6f\x6f\x67\x2f\x67\x73\x72\x32" \
"\x2f\x47\x54\x53\x47\x49\x41\x47\x33\x2e\x63\x72\x74\x30\x29\x06" \
"\x08\x2b\x06\x01\x05\x05\x07\x30\x01\x86\x1d\x68\x74\x74\x70\x3a" \
"\x2f\x2f\x6f\x63\x73\x70\x2e\x70\x6b\x69\x2e\x67\x6f\x6f\x67\x2f" \
"\x47\x54\x53\x47\x49\x41\x47\x33\x30\x1d\x06\x03\x55\x1d\x0e\x04" \
"\x16\x04\x14\xc0\x3e\x2c\x10\x66\x96\x5d\x90\x0d\x76\xb8\xd3\x6b" \
"\xdd\x66\x1c\xbe\x73\x3f\x54\x30\x0c\x06\x03\x55\x1d\x13\x01\x01" \
"\xff\x04\x02\x30\x00\x30\x1f\x06\x03\x55\x1d\x23\x04\x18\x30\x16" \
"\x80\x14\x77\xc2\xb8\x50\x9a\x67\x76\x76\xb1\x2d\xc2\x86\xd0\x83" \
"\xa0\x7e\xa6\x7e\xba\x4b\x30\x21\x06\x03\x55\x1d\x20\x04\x1a\x30" \
"\x18\x30\x0c\x06\x0a\x2b\x06\x01\x04\x01\xd6\x79\x02\x05\x03\x30" \
"\x08\x06\x06\x67\x81\x0c\x01\x02\x02\x30\x31\x06\x03\x55\x1d\x1f" \
"\x04\x2a\x30\x28\x30\x26\xa0\x24\xa0\x22\x86\x20\x68\x74\x74\x70" \
"\x3a\x2f\x2f\x63\x72\x6c\x2e\x70\x6b\x69\x2e\x67\x6f\x6f\x67\x2f" \
"\x47\x54\x53\x47\x49\x41\x47\x33\x2e\x63\x72\x6c\x30\x0d\x06\x09" \
"\x2a\x86\x48\x86\xf7\x0d\x01\x01\x0b\x05\x00\x03\x82\x01\x01\x00" \
"\x97\xff\x67\x4c\x78\xbf\xdf\x0b\x61\x32\x6f\x08\xc1\xdb\xa5\xc5" \
"\xcc\xf6\xb0\x66\xc8\x4e\xc4\x98\xe9\x9a\xfa\x4f\x40\x97\x26\x8d" \
"\x2c\x42\x8e\xc4\x49\x4c\x14\x79\x13\xb3\xbf\xce\xf5\x34\x89\x07" \
"\x39\x8d\x40\x5e\x1c\x35\xfd\x4f\xe1\x07\x35\x93\xb6\xdb\xef\x6f" \
"\xd0\x35\x53\x4c\x00\x42\x19\x56\xa5\x9b\x35\x77\x8c\x2d\x1b\xdc" \
"\x20\xe2\x6a\x76\xf4\xa2\xaa\xc9\x6b\xa2\x70\x87\x1b\x9e\xed\x12" \
"\x0e\xb7\x31\xa6\xc4\x76\x31\xf4\xca\x99\x18\x0e\x8d\x08\x4f\xc0" \
"\x56\xb0\x77\x03\x60\x18\xb0\x11\x46\xe2\xb2\x36\xa8\xb5\xfe\xbb" \
"\x05\x62\x61\x21\xcc\x2e\x60\xd4\x20\x63\xba\x8e\x22\x6c\x92\x68" \
"\xb4\xd9\xce\x1b\x0a\xa7\x7e\x4b\x25\xe4\x66\x9f\x18\x05\x84\x5e" \
"\xd5\xdc\x4d\x72\x15\x0e\x66\x32\x78\x05\x0b\x98\xfd\xd3\x75\x6e" \
"\xec\x39\xd1\x8a\x63\x0f\x17\xcb\x47\xbd\xcb\x43\xc3\x0b\x9f\x5c" \
"\xec\x64\x53\xda\xd3\x63\x57\xa2\x82\x3a\x4f\x8e\x5b\xee\x57\x10" \
"\x34\xe5\xa9\xa3\xdc\x2b\xd8\x3e\xee\x79\x51\x72\x3b\x7f\xc5\xad" \
"\x85\x68\x10\xf8\x59\x3b\x11\x44\xf6\x3c\x5b\xba\xf2\x65\xe8\xf5" \
"\x2f\xda\x82\x1c\x71\xff\xc1\x00\x91\x2d\x3a\x88\x87\xc6\x04\xd9" \
"\x00\x04\x60\x30\x82\x04\x5c\x30\x82\x03\x44\xa0\x03\x02\x01\x02" \
"\x02\x0d\x01\xe3\xa9\x30\x1c\xfc\x72\x06\x38\x3f\x9a\x53\x1d\x30" \
"\x0d\x06\x09\x2a\x86\x48\x86\xf7\x0d\x01\x01\x0b\x05\x00\x30\x4c" \
"\x31\x20\x30\x1e\x06\x03\x55\x04\x0b\x13\x17\x47\x6c\x6f\x62\x61" \
"\x6c\x53\x69\x67\x6e\x20\x52\x6f\x6f\x74\x20\x43\x41\x20\x2d\x20" \
"\x52\x32\x31\x13\x30\x11\x06\x03\x55\x04\x0a\x13\x0a\x47\x6c\x6f" \
"\x62\x61\x6c\x53\x69\x67\x6e\x31\x13\x30\x11\x06\x03\x55\x04\x03" \
"\x13\x0a\x47\x6c\x6f\x62\x61\x6c\x53\x69\x67\x6e\x30\x1e\x17\x0d" \
"\x31\x37\x30\x36\x31\x35\x30\x30\x30\x30\x34\x32\x5a\x17\x0d\x32" \
"\x31\x31\x32\x31\x35\x30\x30\x30\x30\x34\x32\x5a\x30\x54\x31\x0b" \
"\x30\x09\x06\x03\x55\x04\x06\x13\x02\x55\x53\x31\x1e\x30\x1c\x06" \
"\x03\x55\x04\x0a\x13\x15\x47\x6f\x6f\x67\x6c\x65\x20\x54\x72\x75" \
"\x73\x74\x20\x53\x65\x72\x76\x69\x63\x65\x73\x31\x25\x30\x23\x06" \
"\x03\x55\x04\x03\x13\x1c\x47\x6f\x6f\x67\x6c\x65\x20\x49\x6e\x74" \
"\x65\x72\x6e\x65\x74\x20\x41\x75\x74\x68\x6f\x72\x69\x74\x79\x20" \
"\x47\x33\x30\x82\x01\x22\x30\x0d\x06\x09\x2a\x86\x48\x86\xf7\x0d" \
"\x01\x01\x01\x05\x00\x03\x82\x01\x0f\x00\x30\x82\x01\x0a\x02\x82" \
"\x01\x01\x00\xca\x52\x4b\xea\x1e\xff\xce\x24\x6b\xa8\xda\x72\x18" \
"\x68\xd5\x56\x5d\x0e\x48\x5a\x2d\x35\x09\x76\x5a\xcf\xa4\xc8\x1c" \
"\xb1\xa9\xfe\x53\x89\xfb\xad\x34\xff\x88\x5b\x9f\xbb\xe7\xe8\x00" \
"\x01\xdc\x35\x73\x75\x03\xad\xb3\xb1\xb9\xa4\x7d\x2b\x26\x79\xce" \
"\x15\x40\x0a\xef\x51\xb8\x9f\x32\x8c\x7c\x70\x86\x52\x4b\x16\xfe" \
"\x6a\x27\x6b\xe6\x36\x7a\x62\x50\xd8\xdf\x9a\x89\xcc\x09\x29\xeb" \
"\x4f\x29\x14\x88\x80\x0b\x8f\x38\x1e\x80\x6a\x18\x7c\x1d\xbd\x97" \
"\x3b\x78\x7d\x45\x49\x36\x4f\x41\xcd\xa2\xe0\x76\x57\x3c\x68\x31" \
"\x79\x64\xc9\x6e\xd7\x51\x1e\x66\xc3\xa2\x64\x2c\x79\xc0\xe7\x65" \
"\xc3\x56\x84\x53\x5a\x43\x6d\xcb\x9a\x02\x20\xd2\xef\x1a\x69\xd1" \
"\xb0\x9d\x73\xa2\xe0\x2a\x60\x65\x50\x31\xcf\xfb\xb3\x2f\xbf\x11" \
"\x88\x40\x2e\xb5\x49\x10\x0f\x0a\x6e\xdc\x97\xfa\xbf\x2c\x9f\x05" \
"\x39\x0b\x58\x54\xaf\x06\x96\xe8\xc5\x8e\x01\x16\xbc\xa8\x1a\x4d" \
"\x41\xc5\x93\x91\xa2\x1e\xa1\x8b\xf2\xfe\xc1\x88\x24\x49\xa3\x47" \
"\x4b\xc5\x13\x01\xdd\xa7\x57\x12\x69\x62\x2b\xeb\xfe\x20\xef\x69" \
"\xfb\x3a\xa5\xf0\x7e\x29\xee\xed\x96\x16\xf7\xb1\x1f\xa0\xe4\x90" \
"\x25\xe0\x33\x02\x03\x01\x00\x01\xa3\x82\x01\x33\x30\x82\x01\x2f" \
"\x30\x0e\x06\x03\x55\x1d\x0f\x01\x01\xff\x04\x04\x03\x02\x01\x86" \
"\x30\x1d\x06\x03\x55\x1d\x25\x04\x16\x30\x14\x06\x08\x2b\x06\x01" \
"\x05\x05\x07\x03\x01\x06\x08\x2b\x06\x01\x05\x05\x07\x03\x02\x30" \
"\x12\x06\x03\x55\x1d\x13\x01\x01\xff\x04\x08\x30\x06\x01\x01\xff" \
"\x02\x01\x00\x30\x1d\x06\x03\x55\x1d\x0e\x04\x16\x04\x14\x77\xc2" \
"\xb8\x50\x9a\x67\x76\x76\xb1\x2d\xc2\x86\xd0\x83\xa0\x7e\xa6\x7e" \
"\xba\x4b\x30\x1f\x06\x03\x55\x1d\x23\x04\x18\x30\x16\x80\x14\x9b" \
"\xe2\x07\x57\x67\x1c\x1e\xc0\x6a\x06\xde\x59\xb4\x9a\x2d\xdf\xdc" \
"\x19\x86\x2e\x30\x35\x06\x08\x2b\x06\x01\x05\x05\x07\x01\x01\x04" \
"\x29\x30\x27\x30\x25\x06\x08\x2b\x06\x01\x05\x05\x07\x30\x01\x86" \
"\x19\x68\x74\x74\x70\x3a\x2f\x2f\x6f\x63\x73\x70\x2e\x70\x6b\x69" \
"\x2e\x67\x6f\x6f\x67\x2f\x67\x73\x72\x32\x30\x32\x06\x03\x55\x1d" \
"\x1f\x04\x2b\x30\x29\x30\x27\xa0\x25\xa0\x23\x86\x21\x68\x74\x74" \
"\x70\x3a\x2f\x2f\x63\x72\x6c\x2e\x70\x6b" \
"\x69\x2e\x67\x6f\x6f\x67\x2f\x67\x73\x72\x32\x2f\x67\x73\x72\x32" \
"\x2e\x63\x72\x6c\x30\x3f\x06\x03\x55\x1d\x20\x04\x38\x30\x36\x30" \
"\x34\x06\x06\x67\x81\x0c\x01\x02\x02\x30\x2a\x30\x28\x06\x08\x2b" \
"\x06\x01\x05\x05\x07\x02\x01\x16\x1c\x68\x74\x74\x70\x73\x3a\x2f" \
"\x2f\x70\x6b\x69\x2e\x67\x6f\x6f\x67\x2f\x72\x65\x70\x6f\x73\x69" \
"\x74\x6f\x72\x79\x2f\x30\x0d\x06\x09\x2a\x86\x48\x86\xf7\x0d\x01" \
"\x01\x0b\x05\x00\x03\x82\x01\x01\x00\x1c\xb7\x89\x96\xe4\x53\xed" \
"\xbb\xec\xdb\xa8\x32\x01\x9f\x2c\xa3\xcd\x6d\xad\x42\x12\x77\xb3" \
"\xb8\xe6\xc9\x03\x52\x60\x20\x7b\x57\x27\xc6\x11\xb5\x3f\x67\x0d" \
"\x99\x2c\x5b\x5a\xca\x22\x0a\xdd\x9e\xbb\x1f\x4b\x48\x3f\x8f\x02" \
"\x3d\x8b\x21\x84\x45\x1d\x6d\xf5\xff\xac\x68\x89\xcd\x64\xe2\xd6" \
"\xd6\x5e\x40\xc2\x8e\x2a\xf7\xef\x14\xd3\x36\xa4\x40\x30\xf5\x32" \
"\x15\x15\x92\x76\xfb\x7e\x9e\x53\xea\xc2\x76\xfc\x39\xad\x88\xfe" \
"\x66\x92\x26\xe9\x1c\xc4\x38\xcd\x49\xfa\x43\x87\xf0\x5d\xd6\x56" \
"\x4d\x81\xd7\x7f\xf1\xc2\xdd\xb0\x4d\xfe\xc3\x2a\x6e\x7c\x9f\x6e" \
"\x5c\xed\x62\x42\x99\xe1\xf7\x36\xee\x14\x8c\x2c\x20\xe3\x46\x97" \
"\x5a\x77\x03\xc0\xa0\xc6\x4a\x88\xfd\x40\x22\x87\x72\x5a\x18\xea" \
"\x9c\xa5\xc7\x5a\x08\x8c\xe4\x05\xa4\x7d\xb9\x84\x35\x5f\x89\x36" \
"\x56\x0e\x40\x3d\x12\xe8\xbb\x35\x72\xed\xaf\x08\x56\x4e\xb0\xbb" \
"\x2e\xa9\x9b\xe4\xfb\x1d\x3e\x0b\x63\xc8\x9b\x4b\x91\x44\x66\x57" \
"\xc0\x14\xb4\x96\xf0\xdc\x2c\x57\x3f\x52\x04\xad\x95\xaa\x7d\x4d" \
"\xd0\xf2\x0c\x9f\x9c\x40\xe8\xd6\x55\x73\xba\x3c\xdf\x90\xcb\x00" \
"\x5b\x21\x11\x67\xc2\xed\x32\x1e\xde\x16\x03\x03\x00\x95\x0c\x00" \
"\x00\x91\x03\x00\x17\x41\x04\x77\xd5\xd6\x04\x68\xea\x2a\x70\x32" \
"\xa2\x34\x60\xbe\x0e\xc5\x71\xab\x3d\x99\xe0\xf3\x99\x9b\xe3\x3e" \
"\xcc\x54\xa3\x10\xe8\x5f\x70\x8e\x62\x0b\x4a\xeb\x02\x16\x9f\x85" \
"\x6f\xbb\x6b\xcf\xd6\x77\x78\x34\xae\xf5\xc4\x26\x55\x97\x57\xeb" \
"\x0b\xfc\xcd\xb1\x08\x93\x0e\x04\x03\x00\x48\x30\x46\x02\x21\x00" \
"\x8d\x2a\xe0\xb2\x4d\xa6\xd6\xd7\x75\xfa\xa7\xc8\x72\xa3\x18\x96" \
"\xaa\x87\xae\x96\x8e\xca\xa5\xc5\x84\x58\xb0\xa2\x0e\x8f\x36\xea" \
"\x02\x21\x00\xd8\x66\xe2\xb3\xc3\xfe\x1d\x9f\xeb\x2c\x18\x63\xbb" \
"\xc1\xb8\x39\xb7\x9e\xca\xf2\x52\x66\x53\x9e\x41\x85\x84\x1a\x18" \
"\x1b\x5a\x04\x16\x03\x03\x00\x04\x0e\x00\x00\x00" \
"\x16\x03\x03\x00\x46\x10\x00\x00\x42\x41\x04\x14\x8a\x69\xd5\x02" \
"\x78\x0e\x27\x8c\xf0\x0d\x37\x40\x5b\x3a\x43\x10\xe1\xb4\xd7\xcc" \
"\x9c\x62\x93\xd5\x06\x63\xbc\xe3\x69\x2c\xb1\x37\xb9\x21\x72\x03" \
"\xab\x60\x18\xdc\x80\x78\xf9\x2c\xca\x05\xcc\xd8\xf9\x9e\xb9\xa3" \
"\xc8\x1c\x8b\x5c\x07\xee\x1c\x73\xd4\x18\x41\x14\x03\x03\x00\x01" \
"\x01\x16\x03\x03\x00\x28\x72\x50\x61\x47\x9f\x5b\xb7\x94\xfe\xd2" \
"\x53\x33\xd5\xda\x07\xaa\xe4\x39\xae\x03\x98\x33\xba\x48\x6c\xe7" \
"\x46\xa5\xb6\x86\x6a\x2a\xbb\xb6\xb6\x50\x00\xd8\x48\x1e" \
"\x16\x03\x03\x00\xdf\x04\x00\x00\xdb\x00\x01\x89\xc0\x00\xd5\x00" \
"\x6c\xc3\xe8\x14\x25\x1b\xeb\x5b\xa3\x79\xb2\x49\xfd\x11\x4a\x20" \
"\x5a\xca\x85\xa2\xf1\xfb\xb7\x6d\x3f\x1b\x7f\xee\x2c\xd1\x41\x0d" \
"\x26\x91\xe6\xc8\x02\xc1\xcd\x05\x80\x45\x04\x14\xbe\xb1\x0c\xa1" \
"\xdc\xda\x5a\xf0\x61\xa1\xb0\xa1\x29\x90\x7c\x1e\x3f\xd4\x25\xc6" \
"\x3e\x48\x8a\xc0\xa6\x1d\xa6\xd5\x27\xc7\xb1\x40\xd8\x10\x18\x1e" \
"\xc6\x70\x56\xe2\x78\xd2\xb6\x00\xbe\xe5\xba\x18\xbe\x31\x37\x14" \
"\x68\x83\xd2\x71\xde\x84\x28\xc9\xe6\xfb\x7f\x38\xfe\xce\x13\x1a" \
"\xfe\x35\x1a\x8e\x32\x8e\x45\xa7\xe1\x96\xa2\x7b\x38\x35\xdd\x42" \
"\x5d\x76\x43\x13\xca\x6a\x4e\x66\xcb\xa9\xa5\xe1\x5b\x5e\x91\xfb" \
"\xa0\xeb\xba\x0c\x56\x50\x26\xa8\x86\x18\x09\x15\xb8\x14\x06\x8e" \
"\x59\xf9\x46\x1a\x20\xad\x57\x8e\x79\xda\xba\xa4\x53\xbd\xa2\x91" \
"\xb2\x39\x59\xcb\x3e\x86\xec\x94\x74\x49\xe1\x03\x92\xa1\xd6\xff" \
"\xc7\xb8\x71\x33\x6e\x27\x08\x4a\x21\xf4\xb3\x1b\x0b\xa4\x2c\x06" \
"\x68\x48\x4a\xdb\x14\x03\x03\x00\x01\x01\x16\x03\x03\x00\x28\x00" \
"\x00\x00\x00\x00\x00\x00\x00\x0b\xc1\x3d\xbc\xca\xc1\xac\x97\x5a" \
"\x88\x09\xac\xab\xcc\xf8\x34\xbf\x2f\x97\x90\xa2\x8b\x8a\x13\x8d" \
"\x13\x74\x24\xd3\x15\xaa\xf2";
int get_clnt_sni(Tp_ctx_t *ctx, char *str, unsigned int len)
{
printf("sni :%s\n", str);
return 1;
}
int get_clnt_ver(Tp_ctx_t *ctx, char *str, unsigned int len)
{
unsigned char *p = (unsigned char *)str;
printf("client request version :%02x%02x\n", p[0], p[1]);
return 1;
}
int get_clnt_id(Tp_ctx_t *ctx, char *str, unsigned int len)
{
int i;
unsigned char *p = (unsigned char *)str;
printf("client session id: ");
for (i = 0; i < len; i++)
printf("%02x", p[i]);
printf("\n");
return 1;
}
int get_clnt_cipher(Tp_ctx_t *ctx, char *str, unsigned int len)
{
int i;
unsigned char *p = (unsigned char *)str;
if (len&1)
return 0;
printf("client support cipher suits: ");
for (i = 0; i < len; i+=2)
printf("%02x%02x,", p[i], p[i+1]);
printf("\n");
return 1;
}
int get_srv_ver(Tp_ctx_t *ctx, char *str, unsigned int len)
{
unsigned char *p = (unsigned char *)str;
printf("negotiation version :%02x%02x\n", p[0], p[1]);
return 1;
}
int get_srv_id(Tp_ctx_t *ctx, char *str, unsigned int len)
{
int i;
unsigned char *p = (unsigned char *)str;
printf("server session id: ");
for (i = 0; i < len; i++)
printf("%02x", p[i]);
printf("\n");
return 1;
}
int get_srv_cipher(Tp_ctx_t *ctx, char *str, unsigned int len)
{
unsigned char *p = (unsigned char *)str;
if (len != 2)
return 0;
printf("negotiation cipher :%02x%02x\n", p[0], p[1]);
return 1;
}
int get_srv_raw_cert(Tp_ctx_t *ctx, char *str, unsigned int len)
{
printf("dir %d level:%d raw cert len:%d\n", Tp_get_cert_dir(ctx),Tp_get_cert_level(ctx), len);
return 1;
}
int get_cert_cn(Tp_ctx_t *ctx, char *str, unsigned int len)
{
unsigned char tmpbuf[100] = {0};
Tp_memcpy(tmpbuf, str, len);
printf("dir %d level:%d common name %s len:%d\n",Tp_get_cert_dir(ctx), Tp_get_cert_level(ctx), tmpbuf, len);
return 1;
}
int get_cert_country(Tp_ctx_t *ctx, char *str, unsigned int len)
{
unsigned char tmpbuf[100] = {0};
Tp_memcpy(tmpbuf, str, len);
printf("dir %d level:%d country name %s len:%d\n",Tp_get_cert_dir(ctx), Tp_get_cert_level(ctx),tmpbuf, len);
return 1;
}
int get_cert_local(Tp_ctx_t *ctx, char *str, unsigned int len)
{
unsigned char tmpbuf[100] = {0};
Tp_memcpy(tmpbuf, str, len);
printf("dir %d level:%d local name %s len:%d\n",Tp_get_cert_dir(ctx), Tp_get_cert_level(ctx),tmpbuf, len);
return 1;
}
int get_cert_prov(Tp_ctx_t *ctx, char *str, unsigned int len)
{
unsigned char tmpbuf[100] = {0};
Tp_memcpy(tmpbuf, str, len);
printf("dir %d level:%d prov name %s len:%d\n",Tp_get_cert_dir(ctx), Tp_get_cert_level(ctx),tmpbuf, len);
return 1;
}
int get_cert_org(Tp_ctx_t *ctx, char *str, unsigned int len)
{
unsigned char tmpbuf[100] = {0};
Tp_memcpy(tmpbuf, str, len);
printf("dir %d level:%d Org %s len:%d\n",Tp_get_cert_dir(ctx), Tp_get_cert_level(ctx),tmpbuf, len);
return 1;
}
int get_cert_orgunit(Tp_ctx_t *ctx, char *str, unsigned int len)
{
unsigned char tmpbuf[100] = {0};
Tp_memcpy(tmpbuf, str, len);
printf("dir %d level:%d Org unit %s len:%d\n",Tp_get_cert_dir(ctx),Tp_get_cert_level(ctx), tmpbuf, len);
return 1;
}
int get_cert_email(Tp_ctx_t *ctx, char *str, unsigned int len)
{
unsigned char tmpbuf[100] = {0};
Tp_memcpy(tmpbuf, str, len);
printf("dir %d level:%d Email %s len:%d\n",Tp_get_cert_dir(ctx), Tp_get_cert_level(ctx),tmpbuf, len);
return 1;
}
int get_cert_serial(Tp_ctx_t *ctx, char *str, unsigned int len)
{
int i;
unsigned char *p = (unsigned char *)str;
printf("dir %d level:%d serial: ",Tp_get_cert_dir(ctx),Tp_get_cert_level(ctx));
for (i = 0; i < len; i++)
printf("%02x", p[i]);
printf("\n");
return 1;
}
int get_cert_sigalg(Tp_ctx_t *ctx, char *str, unsigned int len)
{
printf("dir %d level:%d signature algorithm id: %s\n",Tp_get_cert_dir(ctx), Tp_get_cert_level(ctx), str);
return 1;
}
int get_cert_pkeyalg(Tp_ctx_t *ctx, char *str, unsigned int len)
{
printf("dir %d level:%d subjectPublicKeyInfo: %s\n",Tp_get_cert_dir(ctx), Tp_get_cert_level(ctx), str);
return 1;
}
int get_ke_curve(Tp_ctx_t *ctx, char *str, unsigned int len)
{
unsigned char *p = (unsigned char *)str;
printf("server keyexchange: %02x%02x\n", p[0], p[1]);
return 1;
}
int get_ke_pkey(Tp_ctx_t *ctx, char *str, unsigned int len)
{
int i;
unsigned char *p = (unsigned char *)str;
for (i = 0; i < len; i++)
printf("%02x", p[i]);
printf("\n");
return 1;
}
int get_ke_sigalg(Tp_ctx_t *ctx, char *str, unsigned int len)
{
unsigned char *p = (unsigned char *)str;
printf("server ke signature Hash algorithm: %02x%02x\n", p[0], p[1]);
return 1;
}
int main()
{
Tp_ctx_t *ctx = Tp_ctx_new();
if (unlikely(ctx == NULL))
return -1;
Tp_set_clnt_sni_cb(ctx, get_clnt_sni);
Tp_set_clnt_ver_cb(ctx, get_clnt_ver);
Tp_set_clnt_ciph_cb(ctx, get_clnt_cipher);
Tp_set_clnt_id_cb(ctx, get_clnt_id);
Tp_set_srv_ver_cb(ctx, get_srv_ver);
Tp_set_srv_id_cb(ctx, get_srv_id);
Tp_set_srv_ciph_cb(ctx, get_srv_cipher);
Tp_set_cert_raw_cb(ctx, get_srv_raw_cert);
Tp_set_cert_cn_cb(ctx, get_cert_cn);
Tp_set_cert_country_cb(ctx, get_cert_country);
Tp_set_cert_local_cb(ctx, get_cert_local);
Tp_set_cert_prov_cb(ctx, get_cert_prov);
Tp_set_cert_org_cb(ctx, get_cert_org);
Tp_set_cert_orgunit_cb(ctx, get_cert_orgunit);
Tp_set_cert_email_cb(ctx, get_cert_email);
Tp_set_cert_serial_cb(ctx, get_cert_serial);
Tp_set_cert_sigalg_cb(ctx, get_cert_sigalg);
Tp_set_cert_pkeyalg_cb(ctx, get_cert_pkeyalg);
Tp_set_srv_ke_curve_cb(ctx, get_ke_curve);
Tp_set_srv_ke_pkey_cb(ctx, get_ke_pkey);
Tp_set_srv_ke_sigalg_cb(ctx, get_ke_sigalg);
Tp_parse(ctx, google, 4282);
Tp_ctx_free(ctx);
return 0;
}