@aj-shadow/z-abs-funclayer-engine-server 0.0.0-aj-beta.221
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.gitattributes +26 -0
- package/LICENSE.txt +96 -0
- package/README.md +5 -0
- package/npm-shrinkwrap.json +13 -0
- package/package.json +10 -0
- package/project/server/_build/Server-FuncLayer-Engine-server.bld +12 -0
- package/project/server/_build/z-abs-funclayer-engine-server.prj +12 -0
- package/project/server/address/address-calculator.js +377 -0
- package/project/server/address/address-data.js +364 -0
- package/project/server/address/address-manager.js +251 -0
- package/project/server/address/address.js +176 -0
- package/project/server/address/addresses.js +122 -0
- package/project/server/address/dns-url-cache.js +130 -0
- package/project/server/address/interfaces.js +100 -0
- package/project/server/address/local-dns.js +35 -0
- package/project/server/address/login-report.js +56 -0
- package/project/server/address/networks.js +598 -0
- package/project/server/address/real-networks.js +102 -0
- package/project/server/address/subnet.js +60 -0
- package/project/server/communication/messages/messages-s-to-c/message-execution-started.js +17 -0
- package/project/server/communication/messages/messages-s-to-c/message-execution-stopped.js +14 -0
- package/project/server/communication/messages/messages-s-to-c/message-test-case-debug-paused.js +18 -0
- package/project/server/communication/messages/messages-s-to-c/message-test-case-log.js +25 -0
- package/project/server/communication/messages/messages-s-to-c/message-test-case-started.js +21 -0
- package/project/server/communication/messages/messages-s-to-c/message-test-case-state.js +18 -0
- package/project/server/communication/messages/messages-s-to-c/message-test-case-stopped.js +22 -0
- package/project/server/communication/messages/messages-s-to-c/message-test-stage-started.js +19 -0
- package/project/server/communication/messages/messages-s-to-c/message-test-stage-stopped.js +19 -0
- package/project/server/communication/messages/messages-s-to-c/message-test-suite-started.js +16 -0
- package/project/server/communication/messages/messages-s-to-c/message-test-suite-stopped.js +19 -0
- package/project/server/communication/messages/messages-s-to-w/message-test-case-debug-actor-index-ok.js +15 -0
- package/project/server/communication/messages/messages-w-to-s/message-test-case-debug-actor-index.js +15 -0
- package/project/server/debug/debug-step-over.js +54 -0
- package/project/server/debug/debugger.js +102 -0
- package/project/server/debug-dashboard/debug-dashboard.js +14 -0
- package/project/server/debug-dashboard/gauge-manager.js +44 -0
- package/project/server/debug-dashboard/gauge.js +37 -0
- package/project/server/engine/actor/actor-condition.js +335 -0
- package/project/server/engine/actor/actor-intercepting.js +32 -0
- package/project/server/engine/actor/actor-local.js +24 -0
- package/project/server/engine/actor/actor-mixins/asynch-mixin.js +103 -0
- package/project/server/engine/actor/actor-mixins/content-mixin.js +22 -0
- package/project/server/engine/actor/actor-mixins/logger-mixin.js +603 -0
- package/project/server/engine/actor/actor-mixins/process-mixin.js +35 -0
- package/project/server/engine/actor/actor-mixins/shared-data-mixin.js +109 -0
- package/project/server/engine/actor/actor-mixins/shared-execution-data-mixin.js +57 -0
- package/project/server/engine/actor/actor-mixins/stack-mixin-client.js +157 -0
- package/project/server/engine/actor/actor-mixins/stack-mixin-server.js +123 -0
- package/project/server/engine/actor/actor-mixins/stack-mixin.js +128 -0
- package/project/server/engine/actor/actor-mixins/test-data-mixin.js +402 -0
- package/project/server/engine/actor/actor-mixins/timer-mixin.js +44 -0
- package/project/server/engine/actor/actor-mixins/verify-mixin-base.js +668 -0
- package/project/server/engine/actor/actor-mixins/verify-mixin-mandatory.js +46 -0
- package/project/server/engine/actor/actor-mixins/verify-mixin-optional.js +44 -0
- package/project/server/engine/actor/actor-mixins/verify-mixin-value.js +71 -0
- package/project/server/engine/actor/actor-originating.js +32 -0
- package/project/server/engine/actor/actor-part-mixins/part-asynch-mixin.js +24 -0
- package/project/server/engine/actor/actor-part-mixins/part-logger-mixin.js +39 -0
- package/project/server/engine/actor/actor-part-mixins/part-shared-runtime-data-mixin.js +33 -0
- package/project/server/engine/actor/actor-part-mixins/part-timer-mixin.js +12 -0
- package/project/server/engine/actor/actor-part-mixins/part-verify-mixin-mandatory.js +15 -0
- package/project/server/engine/actor/actor-part-mixins/part-verify-mixin-optional.js +15 -0
- package/project/server/engine/actor/actor-part-mixins/part-verify-mixin-value.js +15 -0
- package/project/server/engine/actor/actor-part-post.js +37 -0
- package/project/server/engine/actor/actor-part-pre.js +37 -0
- package/project/server/engine/actor/actor-pending.js +79 -0
- package/project/server/engine/actor/actor-proxy.js +38 -0
- package/project/server/engine/actor/actor-results.js +36 -0
- package/project/server/engine/actor/actor-state-timeout.js +35 -0
- package/project/server/engine/actor/actor-sut.js +38 -0
- package/project/server/engine/actor/actor-terminating.js +32 -0
- package/project/server/engine/actor/actor.js +553 -0
- package/project/server/engine/actor-phase.js +26 -0
- package/project/server/engine/actor-state-machine-base.js +298 -0
- package/project/server/engine/actor-state-machine-data.js +383 -0
- package/project/server/engine/actor-state-machine-exec.js +137 -0
- package/project/server/engine/actor-state-machine-post.js +177 -0
- package/project/server/engine/actor-state-machine-pre.js +142 -0
- package/project/server/engine/actor-state-machine-process.js +88 -0
- package/project/server/engine/actor-state-machine-state.js +52 -0
- package/project/server/engine/actor-state-machine.js +185 -0
- package/project/server/engine/actor-state.js +35 -0
- package/project/server/engine/actor-worker.js +68 -0
- package/project/server/engine/actors-phase.js +49 -0
- package/project/server/engine/actors.js +317 -0
- package/project/server/engine/data/content-audio.js +18 -0
- package/project/server/engine/data/content-base.js +91 -0
- package/project/server/engine/data/content-binary.js +15 -0
- package/project/server/engine/data/content-cache.js +67 -0
- package/project/server/engine/data/content-data.js +254 -0
- package/project/server/engine/data/content-documents.js +18 -0
- package/project/server/engine/data/content-image.js +20 -0
- package/project/server/engine/data/content-other.js +19 -0
- package/project/server/engine/data/content-text.js +19 -0
- package/project/server/engine/data/content-undefined.js +14 -0
- package/project/server/engine/data/content-video.js +20 -0
- package/project/server/engine/data/content.js +60 -0
- package/project/server/engine/data/runtime-data-shared.js +75 -0
- package/project/server/engine/data/test-data.js +239 -0
- package/project/server/engine/execution-context-test-case.js +48 -0
- package/project/server/engine/execution-context-test-suite.js +66 -0
- package/project/server/engine/execution-context.js +93 -0
- package/project/server/engine/stage-setter.js +132 -0
- package/project/server/engine/stage.js +83 -0
- package/project/server/engine/test-case-load.js +25 -0
- package/project/server/engine/test-case-loader.js +125 -0
- package/project/server/engine/test-case-not-found.js +29 -0
- package/project/server/engine/test-case-result-type.js +42 -0
- package/project/server/engine/test-case.js +417 -0
- package/project/server/engine/test-output.js +116 -0
- package/project/server/engine/test-statistics-test-case.js +59 -0
- package/project/server/engine/test-statistics-test-suite.js +63 -0
- package/project/server/engine/test-suite.js +276 -0
- package/project/server/stack/api/base-64.js +16 -0
- package/project/server/stack/api/const-commands-decoder.js +15 -0
- package/project/server/stack/api/const-commands-encoder.js +15 -0
- package/project/server/stack/api/hmacSha1.js +14 -0
- package/project/server/stack/api/json-web-token.js +38 -0
- package/project/server/stack/api/sdp/sdp-decoder.js +70 -0
- package/project/server/stack/api/sdp/sdp-encoder.js +40 -0
- package/project/server/stack/api/sdp/sdp-media-attribute.js +13 -0
- package/project/server/stack/api/sdp/sdp-media-session.js +16 -0
- package/project/server/stack/api/sdp/sdp-message.js +17 -0
- package/project/server/stack/api/sdp/sdp-origin.js +17 -0
- package/project/server/stack/api/sdp/sdp-session-attribute.js +13 -0
- package/project/server/stack/api/sdp/sdp-timing.js +15 -0
- package/project/server/stack/api/text-protocol-header.js +35 -0
- package/project/server/stack/factory/stack-components-helpers.js +22 -0
- package/project/server/stack/factory/stack-components-template-base-actors.js +124 -0
- package/project/server/stack/factory/stack-components-template-base-test-cases.js +22 -0
- package/project/server/stack/factory/stack-components-templates-actors.js +15 -0
- package/project/server/stack/factory/stack-components-templates-test-cases.js +20 -0
- package/project/server/stack/managers/client-manager/client-manager.js +193 -0
- package/project/server/stack/managers/connection-manager/connection-data.js +82 -0
- package/project/server/stack/managers/connection-manager/connection-manager.js +177 -0
- package/project/server/stack/managers/connection-manager/connection-object.js +148 -0
- package/project/server/stack/managers/connection-manager/shared-data.js +14 -0
- package/project/server/stack/managers/manager.js +95 -0
- package/project/server/stack/managers/server-manager/server-manager.js +76 -0
- package/project/server/stack/managers/server-manager/server.js +384 -0
- package/project/server/stack/managers/shared-manager.js +117 -0
- package/project/server/stack/network/buffer-manager.js +190 -0
- package/project/server/stack/network/mc/mc-connection-client-shared.js +51 -0
- package/project/server/stack/network/mc/mc-connection-client.js +117 -0
- package/project/server/stack/network/mc/mc-connection-server-shared.js +51 -0
- package/project/server/stack/network/mc/mc-connection-server.js +58 -0
- package/project/server/stack/network/mc/mc-connection-shared.js +26 -0
- package/project/server/stack/network/mc/mc-connection.js +33 -0
- package/project/server/stack/network/mc/mc-server.js +90 -0
- package/project/server/stack/network/network-connection-shared.js +177 -0
- package/project/server/stack/network/network-connection.js +134 -0
- package/project/server/stack/network/network-helper.js +12 -0
- package/project/server/stack/network/network-server.js +36 -0
- package/project/server/stack/network/network-type.js +46 -0
- package/project/server/stack/network/tcp/tcp-connection-client-shared.js +18 -0
- package/project/server/stack/network/tcp/tcp-connection-client.js +71 -0
- package/project/server/stack/network/tcp/tcp-connection-server-shared.js +14 -0
- package/project/server/stack/network/tcp/tcp-connection-server.js +16 -0
- package/project/server/stack/network/tcp/tcp-connection-shared.js +55 -0
- package/project/server/stack/network/tcp/tcp-connection.js +167 -0
- package/project/server/stack/network/tcp/tcp-server.js +35 -0
- package/project/server/stack/network/tls/tls-connection-client-shared.js +18 -0
- package/project/server/stack/network/tls/tls-connection-client.js +76 -0
- package/project/server/stack/network/tls/tls-connection-server-shared.js +14 -0
- package/project/server/stack/network/tls/tls-connection-server.js +16 -0
- package/project/server/stack/network/tls/tls-connection-shared.js +63 -0
- package/project/server/stack/network/tls/tls-connection.js +176 -0
- package/project/server/stack/network/tls/tls-server.js +45 -0
- package/project/server/stack/network/transport.js +19 -0
- package/project/server/stack/network/udp/udp-connection-client-shared.js +47 -0
- package/project/server/stack/network/udp/udp-connection-client.js +93 -0
- package/project/server/stack/network/udp/udp-connection-server-shared.js +51 -0
- package/project/server/stack/network/udp/udp-connection-server.js +58 -0
- package/project/server/stack/network/udp/udp-connection-shared.js +26 -0
- package/project/server/stack/network/udp/udp-connection.js +33 -0
- package/project/server/stack/network/udp/udp-server.js +74 -0
- package/project/server/stack/pending/pending-const.js +22 -0
- package/project/server/stack/pending/pending-context-receive.js +18 -0
- package/project/server/stack/pending/pending-context-send.js +18 -0
- package/project/server/stack/pending/pending-context.js +18 -0
- package/project/server/stack/pending/pending-inner.js +107 -0
- package/project/server/stack/pending/pending-switch.js +146 -0
- package/project/server/stack/stacks/ascii-dictionary.js +289 -0
- package/project/server/stack/stacks/binary-log.js +88 -0
- package/project/server/stack/stacks/bit-byte.js +51 -0
- package/project/server/stack/stacks/browser-data.js +25 -0
- package/project/server/stack/stacks/cancel-object.js +16 -0
- package/project/server/stack/stacks/connection-client.js +228 -0
- package/project/server/stack/stacks/connection-instance.js +69 -0
- package/project/server/stack/stacks/connection-ip.js +374 -0
- package/project/server/stack/stacks/connection-server.js +169 -0
- package/project/server/stack/stacks/connection-web.js +113 -0
- package/project/server/stack/stacks/connection-worker-client.js +29 -0
- package/project/server/stack/stacks/connection-worker-connection.js +41 -0
- package/project/server/stack/stacks/connection-worker-server.js +29 -0
- package/project/server/stack/stacks/connection-worker.js +99 -0
- package/project/server/stack/stacks/connection.js +132 -0
- package/project/server/stack/stacks/decoder.js +83 -0
- package/project/server/stack/stacks/encoder.js +82 -0
- package/project/server/stack/stacks/ip-log.js +24 -0
- package/project/server/stack/stacks/message-selector.js +22 -0
- package/project/server/stack/stacks/msg-ip.js +18 -0
- package/project/server/stack/stacks/stack-content-cache.js +27 -0
- package/project/z-abs-funclayer-engine-server.tree +230 -0
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class AsciiDictionary {
|
|
6
|
+
static getSymbolString(text) {
|
|
7
|
+
const length = text.length;
|
|
8
|
+
const stringArray = [];
|
|
9
|
+
for(let i = 0; i < length; ++i) {
|
|
10
|
+
stringArray.push(AsciiDictionary.getSymbol(text.charCodeAt(i)));
|
|
11
|
+
}
|
|
12
|
+
return stringArray.join('');
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
static getSymbol(index) {
|
|
16
|
+
return AsciiDictionary.dictionary[index][0];
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
static getHtmlName(index) {
|
|
20
|
+
return AsciiDictionary.dictionary[index][1];
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
static getDesciption(index) {
|
|
24
|
+
return AsciiDictionary.dictionary[index][2];
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// Done from: 'https://www.asciitabell.se/'
|
|
28
|
+
static dictionary = [
|
|
29
|
+
['NUL', '�', 'Null char.'], // 00
|
|
30
|
+
['[SOH]', '', 'Start of Header'], // 01
|
|
31
|
+
['[STX]', '', 'Start of Text'], // 02
|
|
32
|
+
['[ETX]', '', 'End of Text'], // 03
|
|
33
|
+
['[EOT]', '', 'End of Transmission'], // 04
|
|
34
|
+
['[ENQ]', '', 'Enquiry'], // 05
|
|
35
|
+
['[ACK]', '', 'Acknowledgment'], // 06
|
|
36
|
+
['[BEL]', '', 'Bell'], // 07
|
|
37
|
+
['[BS]', '', 'Backspace'], // 08
|
|
38
|
+
['[HT]', '	', 'Horizontal Tab'], // 09
|
|
39
|
+
['[LF]', '
', 'Line Feed'], // 10
|
|
40
|
+
['[VT]', '', 'Vertical Tab'], // 11
|
|
41
|
+
['[FF]', '', 'Form Feed'], // 12
|
|
42
|
+
['[CR]', '
', 'Carriage Return'], // 13
|
|
43
|
+
['[SO]', '', 'Shift Out'], // 14
|
|
44
|
+
['[SI]', '', 'Shift In'], // 15
|
|
45
|
+
['[DLE]', '', 'Data Link Escape'], // 16
|
|
46
|
+
['[Dcl]', '', 'XON Device Control 1'], // 17
|
|
47
|
+
['[DC2]', '', 'Device Control 2'], // 18
|
|
48
|
+
['[DC3]', '', 'XOFFDevice Control 3'], // 19
|
|
49
|
+
['[DC4]', '', 'Device Control 4'], // 20
|
|
50
|
+
['[NAK]', '', 'Negative Acknowledgement'], // 21
|
|
51
|
+
['[SYN]', '', 'Synchronous Idle'], // 22
|
|
52
|
+
['[ETB]', '', 'End of Trans. Block'], // 23
|
|
53
|
+
['[CAN]', '', 'Cancel'], // 24
|
|
54
|
+
['[EM]', '', 'End of Medium'], // 25
|
|
55
|
+
['[SUB]', '', 'Substitute'], // 26
|
|
56
|
+
['[ESC]', '', 'Escape'], // 27
|
|
57
|
+
['[FS]', '', 'File Separator'], // 28
|
|
58
|
+
['[GS]', '', 'Group Separator'], // 29
|
|
59
|
+
['[RS]', '', 'Record Separator'], // 30
|
|
60
|
+
['[US]', '', 'Unit Separator'], // 31
|
|
61
|
+
[' ', ' ', 'Mellanslag'], // 32
|
|
62
|
+
['!', '!', 'Utropstecken'], // 33
|
|
63
|
+
['"', '"', '" Citationstecken (Citattecken)'], // 34
|
|
64
|
+
['#', '#', 'Nummertecken (staket)'], // 35
|
|
65
|
+
['$', '$', 'Dollartecken'], // 36
|
|
66
|
+
['%', '%', 'Procenttecken'], // 37
|
|
67
|
+
['&', '&', '& Ochtecken'], // 38
|
|
68
|
+
['\'', ''', 'Apostrof'], // 39
|
|
69
|
+
['(', '(', 'Vänster parentes'], // 40
|
|
70
|
+
[')', ')', 'Höger parentes'], // 41
|
|
71
|
+
['*', '*', 'Asterisk'], // 42
|
|
72
|
+
['+', '+', 'Plus'], // 43
|
|
73
|
+
[',', ',', 'Komma'], // 44
|
|
74
|
+
['-', '-', 'Minus'], // 45
|
|
75
|
+
['.', '.', 'Punkt'], // 46
|
|
76
|
+
['/', '/', 'Divisionstecken (Slash)'], // 47
|
|
77
|
+
['0', '0', 'Siffran 0'], // 48
|
|
78
|
+
['1', '1', 'Siffran 1'], // 49
|
|
79
|
+
['2', '2', 'Siffran 2'], // 50
|
|
80
|
+
['3', '3', 'Siffran 3'], // 51
|
|
81
|
+
['4', '4', 'Siffran 4'], // 52
|
|
82
|
+
['5', '5', 'Siffran 5'], // 53
|
|
83
|
+
['6', '6', 'Siffran 6'], // 54
|
|
84
|
+
['7', '7', 'Siffran 7'], // 55
|
|
85
|
+
['8', '8', 'Siffran 8'], // 56
|
|
86
|
+
['9', '9', 'Siffran 9'], // 57
|
|
87
|
+
[':', ':', 'Kolon'], // 58
|
|
88
|
+
[';', ';', 'Semikolon'], // 59
|
|
89
|
+
['<', '<', ' Mindre än'], // 60
|
|
90
|
+
['=', '=', 'Lika med'], // 61
|
|
91
|
+
['>', '> Större än'], // 62
|
|
92
|
+
['?', '?', 'Frågetecken'], // 63
|
|
93
|
+
['@', '@', 'Snabel-A (At)'], // 64
|
|
94
|
+
['A', 'A', 'Versalt A'], // 65
|
|
95
|
+
['B', 'B', 'Versalt B'], // 66
|
|
96
|
+
['C', 'C', 'Versalt C'], // 67
|
|
97
|
+
['D', 'D', 'Versalt D'], // 68
|
|
98
|
+
['E', 'E', 'Versalt E'], // 69
|
|
99
|
+
['F', 'F', 'Versalt F'], // 70
|
|
100
|
+
['G', 'G', 'Versalt G'], // 71
|
|
101
|
+
['H', 'H', 'Versalt H'], // 72
|
|
102
|
+
['I', 'I', 'Versalt I'], // 73
|
|
103
|
+
['J', 'J', 'Versalt J'], // 74
|
|
104
|
+
['K', 'K', 'Versalt K'], // 75
|
|
105
|
+
['L', 'L', 'Versalt L'], // 76
|
|
106
|
+
['M', 'M', 'Versalt M'], // 77
|
|
107
|
+
['N', 'N', 'Versalt N'], // 78
|
|
108
|
+
['O', 'O', 'Versalt O'], // 79
|
|
109
|
+
['P', 'P', 'Versalt P'], // 80
|
|
110
|
+
['Q', 'Q', 'Versalt Q'], // 81
|
|
111
|
+
['R', 'R', 'Versalt R'], // 82
|
|
112
|
+
['S', 'S', 'Versalt S'], // 83
|
|
113
|
+
['T', 'T', 'Versalt T'], // 84
|
|
114
|
+
['U', 'U', 'Versalt U'], // 85
|
|
115
|
+
['V', 'V', 'Versalt V'], // 86
|
|
116
|
+
['W', 'W', 'Versalt W'], // 87
|
|
117
|
+
['X', 'X', 'Versalt X'], // 88
|
|
118
|
+
['Y', 'Y', 'Versalt Y'], // 89
|
|
119
|
+
['Z', 'Z', 'Versalt Z'], // 90
|
|
120
|
+
['[', '[', 'Vänster hakparentes'], // 91
|
|
121
|
+
['\'', '\', 'Backslash'], // 92
|
|
122
|
+
[']', ']', 'Höger hakparentes'], // 93
|
|
123
|
+
['^', '^', 'Utelämningstecken (Caret)'], // 94
|
|
124
|
+
['_', '_', 'Horisontell linje'], // 95
|
|
125
|
+
['`', '`', 'Grav ( Acute accent )'], // 96
|
|
126
|
+
['a', 'a', 'Gement a'], // 97
|
|
127
|
+
['b', 'b', 'Gement b'], // 98
|
|
128
|
+
['c', 'c', 'Gement c'], // 99
|
|
129
|
+
['d', 'd', 'Gement d'], // 100
|
|
130
|
+
['e', 'e', 'Gement e'], // 101
|
|
131
|
+
['f', 'f', 'Gement f'], // 102
|
|
132
|
+
['g', 'g', 'Gement g'], // 103
|
|
133
|
+
['h', 'h', 'Gement h'], // 104
|
|
134
|
+
['i', 'i', 'Gement i'], // 105
|
|
135
|
+
['j', 'j', 'Gement j'], // 106
|
|
136
|
+
['k', 'k', 'Gement k'], // 107
|
|
137
|
+
['l', 'l', 'Gement l'], // 108
|
|
138
|
+
['m', 'm', 'Gement m'], // 109
|
|
139
|
+
['n', 'n', 'Gement n'], // 110
|
|
140
|
+
['o', 'o', 'Gement o'], // 111
|
|
141
|
+
['p', 'p', 'Gement p'], // 112
|
|
142
|
+
['q', 'q', 'Gement q'], // 113
|
|
143
|
+
['r', 'r', 'Gement r'], // 114
|
|
144
|
+
['s', 's', 'Gement s'], // 115
|
|
145
|
+
['t', 't', 'Gement t'], // 116
|
|
146
|
+
['u', 'u', 'Gement u'], // 117
|
|
147
|
+
['v', 'v', 'Gement v'], // 118
|
|
148
|
+
['w', 'w', 'Gement w'], // 119
|
|
149
|
+
['x', 'x', 'Gement x'], // 120
|
|
150
|
+
['y', 'y', 'Gement y'], // 121
|
|
151
|
+
['z', 'z', 'Gement z'], // 122
|
|
152
|
+
['{', '{', 'Vänster krullparentes'], // 123
|
|
153
|
+
['|', '|', 'Vertikal linje'], // 124
|
|
154
|
+
['}', '}', 'Höger krullparentes'], // 125
|
|
155
|
+
['~', '~', 'Tilde'], // 126
|
|
156
|
+
['[DEL]', '', 'Delete'], // 127
|
|
157
|
+
['€', '€', 'Euro'], // 128
|
|
158
|
+
['[UNKNOWN]', '', ''], // 129
|
|
159
|
+
['‚', '‚', ''], // 130
|
|
160
|
+
['ƒ', 'ƒ', ''], // 131
|
|
161
|
+
['„', '„', ''], // 132
|
|
162
|
+
['…', '…', 'VHorisontal ellipsis'], // 133
|
|
163
|
+
['†', '†', 'Dagger'], // 134
|
|
164
|
+
['‡', '‡', 'Double dagger'], // 135
|
|
165
|
+
['ˆ', 'ˆ', 'Circumflex'], // 136
|
|
166
|
+
['‰', '‰', 'Promille'], // 137
|
|
167
|
+
['Š', 'Š', ''], // 138
|
|
168
|
+
['‹', '‹', 'Enkelt vinklat citat vänster'], // 139
|
|
169
|
+
['Œ', 'Œ', ''], // 140
|
|
170
|
+
['', '', ''], // 141
|
|
171
|
+
['Ž', 'Ž', ''], // 142
|
|
172
|
+
['', '', ' '], // 143
|
|
173
|
+
['', '', ''], // 144
|
|
174
|
+
['‘', '‘', 'Citat enkelt vänster'], // 145
|
|
175
|
+
['’', '’', 'Citat enkelt höger'], // 146
|
|
176
|
+
['“', '“', 'Citat dubbel vänster'], // 147
|
|
177
|
+
['”', '”', 'Citat dubbel höger'], // 148
|
|
178
|
+
['•', '•', ' '], // 149
|
|
179
|
+
['–', '–', 'Enkel dash'], // 150
|
|
180
|
+
['—', '—', 'Dubbel dash'], // 151
|
|
181
|
+
['', '˜', ''], // 152
|
|
182
|
+
['™', '™', 'Varumärke (Trademark)'], // 153
|
|
183
|
+
['š', 'š', ''], // 154
|
|
184
|
+
['›', '›', 'Enkelt vinklat citat höger'], // 155
|
|
185
|
+
['œ', 'œ', ' '], // 156
|
|
186
|
+
['', '', ''], // 157
|
|
187
|
+
['ž', 'ž', ''], // 158
|
|
188
|
+
['Ÿ', 'Ÿ', ''], // 159
|
|
189
|
+
['', ' Icke-brytande blanksteg'], // 160
|
|
190
|
+
['¡', '¡ Upp-och-nedvänt utropstecken'], // 161
|
|
191
|
+
['¢', '¢ Centtecken'], // 162
|
|
192
|
+
['£', '£ Pundtecken'], // 163
|
|
193
|
+
['¤', '¤ Allmän valutasymbol'], // 164
|
|
194
|
+
['¥', '¥ Yentecken'], // 165
|
|
195
|
+
['¦', '¦ Pipe/Vertikalt brutet streck'], // 166
|
|
196
|
+
['§', '§ Paragrafsymbol'], // 167
|
|
197
|
+
['¨', '¨ Trema (dieresis, omljud)'], // 168
|
|
198
|
+
['©', '©', 'Copyright-tecken'], // 169
|
|
199
|
+
['ª', 'ª', 'Feminine ordinal'], // 170
|
|
200
|
+
['«', '«', 'Dubbla vinkelcitationstecken (gåsögon), vänster'], // 171
|
|
201
|
+
['¬', '¬', 'Logiskt icke-tecken'], // 172
|
|
202
|
+
['', '­', 'Kort talstreck'], // 173
|
|
203
|
+
['®', '®', 'Registrerat varumärke'], // 174
|
|
204
|
+
['¯', '¯', 'Makron'], // 175
|
|
205
|
+
['°', '°', 'Gradtecken'], // 176
|
|
206
|
+
['±', '±', 'Plus-minus -tecken'], // 177
|
|
207
|
+
['²', '²', 'Upphöjt till 2'], // 178
|
|
208
|
+
['³', '³', 'Upphöjt till 3'], // 179
|
|
209
|
+
['´', '´', 'Accent'], // 180
|
|
210
|
+
['µ', 'µ', 'Mikrotecken'], // 181
|
|
211
|
+
['¶', '¶', 'Paragraftecken'], // 182
|
|
212
|
+
['·', '·', 'Mittenpunkt (skalärprodukt)'], // 183
|
|
213
|
+
['¸', '¸', 'Cedilj'], // 184
|
|
214
|
+
['¹', '¹', 'Mikro'], // 185
|
|
215
|
+
['º', 'º', 'Masculine ordinal'], // 186
|
|
216
|
+
['»', '»', 'Dubbla vinkelcitationstecken (gåsögon), höge'], // 187
|
|
217
|
+
['¼', '&fracl4;', 'En fjärdedel'], // 188
|
|
218
|
+
['½', '&fracl2;', ' En halv'], // 189
|
|
219
|
+
['¾', '¾', 'Tre fjärdedelar'], // 190
|
|
220
|
+
['¿', '¿', 'Upp-och-nedvänt frågetecken'], // 191
|
|
221
|
+
['À', 'À', 'A med grav accent'], // 192
|
|
222
|
+
['Á', 'Á', 'A med akut accent'], // 193
|
|
223
|
+
['Â', 'Â', 'A med cirkumflex'], // 194
|
|
224
|
+
['Ã', 'Ã', 'A med tilde'], // 195
|
|
225
|
+
['Ä', 'Ä', 'A med trema'], // 196
|
|
226
|
+
['Å', 'Å', 'A med ring'], // 197
|
|
227
|
+
['Æ', 'Æ', 'Ligatur A+E'], // 198
|
|
228
|
+
['Ç', 'Ç', 'C med cedilj'], // 199
|
|
229
|
+
['È', 'È', 'E med grav accent'], // 200
|
|
230
|
+
['É', 'É', 'E med akut accent'], // 201
|
|
231
|
+
['Ê', 'Ê', 'E med cirkumflex'], // 202
|
|
232
|
+
['Ë', 'Ë', 'E med trema'], // 203
|
|
233
|
+
['Ì', 'Ì I med grav accent'], // 204
|
|
234
|
+
['Í', 'Í I med akut accent'], // 205
|
|
235
|
+
['Î', 'Î I med cirkumflex'], // 206
|
|
236
|
+
['Ï', 'Ï I med trema'], // 207
|
|
237
|
+
['Ð', 'Ð (ETH)'], // 208
|
|
238
|
+
['Ñ', 'Ñ N med tilde'], // 209
|
|
239
|
+
['Ò', 'Ò O med grav accent'], // 210
|
|
240
|
+
['Ó', 'Ó O med akut accent'], // 211
|
|
241
|
+
['Ô', 'Ô O med cirkumflex'], // 212
|
|
242
|
+
['Õ', 'Õ O med tilde'], // 213
|
|
243
|
+
['Ö', 'Ö', 'O med trema'], // 214
|
|
244
|
+
['×', '×', 'Multiplikationstecken'], // 215
|
|
245
|
+
['Ø', 'Ø', 'Snedstruket O'], // 216
|
|
246
|
+
['Ù', 'Ù', 'U med grav accent'], // 217
|
|
247
|
+
['Ú', 'Ú', 'U med akut accent'], // 218
|
|
248
|
+
['Û', 'Û', 'U med cirkumflex'], // 219
|
|
249
|
+
['Ü', 'Ü', 'U med trema/umlaut'], // 220
|
|
250
|
+
['Ý', 'Ý', 'Tyskt dubbel-s'], // 221
|
|
251
|
+
['Þ', 'Þ', 'Isländska THORN-tecknet'], // 222
|
|
252
|
+
['ß', 'ß', 'Tyskt dubbel-S'], // 223
|
|
253
|
+
['à', 'à', 'a med grav accent'], // 224
|
|
254
|
+
['á', 'á', 'a med akut accent'], // 225
|
|
255
|
+
['â', 'â', 'a med cirkumflex'], // 226
|
|
256
|
+
['ã', 'ã', 'a med tilde'], // 227
|
|
257
|
+
['ä', 'ä', 'a med trema'], // 228
|
|
258
|
+
['å', 'å', 'a med ring'], // 229
|
|
259
|
+
['æ', 'æ', 'aelig'], // 230
|
|
260
|
+
['ç', 'ç', 'c med cedilj'], // 231
|
|
261
|
+
['è', 'è', 'e med grav accent'], // 232
|
|
262
|
+
['é', 'é', 'e med akut accent'], // 233
|
|
263
|
+
['ê', 'ê', 'e med cirkumflex'], // 234
|
|
264
|
+
['ë', 'ë', 'e med trema'], // 235
|
|
265
|
+
['ì', 'ì', 'i med grav accent'], // 236
|
|
266
|
+
['í', 'í', 'i med akut accent'], // 237
|
|
267
|
+
['î', 'î', 'i med cirkumflex'], // 238
|
|
268
|
+
['ï', 'ï', 'i med trema'], // 239
|
|
269
|
+
['ð', 'ð', 'eth'], // 240
|
|
270
|
+
['ñ', 'ñ', 'n med tilde'], // 241
|
|
271
|
+
['ò', 'ò', 'o med grav accent'], // 242
|
|
272
|
+
['ó', 'ó', 'o med akut accent'], // 243
|
|
273
|
+
['ô', 'ô', 'o med cirkumflex'], // 244
|
|
274
|
+
['õ', 'õ', 'o med tilde'], // 245
|
|
275
|
+
['ö', 'ö', 'o med trema'], // 246
|
|
276
|
+
['÷', '÷', 'Divisionstecken'], // 247
|
|
277
|
+
['ø', 'ø', 'Snedstruket o'], // 248
|
|
278
|
+
['ù', 'ù', 'u med grav accent'], // 249
|
|
279
|
+
['ú', 'ú', 'u med akut accent'], // 250
|
|
280
|
+
['û', 'û', 'u med cirkumflex'], // 251
|
|
281
|
+
['ü', 'ü', 'u med trema/umlaut'], // 252
|
|
282
|
+
['ý', 'ý', 'y med akut accent'], // 253
|
|
283
|
+
['þ', 'þ', 'Isländska thorn-tecknet'], // 254
|
|
284
|
+
['ÿ', 'ÿ', 'y med trema '] // 255
|
|
285
|
+
];
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
module.exports = AsciiDictionary;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
const AsciiDictionary = require('./ascii-dictionary');
|
|
5
|
+
const LogInner = require('z-abs-funclayer-engine-cs/clientServer/log/log-inner');
|
|
6
|
+
const LogPartText = require('z-abs-funclayer-engine-cs/clientServer/log/log-part-text');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class BinaryLog {
|
|
10
|
+
static MAX_CAPTION_SIZE = 30;
|
|
11
|
+
static BREAK_CAPTION_SIZE = BinaryLog.MAX_CAPTION_SIZE - 3;
|
|
12
|
+
|
|
13
|
+
static ROW_ORIGINAL_SIZE = 103;
|
|
14
|
+
static ROW_FORMATTED_SIZE = 103;
|
|
15
|
+
static POS_INDEX = [0, 3, 6, 9, 12, 15, 18, 21];
|
|
16
|
+
static GROUP_INDEX = [0, 26, 52, 78];
|
|
17
|
+
|
|
18
|
+
static generateLog(buffer, ipLog) {
|
|
19
|
+
if(Buffer.isBuffer(buffer)) {
|
|
20
|
+
return BinaryLog._generateLogBuffer(buffer, ipLog);
|
|
21
|
+
}
|
|
22
|
+
else if(typeof buffer === 'string') {
|
|
23
|
+
const bufferFromString = Buffer.from(buffer);
|
|
24
|
+
return BinaryLog._generateLogBuffer(bufferFromString, ipLog);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
static _generateLogBuffer(buffer, ipLog) {
|
|
29
|
+
const rows = Math.floor(buffer.length / 32);
|
|
30
|
+
const index = BinaryLog._logLoop(buffer, ipLog, -1, rows);
|
|
31
|
+
BinaryLog._logEnding(buffer, ipLog, index, rows);
|
|
32
|
+
if(!Array.isArray(ipLog)) {
|
|
33
|
+
const readableMsg = ipLog.innerLogs[0].logParts[0].text.slice(0).trim();
|
|
34
|
+
return readableMsg.length <= BinaryLog.MAX_CAPTION_SIZE ? readableMsg : readableMsg.substring(0, BinaryLog.BREAK_CAPTION_SIZE) + '...';
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
static _logLoop(buffer, ipLog, index, rows) {
|
|
42
|
+
for(let row = 0 ; row < rows; ++row) {
|
|
43
|
+
const resultBuffer = Buffer.alloc(BinaryLog.ROW_FORMATTED_SIZE, ' ');
|
|
44
|
+
for(let group = 0; group < 4; ++group) {
|
|
45
|
+
for(let pos = 0; pos < 8; ++pos) {
|
|
46
|
+
let i = BinaryLog.POS_INDEX[pos] + BinaryLog.GROUP_INDEX[group];
|
|
47
|
+
let hex = buffer[++index].toString(16).padStart(2, '0');
|
|
48
|
+
resultBuffer[i] = hex.charCodeAt(0);
|
|
49
|
+
resultBuffer[i + 1] = hex.charCodeAt(1);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
if(Array.isArray(ipLog)) {
|
|
53
|
+
ipLog.push(new LogPartText(resultBuffer.toString()));
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
ipLog.addLog(new LogInner(resultBuffer.toString()));
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return index;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
static _logEnding(buffer, ipLog, index, rows) {
|
|
63
|
+
let rowsLength = rows * BinaryLog.ROW_ORIGINAL_SIZE;
|
|
64
|
+
if(rowsLength < buffer.length) {
|
|
65
|
+
const resultBuffer = Buffer.alloc(BinaryLog.ROW_FORMATTED_SIZE, ' ');
|
|
66
|
+
for(let group = 0; group < 4; ++group) {
|
|
67
|
+
for(let pos = 0; pos < 8; ++pos) {
|
|
68
|
+
if(++rowsLength > buffer.length) {
|
|
69
|
+
if(Array.isArray(ipLog)) {
|
|
70
|
+
ipLog.push(new LogPartText(resultBuffer.toString()));
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
73
|
+
ipLog.addLog(new LogInner(resultBuffer.toString()));
|
|
74
|
+
}
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
let i = BinaryLog.POS_INDEX[pos] + BinaryLog.GROUP_INDEX[group];
|
|
78
|
+
let hex = buffer[++index].toString(16).padStart(2, '0');
|
|
79
|
+
resultBuffer[i] = hex.charCodeAt(0);
|
|
80
|
+
resultBuffer[i + 1] = hex.charCodeAt(1);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
module.exports = BinaryLog;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
// This is for protocols so bit 0 will give the value 128
|
|
6
|
+
|
|
7
|
+
// 0 1 2 3 4 5 6 7
|
|
8
|
+
// +-+-+-+-+-+-+-+-+
|
|
9
|
+
|
|
10
|
+
class BitByte {
|
|
11
|
+
static BYTE = [7, 6, 5, 4, 3, 2, 1, 0];
|
|
12
|
+
static BYTE_FILTER = [
|
|
13
|
+
[0b10000000, 0b11000000, 0b11100000, 0b11110000, 0b11111000, 0b11111100, 0b11111110, 0b11111111],
|
|
14
|
+
[NaN, 0b01000000, 0b01100000, 0b01110000, 0b01111000, 0b01111100, 0b01111110, 0b01111111],
|
|
15
|
+
[NaN, NaN, 0b00100000, 0b00110000, 0b00111000, 0b00111100, 0b00111110, 0b00111111],
|
|
16
|
+
[NaN, NaN, NaN, 0b00010000, 0b00011000, 0b00011100, 0b00011110, 0b00011111],
|
|
17
|
+
[NaN, NaN, NaN, NaN, 0b00001000, 0b00001100, 0b00001110, 0b00001111],
|
|
18
|
+
[NaN, NaN, NaN, NaN, NaN, 0b00000100, 0b00000110, 0b00000111],
|
|
19
|
+
[NaN, NaN, NaN, NaN, NaN, NaN, 0b00000010, 0b00000011],
|
|
20
|
+
[NaN, NaN, NaN, NaN, NaN, NaN, NaN, 0b00000001]
|
|
21
|
+
];
|
|
22
|
+
|
|
23
|
+
static getBit(byte, bit) {
|
|
24
|
+
return (byte & BitByte.BYTE_FILTER[bit][bit]) >> BitByte.BYTE[bit];
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
static getBits(byte, bitFrom, bitTo) {
|
|
28
|
+
return (byte & BitByte.BYTE_FILTER[bitFrom][bitTo]) >> BitByte.BYTE[bitTo];
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
static setBit(byte, bit, value = 1) {
|
|
32
|
+
if(1 === value) {
|
|
33
|
+
return byte | BitByte.BYTE_FILTER[bit][bit];
|
|
34
|
+
}
|
|
35
|
+
else if(0 === value) {
|
|
36
|
+
return byte & ~BitByte.BYTE_FILTER[bit][bit];
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
throw new Error('A bit can just be 0 or 1.');
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
static setBits(byte, bitFrom, bitTo, value) {
|
|
44
|
+
const zeroWHereValueVillBeSet = byte & ~BitByte.BYTE_FILTER[bitFrom][bitTo];
|
|
45
|
+
const shiftedValue = value << BitByte.BYTE[bitTo];
|
|
46
|
+
return zeroWHereValueVillBeSet | shiftedValue;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
module.exports = BitByte;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
const Address = require('../../address/address');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class BrowserData {
|
|
8
|
+
constructor(srcAddress, dstAddress) {
|
|
9
|
+
//this.srcAddress = 'DEFAULT_SRC' === srcAddress.addressName ? this._generateDefaultSrcAddress(srcAddress) : srcAddress;
|
|
10
|
+
this.srcAddress = srcAddress;
|
|
11
|
+
this.dstAddress = dstAddress;
|
|
12
|
+
this.name = `${srcAddress.addressName}.${srcAddress.incognitoBrowser ? '.' + srcAddress.incognitoBrowser : ''}${srcAddress.page}`;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
_generateDefaultSrcAddress(srcAddress) {
|
|
16
|
+
const generatedSrcAddress = Address.from(srcAddress);
|
|
17
|
+
generatedSrcAddress.host = '127.0.0.1';
|
|
18
|
+
generatedSrcAddress.port = 0;
|
|
19
|
+
generatedSrcAddress.family = 'IPv4';
|
|
20
|
+
return generatedSrcAddress;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
module.exports = BrowserData;
|