Skip to content

Commit f0e843b

Browse files
committed
Added indexedDb level
1 parent 4abea50 commit f0e843b

File tree

6 files changed

+132
-0
lines changed

6 files changed

+132
-0
lines changed

public/scripts/matmon-basic.js

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
function _0x5829(_0x2d0da5, _0x279e77) {
2+
const _0x572e56 = _0x572e();
3+
return (
4+
(_0x5829 = function (_0x58296d, _0x2be3e3) {
5+
_0x58296d = _0x58296d - 0xd0;
6+
let _0x5f32ac = _0x572e56[_0x58296d];
7+
return _0x5f32ac;
8+
}),
9+
_0x5829(_0x2d0da5, _0x279e77)
10+
);
11+
}
12+
13+
const _0x53537d = _0x5829;
14+
(function (_0xc90902, _0x2879bc) {
15+
const _0x4dbce3 = _0x5829,
16+
_0x28cf69 = _0xc90902();
17+
while (!![]) {
18+
try {
19+
const _0x28b5cd =
20+
(parseInt(_0x4dbce3(0xe0)) / 0x1) *
21+
(-parseInt(_0x4dbce3(0xdb)) / 0x2) +
22+
(parseInt(_0x4dbce3(0xd3)) / 0x3) *
23+
(-parseInt(_0x4dbce3(0xdf)) / 0x4) +
24+
(-parseInt(_0x4dbce3(0xd1)) / 0x5) *
25+
(parseInt(_0x4dbce3(0xd5)) / 0x6) +
26+
parseInt(_0x4dbce3(0xd4)) / 0x7 +
27+
(-parseInt(_0x4dbce3(0xd8)) / 0x8) *
28+
(parseInt(_0x4dbce3(0xe1)) / 0x9) +
29+
parseInt(_0x4dbce3(0xda)) / 0xa +
30+
(-parseInt(_0x4dbce3(0xd0)) / 0xb) *
31+
(-parseInt(_0x4dbce3(0xdc)) / 0xc);
32+
if (_0x28b5cd === _0x2879bc) break;
33+
else _0x28cf69['push'](_0x28cf69['shift']());
34+
} catch (_0xbce7d) {
35+
_0x28cf69['push'](_0x28cf69['shift']());
36+
}
37+
}
38+
})(_0x572e, 0xa230c);
39+
const db = new PouchDB(_0x53537d(0xd7)),
40+
O = JSON['parse'](document[_0x53537d(0xd9)]('__DATA__')[_0x53537d(0xd6)]),
41+
part1 = atob(decodeURIComponent(O['f'])),
42+
part2 = atob(decodeURIComponent(O['g']));
43+
db[_0x53537d(0xd2)]({ flag_part1: part1, _id: _0x53537d(0xde) }),
44+
db[_0x53537d(0xd2)]({
45+
flag_part2: part2,
46+
_id: _0x53537d(0xdd),
47+
});
48+
49+
function _0x572e() {
50+
const _0x3ffedf = [
51+
'22HyjFoB',
52+
'3681655wjPXvz',
53+
'put',
54+
'30rnYCTU',
55+
'7239330YvCtoV',
56+
'6SbwdID',
57+
'textContent',
58+
'flags',
59+
'1448RwGoDQ',
60+
'getElementById',
61+
'3078660aMhEsu',
62+
'560WoOQUY',
63+
'20644980VsSMPr',
64+
'flag_part_2',
65+
'_local/flag_part_1',
66+
'529124sQJCxC',
67+
'3119KMAEib',
68+
'58977VcAyOc',
69+
];
70+
_0x572e = function () {
71+
return _0x3ffedf;
72+
};
73+
return _0x572e();
74+
}

public/scripts/vendors/pouchdb-7.3.0.min.js

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/app.module.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { NetworkBasicController } from '~/controllers/network-basic.controller';
1111
import { LocalstorageBasicController } from '~/controllers/localstorage-basic.controller';
1212
import { DebuggerController } from './controllers/debugger.controller';
1313
import { CookieBasicController } from './controllers/cookie-basic.controller';
14+
import { IndexedDBBasicController } from './controllers/indexedDB-basic.controller';
1415

1516
@Module({
1617
controllers: [
@@ -23,6 +24,7 @@ import { CookieBasicController } from './controllers/cookie-basic.controller';
2324
LocalstorageBasicController,
2425
DebuggerController,
2526
CookieBasicController,
27+
IndexedDBBasicController,
2628
],
2729
providers: [AppService],
2830
imports: [

src/config.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ const config = {
3535
url: 'level-0d0b9a23',
3636
flag: createFlag('C00CK13_M0NST3R'),
3737
}),
38+
indexedDbBasic: createLevelConfig('INDEXEDDB_BASIC', {
39+
url: 'level-matmon',
40+
flag: createFlag('M4TM0N_M4ST3R'),
41+
}),
3842
},
3943
server: {
4044
port: +envWithDefault<number>('PORT', 3000),
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import { Controller, Get, Render } from '@nestjs/common';
2+
import config from '~/config';
3+
import { toBase64 } from '~/utils/toBase64';
4+
5+
const levelConfig = config.levels.indexedDbBasic;
6+
7+
@Controller(levelConfig.url)
8+
export class IndexedDBBasicController {
9+
@Get()
10+
@Render('indexedDB-basic.hbs')
11+
render() {
12+
const flag = levelConfig.flag;
13+
const halfLen = (flag.length / 2) | 0;
14+
const part1 = encodeURIComponent(toBase64(flag.substring(0, halfLen)));
15+
const part2 = encodeURIComponent(toBase64(flag.substring(halfLen)));
16+
17+
return {
18+
part1,
19+
part2,
20+
};
21+
}
22+
}

src/pages/indexedDB-basic.hbs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
{{> headers}}
5+
<script type="application/json" id="__DATA__">
6+
{
7+
"a": "{{encode d94ee2ad}}",
8+
"b": "d94ee2ad",
9+
"c": "0d0b9a23",
10+
"d": "ce38c27f",
11+
"e": "b195d810",
12+
"f": "{{part1}}",
13+
"g": "{{part2}}"
14+
}
15+
</script>
16+
17+
</head>
18+
<body class="center full-size">
19+
<h1 class="gradient-text gradient-1"></h1>
20+
<script async src="/public/scripts/vendors/pouchdb-7.3.0.min.js"></script>
21+
<script defer src="/public/scripts/matmon-basic.js"></script>
22+
</body>
23+
</html>

0 commit comments

Comments
 (0)