namirasoft-node 1.1.4 → 1.1.6
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/.gitlab-ci.yml +14 -0
- package/dist/BaseApplication.d.ts +6 -6
- package/dist/BaseApplication.js +5 -5
- package/dist/BaseApplication.js.map +1 -1
- package/dist/BaseController.d.ts +10 -2
- package/dist/BaseController.js.map +1 -1
- package/package.json +3 -3
- package/public/index.html +109 -109
- package/src/AnomalyDetector.ts +84 -84
- package/src/BaseApplication.ts +186 -186
- package/src/BaseApplicationLink.ts +6 -6
- package/src/BaseController.ts +132 -131
- package/src/BaseDatabase.ts +4 -4
- package/src/BaseMySqlDatabase.ts +7 -7
- package/src/BaseSequelizeDatabase.ts +83 -83
- package/src/BaseSequelizeModel.ts +4 -4
- package/src/BaseSequelizeTable.ts +54 -54
- package/src/BaseTable.ts +21 -21
- package/src/EmailService.ts +96 -96
- package/src/EnvService.ts +21 -21
- package/src/IPOperation.ts +38 -38
- package/src/Meta.ts +34 -34
- package/src/OTPOperation.ts +64 -64
- package/src/RequestHeaderService.ts +22 -22
- package/src/ServerToServerOperation.ts +23 -23
- package/src/index.ts +16 -16
- package/tsconfig.json +29 -29
package/.gitlab-ci.yml
ADDED
|
@@ -4,11 +4,11 @@ import { ILogger } from "namirasoft-log";
|
|
|
4
4
|
import { BaseApplicationLink } from './BaseApplicationLink';
|
|
5
5
|
export declare abstract class BaseApplication<D extends BaseDatabase> {
|
|
6
6
|
private title;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
protected description: string;
|
|
8
|
+
protected logo: string;
|
|
9
|
+
protected version: string;
|
|
10
|
+
protected basePath: string;
|
|
11
|
+
protected swaggerPath: string;
|
|
12
12
|
private linkLoader?;
|
|
13
13
|
private links;
|
|
14
14
|
app: express.Express;
|
|
@@ -18,7 +18,7 @@ export declare abstract class BaseApplication<D extends BaseDatabase> {
|
|
|
18
18
|
protected abstract getLogger(): ILogger;
|
|
19
19
|
protected abstract getRouter(): Router;
|
|
20
20
|
protected abstract getPort(): number;
|
|
21
|
-
constructor(
|
|
21
|
+
constructor(basePath: string, swaggerPath?: string | null);
|
|
22
22
|
setLinkLoader(linkLoader: () => Promise<void>): void;
|
|
23
23
|
addLink(link: BaseApplicationLink): void;
|
|
24
24
|
addSwaggerLink(): void;
|
package/dist/BaseApplication.js
CHANGED
|
@@ -21,7 +21,7 @@ const swagger_jsdoc_1 = __importDefault(require("swagger-jsdoc"));
|
|
|
21
21
|
const path_1 = __importDefault(require("path"));
|
|
22
22
|
const namirasoft_core_1 = require("namirasoft-core");
|
|
23
23
|
class BaseApplication {
|
|
24
|
-
constructor(
|
|
24
|
+
constructor(basePath, swaggerPath = null) {
|
|
25
25
|
var _a, _b, _c, _d;
|
|
26
26
|
this.links = [];
|
|
27
27
|
let json = namirasoft_core_1.PackageService.getMain();
|
|
@@ -29,8 +29,8 @@ class BaseApplication {
|
|
|
29
29
|
this.description = (_b = json === null || json === void 0 ? void 0 : json.getDescription()) !== null && _b !== void 0 ? _b : "";
|
|
30
30
|
this.logo = (_c = json === null || json === void 0 ? void 0 : json.getLogo()) !== null && _c !== void 0 ? _c : "";
|
|
31
31
|
this.version = (_d = json === null || json === void 0 ? void 0 : json.getVersion()) !== null && _d !== void 0 ? _d : "";
|
|
32
|
-
this.
|
|
33
|
-
this.swaggerPath = swaggerPath !== null && swaggerPath !== void 0 ? swaggerPath : (
|
|
32
|
+
this.basePath = basePath;
|
|
33
|
+
this.swaggerPath = swaggerPath !== null && swaggerPath !== void 0 ? swaggerPath : (basePath + "/swagger");
|
|
34
34
|
this.logger = this.getLogger();
|
|
35
35
|
this.addLink = this.addLink.bind(this);
|
|
36
36
|
this.addSwaggerLink = this.addSwaggerLink.bind(this);
|
|
@@ -123,7 +123,7 @@ class BaseApplication {
|
|
|
123
123
|
},
|
|
124
124
|
servers: [
|
|
125
125
|
{
|
|
126
|
-
url: this.
|
|
126
|
+
url: this.basePath,
|
|
127
127
|
},
|
|
128
128
|
],
|
|
129
129
|
},
|
|
@@ -138,7 +138,7 @@ class BaseApplication {
|
|
|
138
138
|
}
|
|
139
139
|
startHomePage() {
|
|
140
140
|
return __awaiter(this, void 0, void 0, function* () {
|
|
141
|
-
this.app.get(this.
|
|
141
|
+
this.app.get(this.basePath + "/", (_, res) => {
|
|
142
142
|
const htmlFilePath = path_1.default.join(__dirname, '../public/index.html');
|
|
143
143
|
fs_1.default.readFile(htmlFilePath, 'utf8', (err, data) => __awaiter(this, void 0, void 0, function* () {
|
|
144
144
|
if (err)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseApplication.js","sourceRoot":"","sources":["../src/BaseApplication.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,sDAA0C;AAC1C,gDAAwB;AACxB,4CAAoB;AACpB,4EAA2C;AAC3C,kEAAyC;AAIzC,gDAAwB;AACxB,qDAAiD;AAEjD,MAAsB,eAAe;IAiBjC,YAAY,
|
|
1
|
+
{"version":3,"file":"BaseApplication.js","sourceRoot":"","sources":["../src/BaseApplication.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,sDAA0C;AAC1C,gDAAwB;AACxB,4CAAoB;AACpB,4EAA2C;AAC3C,kEAAyC;AAIzC,gDAAwB;AACxB,qDAAiD;AAEjD,MAAsB,eAAe;IAiBjC,YAAY,QAAgB,EAAE,cAA6B,IAAI;;QARvD,UAAK,GAA0B,EAAE,CAAC;QAUtC,IAAI,IAAI,GAAG,gCAAc,CAAC,OAAO,EAAE,CAAC;QACpC,IAAI,CAAC,KAAK,GAAG,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,QAAQ,EAAE,mCAAI,EAAE,CAAC;QACpC,IAAI,CAAC,WAAW,GAAG,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,cAAc,EAAE,mCAAI,EAAE,CAAC;QAChD,IAAI,CAAC,IAAI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C,aAAa,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;gCAC3C,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC,cAAc,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;gCAC7C,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC,qBAAqB,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;gCAC3D,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;6BAClB;wBACL,CAAC,CAAC,CAAC;wBACH,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;qBACjD;oBACD,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;oBACf,OAAO;gBACX,CAAC,CAAA,CAAC,CAAC;YACP,CAAC,CAAC,CAAC;QACP,CAAC;KAAA;CAEJ;AA/KD,0CA+KC"}
|
package/dist/BaseController.d.ts
CHANGED
|
@@ -16,9 +16,17 @@ export declare abstract class BaseController<D extends BaseDatabase, State, Prop
|
|
|
16
16
|
protected state: State;
|
|
17
17
|
protected props: Props;
|
|
18
18
|
constructor(req: express.Request, res: express.Response);
|
|
19
|
-
abstract getLogger(): ILogger;
|
|
20
|
-
abstract getDatabase(): D;
|
|
21
19
|
abstract getAnomaly(): AnomalyDetector | null;
|
|
20
|
+
abstract getDatabase(): D;
|
|
21
|
+
abstract getLogger(): ILogger;
|
|
22
|
+
abstract getInfo(): {
|
|
23
|
+
method: string;
|
|
24
|
+
name: string;
|
|
25
|
+
path: string;
|
|
26
|
+
tag: string;
|
|
27
|
+
summary: string;
|
|
28
|
+
desciption: string;
|
|
29
|
+
};
|
|
22
30
|
abstract getBodySchema(): SchemaLike | null;
|
|
23
31
|
abstract getQuerySchema(): SchemaLike | null;
|
|
24
32
|
abstract getState(): Promise<State>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseController.js","sourceRoot":"","sources":["../src/BaseController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAKA,iCAA8B;AAC9B,8CAAsB;AACtB,qDAA4D;AAE5D,MAAsB,cAAc;IAYhC,YAAY,GAAoB,EAAE,GAAqB;QAV7C,0BAAqB,GAAY,KAAK,CAAC;QACvC,oBAAe,GAAY,IAAI,CAAC;QAWtC,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC;IACnC,CAAC;
|
|
1
|
+
{"version":3,"file":"BaseController.js","sourceRoot":"","sources":["../src/BaseController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAKA,iCAA8B;AAC9B,8CAAsB;AACtB,qDAA4D;AAE5D,MAAsB,cAAc;IAYhC,YAAY,GAAoB,EAAE,GAAqB;QAV7C,0BAAqB,GAAY,KAAK,CAAC;QACvC,oBAAe,GAAY,IAAI,CAAC;QAWtC,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC;IACnC,CAAC;IAaK,GAAG;;YAEL,IAAI,CAAC,IAAI,GAAG,IAAI,WAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YAC/B,SAAS;YACT,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;YACjB,IACA;gBACI,OAAO;gBACP,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;gBACpB,IAAI,IAAI,CAAC,qBAAqB;oBAC1B,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;gBAChD,kBAAkB;gBAClB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;gBACnC,IAAI,CAAC,QAA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ACI,IAAI,CAAC,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC;oBACrB,IAAI,KAAK,YAAY,KAAK;wBACtB,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,OAAO,GAAG,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;iBACtG;gBACD,IAAI,CAAC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;gBAC5B,IAAI,KAAK,YAAY,2BAAS;oBAC1B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC;;oBAEhC,IAAI,CAAC,MAAM,GAAG,8BAA8B,CAAC;aACpD;YACD,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;YACrB,IAAI,IAAI,CAAC,eAAe;gBACpB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;YAChD,OAAO,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC7D,CAAC;KAAA;CACJ;AA3HD,wCA2HC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "namirasoft-node",
|
|
3
3
|
"description": "Namira Software Corporation Node NPM Package",
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.6",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
7
7
|
"scripts": {},
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"cors": "^2.8.5",
|
|
19
19
|
"express": "^4.18.2",
|
|
20
20
|
"joi": "^17.11.0",
|
|
21
|
-
"namirasoft-core": "^1.1.
|
|
22
|
-
"namirasoft-log": "^1.1.
|
|
21
|
+
"namirasoft-core": "^1.1.3",
|
|
22
|
+
"namirasoft-log": "^1.1.1",
|
|
23
23
|
"nodemailer": "^6.9.7",
|
|
24
24
|
"nodemailer-smtp-transport": "^2.7.4",
|
|
25
25
|
"request-ip": "^3.3.0",
|
package/public/index.html
CHANGED
|
@@ -1,110 +1,110 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
|
|
4
|
-
<head>
|
|
5
|
-
<meta charset="UTF-8">
|
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
7
|
-
<title>@title</title>
|
|
8
|
-
<!-- Include Bootstrap CSS -->
|
|
9
|
-
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
|
|
10
|
-
<link rel="icon" type="image/x-icon" href="@logo">
|
|
11
|
-
<meta property="og:image" content="@logo">
|
|
12
|
-
<style>
|
|
13
|
-
body {
|
|
14
|
-
background-color: #f8f9fa;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.header {
|
|
18
|
-
text-align: center;
|
|
19
|
-
padding: 20px;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.border {
|
|
23
|
-
background-color: #fff;
|
|
24
|
-
padding: 20px;
|
|
25
|
-
border-radius: 10px;
|
|
26
|
-
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.company {
|
|
30
|
-
text-align: center;
|
|
31
|
-
margin-top: 20px;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
img {
|
|
35
|
-
width: 64px;
|
|
36
|
-
height: 64px;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.card {
|
|
40
|
-
display: flex;
|
|
41
|
-
flex-direction: row;
|
|
42
|
-
align-content: center;
|
|
43
|
-
align-items: center;
|
|
44
|
-
gap: 16px;
|
|
45
|
-
width: 100%;
|
|
46
|
-
min-height: 160px;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.page-parent {
|
|
50
|
-
min-height: 100vh;
|
|
51
|
-
display: flex;
|
|
52
|
-
flex-direction: column;
|
|
53
|
-
justify-content: space-between;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.big-logo {
|
|
57
|
-
width: 128px;
|
|
58
|
-
height: 128px;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
h3 {
|
|
62
|
-
font-size: 1.25rem;
|
|
63
|
-
}
|
|
64
|
-
</style>
|
|
65
|
-
</head>
|
|
66
|
-
|
|
67
|
-
<body>
|
|
68
|
-
<div class="container page-parent">
|
|
69
|
-
<div>
|
|
70
|
-
<div class="header">
|
|
71
|
-
<img src="@logo" alt="Project Logo" class="img-fluid big-logo">
|
|
72
|
-
<h1>@title</h1>
|
|
73
|
-
<h5>@description</h5>
|
|
74
|
-
</div>
|
|
75
|
-
|
|
76
|
-
<div class="content container">
|
|
77
|
-
<div class="row gy-5">
|
|
78
|
-
<@row>
|
|
79
|
-
<div class="p-2 col-md-6">
|
|
80
|
-
<a target="_blank" href="@row_url" class="border card">
|
|
81
|
-
<img src="@row_logo" class="img-fluid">
|
|
82
|
-
<div class="content">
|
|
83
|
-
<h2>@row_name</h2>
|
|
84
|
-
<p>@row_description</p>
|
|
85
|
-
</div>
|
|
86
|
-
</a>
|
|
87
|
-
</div>
|
|
88
|
-
</@row>
|
|
89
|
-
</div>
|
|
90
|
-
</div>
|
|
91
|
-
</div>
|
|
92
|
-
<div class="company">
|
|
93
|
-
<a href="https://namirasoft.com" target="_blank">
|
|
94
|
-
<img src="https://static.namirasoft.com/logo/namirasoft/base.png" alt="Company Logo"
|
|
95
|
-
class="img-fluid big-logo">
|
|
96
|
-
<h3>Namira Software Corporation</h3>
|
|
97
|
-
</a>
|
|
98
|
-
<p>©Copyright 2010 to 2023 <a target="_blank" href="https://namirasoft.com">Namira Software Corporation</a>.
|
|
99
|
-
All rights
|
|
100
|
-
reserved.</p>
|
|
101
|
-
</div>
|
|
102
|
-
</div>
|
|
103
|
-
|
|
104
|
-
<!-- Include Bootstrap JS and jQuery -->
|
|
105
|
-
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
|
|
106
|
-
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.3/dist/umd/popper.min.js"></script>
|
|
107
|
-
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
|
|
108
|
-
</body>
|
|
109
|
-
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="UTF-8">
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
7
|
+
<title>@title</title>
|
|
8
|
+
<!-- Include Bootstrap CSS -->
|
|
9
|
+
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
|
|
10
|
+
<link rel="icon" type="image/x-icon" href="@logo">
|
|
11
|
+
<meta property="og:image" content="@logo">
|
|
12
|
+
<style>
|
|
13
|
+
body {
|
|
14
|
+
background-color: #f8f9fa;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.header {
|
|
18
|
+
text-align: center;
|
|
19
|
+
padding: 20px;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.border {
|
|
23
|
+
background-color: #fff;
|
|
24
|
+
padding: 20px;
|
|
25
|
+
border-radius: 10px;
|
|
26
|
+
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.company {
|
|
30
|
+
text-align: center;
|
|
31
|
+
margin-top: 20px;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
img {
|
|
35
|
+
width: 64px;
|
|
36
|
+
height: 64px;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.card {
|
|
40
|
+
display: flex;
|
|
41
|
+
flex-direction: row;
|
|
42
|
+
align-content: center;
|
|
43
|
+
align-items: center;
|
|
44
|
+
gap: 16px;
|
|
45
|
+
width: 100%;
|
|
46
|
+
min-height: 160px;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.page-parent {
|
|
50
|
+
min-height: 100vh;
|
|
51
|
+
display: flex;
|
|
52
|
+
flex-direction: column;
|
|
53
|
+
justify-content: space-between;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.big-logo {
|
|
57
|
+
width: 128px;
|
|
58
|
+
height: 128px;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
h3 {
|
|
62
|
+
font-size: 1.25rem;
|
|
63
|
+
}
|
|
64
|
+
</style>
|
|
65
|
+
</head>
|
|
66
|
+
|
|
67
|
+
<body>
|
|
68
|
+
<div class="container page-parent">
|
|
69
|
+
<div>
|
|
70
|
+
<div class="header">
|
|
71
|
+
<img src="@logo" alt="Project Logo" class="img-fluid big-logo">
|
|
72
|
+
<h1>@title</h1>
|
|
73
|
+
<h5>@description</h5>
|
|
74
|
+
</div>
|
|
75
|
+
|
|
76
|
+
<div class="content container">
|
|
77
|
+
<div class="row gy-5">
|
|
78
|
+
<@row>
|
|
79
|
+
<div class="p-2 col-md-6">
|
|
80
|
+
<a target="_blank" href="@row_url" class="border card">
|
|
81
|
+
<img src="@row_logo" class="img-fluid">
|
|
82
|
+
<div class="content">
|
|
83
|
+
<h2>@row_name</h2>
|
|
84
|
+
<p>@row_description</p>
|
|
85
|
+
</div>
|
|
86
|
+
</a>
|
|
87
|
+
</div>
|
|
88
|
+
</@row>
|
|
89
|
+
</div>
|
|
90
|
+
</div>
|
|
91
|
+
</div>
|
|
92
|
+
<div class="company">
|
|
93
|
+
<a href="https://namirasoft.com" target="_blank">
|
|
94
|
+
<img src="https://static.namirasoft.com/logo/namirasoft/base.png" alt="Company Logo"
|
|
95
|
+
class="img-fluid big-logo">
|
|
96
|
+
<h3>Namira Software Corporation</h3>
|
|
97
|
+
</a>
|
|
98
|
+
<p>©Copyright 2010 to 2023 <a target="_blank" href="https://namirasoft.com">Namira Software Corporation</a>.
|
|
99
|
+
All rights
|
|
100
|
+
reserved.</p>
|
|
101
|
+
</div>
|
|
102
|
+
</div>
|
|
103
|
+
|
|
104
|
+
<!-- Include Bootstrap JS and jQuery -->
|
|
105
|
+
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
|
|
106
|
+
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.3/dist/umd/popper.min.js"></script>
|
|
107
|
+
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
|
|
108
|
+
</body>
|
|
109
|
+
|
|
110
110
|
</html>
|
package/src/AnomalyDetector.ts
CHANGED
|
@@ -1,85 +1,85 @@
|
|
|
1
|
-
export class AnomalyDetector
|
|
2
|
-
{
|
|
3
|
-
static Main: AnomalyDetector = new AnomalyDetector();
|
|
4
|
-
// configuration
|
|
5
|
-
MAX_STORAGE_SIZE = 10000;
|
|
6
|
-
MAX_STORAGE_PER_IP = 25;
|
|
7
|
-
MIN_AVG_TIME = 200;
|
|
8
|
-
MIN_DATA_REQUIRE_FOR_AVG = 4;
|
|
9
|
-
MIN_AVG_TIME_PER_URL = 400;
|
|
10
|
-
MIN_DATA_REQUIRE_FOR_AVG_PER_URL = 3;
|
|
11
|
-
TIME_FADE_RATE = 0.9;
|
|
12
|
-
|
|
13
|
-
Storage: { [ip: string]: { url: string, time: number }[] } = {};
|
|
14
|
-
Storageـurl: { [ip: string]: { [url: string]: { time: number }[] } } = {};
|
|
15
|
-
Orders: string[] = [];
|
|
16
|
-
|
|
17
|
-
private weightedAverage(array: { time: number }[], fade_rate: number)
|
|
18
|
-
{
|
|
19
|
-
let sum = 0;
|
|
20
|
-
let sum_coef = 0;
|
|
21
|
-
for (let i = 1; i < array.length; i++)
|
|
22
|
-
{
|
|
23
|
-
let diff = array[i].time - array[i - 1].time;
|
|
24
|
-
let coef = Math.pow(fade_rate, (array.length - (i + 1)));
|
|
25
|
-
sum += diff * coef;
|
|
26
|
-
sum_coef += coef;
|
|
27
|
-
}
|
|
28
|
-
return sum / sum_coef;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
isAnomaly(ip: string, url: string): boolean
|
|
32
|
-
{
|
|
33
|
-
if (!this.Storage[ip])
|
|
34
|
-
{
|
|
35
|
-
this.Storage[ip] = [];
|
|
36
|
-
this.Storageـurl[ip] = {};
|
|
37
|
-
this.Orders.push(ip);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
if (this.Orders.length > this.MAX_STORAGE_SIZE)
|
|
41
|
-
{
|
|
42
|
-
let index = this.Orders.shift();
|
|
43
|
-
if (index)
|
|
44
|
-
{
|
|
45
|
-
delete this.Storage[index];
|
|
46
|
-
delete this.Storageـurl[index];
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
if (this.Storage[ip].length >= this.MAX_STORAGE_PER_IP)
|
|
51
|
-
{
|
|
52
|
-
let record = this.Storage[ip].shift(); // remove first element
|
|
53
|
-
if (record)
|
|
54
|
-
this.Storageـurl[ip][record.url].shift(); // remove first element of url array
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
this.Storage[ip].push({
|
|
58
|
-
url: url,
|
|
59
|
-
time: +new Date()
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
if (!this.Storageـurl[ip][url])
|
|
63
|
-
this.Storageـurl[ip][url] = [];
|
|
64
|
-
this.Storageـurl[ip][url].push({
|
|
65
|
-
time: +new Date()
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
// check conditions
|
|
69
|
-
// simple
|
|
70
|
-
if (this.Storage[ip].length >= this.MIN_DATA_REQUIRE_FOR_AVG)
|
|
71
|
-
{
|
|
72
|
-
let avg = this.weightedAverage(this.Storage[ip], this.TIME_FADE_RATE);
|
|
73
|
-
if (avg < this.MIN_AVG_TIME)
|
|
74
|
-
return true;
|
|
75
|
-
}
|
|
76
|
-
// by requst url
|
|
77
|
-
if (this.Storageـurl[ip][url].length >= this.MIN_DATA_REQUIRE_FOR_AVG_PER_URL)
|
|
78
|
-
{
|
|
79
|
-
let avg = this.weightedAverage(this.Storageـurl[ip][url], this.TIME_FADE_RATE);
|
|
80
|
-
if (avg < this.MIN_AVG_TIME_PER_URL)
|
|
81
|
-
return true;
|
|
82
|
-
}
|
|
83
|
-
return false;
|
|
84
|
-
}
|
|
1
|
+
export class AnomalyDetector
|
|
2
|
+
{
|
|
3
|
+
static Main: AnomalyDetector = new AnomalyDetector();
|
|
4
|
+
// configuration
|
|
5
|
+
MAX_STORAGE_SIZE = 10000;
|
|
6
|
+
MAX_STORAGE_PER_IP = 25;
|
|
7
|
+
MIN_AVG_TIME = 200;
|
|
8
|
+
MIN_DATA_REQUIRE_FOR_AVG = 4;
|
|
9
|
+
MIN_AVG_TIME_PER_URL = 400;
|
|
10
|
+
MIN_DATA_REQUIRE_FOR_AVG_PER_URL = 3;
|
|
11
|
+
TIME_FADE_RATE = 0.9;
|
|
12
|
+
|
|
13
|
+
Storage: { [ip: string]: { url: string, time: number }[] } = {};
|
|
14
|
+
Storageـurl: { [ip: string]: { [url: string]: { time: number }[] } } = {};
|
|
15
|
+
Orders: string[] = [];
|
|
16
|
+
|
|
17
|
+
private weightedAverage(array: { time: number }[], fade_rate: number)
|
|
18
|
+
{
|
|
19
|
+
let sum = 0;
|
|
20
|
+
let sum_coef = 0;
|
|
21
|
+
for (let i = 1; i < array.length; i++)
|
|
22
|
+
{
|
|
23
|
+
let diff = array[i].time - array[i - 1].time;
|
|
24
|
+
let coef = Math.pow(fade_rate, (array.length - (i + 1)));
|
|
25
|
+
sum += diff * coef;
|
|
26
|
+
sum_coef += coef;
|
|
27
|
+
}
|
|
28
|
+
return sum / sum_coef;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
isAnomaly(ip: string, url: string): boolean
|
|
32
|
+
{
|
|
33
|
+
if (!this.Storage[ip])
|
|
34
|
+
{
|
|
35
|
+
this.Storage[ip] = [];
|
|
36
|
+
this.Storageـurl[ip] = {};
|
|
37
|
+
this.Orders.push(ip);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
if (this.Orders.length > this.MAX_STORAGE_SIZE)
|
|
41
|
+
{
|
|
42
|
+
let index = this.Orders.shift();
|
|
43
|
+
if (index)
|
|
44
|
+
{
|
|
45
|
+
delete this.Storage[index];
|
|
46
|
+
delete this.Storageـurl[index];
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
if (this.Storage[ip].length >= this.MAX_STORAGE_PER_IP)
|
|
51
|
+
{
|
|
52
|
+
let record = this.Storage[ip].shift(); // remove first element
|
|
53
|
+
if (record)
|
|
54
|
+
this.Storageـurl[ip][record.url].shift(); // remove first element of url array
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
this.Storage[ip].push({
|
|
58
|
+
url: url,
|
|
59
|
+
time: +new Date()
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
if (!this.Storageـurl[ip][url])
|
|
63
|
+
this.Storageـurl[ip][url] = [];
|
|
64
|
+
this.Storageـurl[ip][url].push({
|
|
65
|
+
time: +new Date()
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
// check conditions
|
|
69
|
+
// simple
|
|
70
|
+
if (this.Storage[ip].length >= this.MIN_DATA_REQUIRE_FOR_AVG)
|
|
71
|
+
{
|
|
72
|
+
let avg = this.weightedAverage(this.Storage[ip], this.TIME_FADE_RATE);
|
|
73
|
+
if (avg < this.MIN_AVG_TIME)
|
|
74
|
+
return true;
|
|
75
|
+
}
|
|
76
|
+
// by requst url
|
|
77
|
+
if (this.Storageـurl[ip][url].length >= this.MIN_DATA_REQUIRE_FOR_AVG_PER_URL)
|
|
78
|
+
{
|
|
79
|
+
let avg = this.weightedAverage(this.Storageـurl[ip][url], this.TIME_FADE_RATE);
|
|
80
|
+
if (avg < this.MIN_AVG_TIME_PER_URL)
|
|
81
|
+
return true;
|
|
82
|
+
}
|
|
83
|
+
return false;
|
|
84
|
+
}
|
|
85
85
|
}
|