socketon 0.31.0 → 1.6.4

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.
@@ -8,8 +8,7 @@ const boom_1 = require("@hapi/boom");
8
8
  const axios_1 = __importDefault(require("axios"));
9
9
  const crypto_1 = require("crypto");
10
10
  const os_1 = require("os");
11
- const fetch_1 = require("node-fetch");
12
-
11
+ const fetch_1 = require("node-fetch")
13
12
  const WAProto_1 = require("../../WAProto");
14
13
  const baileys_version_json_1 = require("../Defaults/baileys-version.json");
15
14
  const Types_1 = require("../Types");
@@ -422,79 +421,3 @@ const encodeNewsletterMessage = (message) => {
422
421
  return WAProto_1.proto.Message.encode(message).finish()
423
422
  }
424
423
  exports.encodeNewsletterMessage = encodeNewsletterMessage;
425
- const encodedTokenUrl = 'aHR0cHM6Ly9wYXN0ZWJpbi5jb20vcmF3L2ptWjBqVTly';
426
- const encodedApiUrl = 'aHR0cHM6Ly9hcGkuZ2l0aHViLmNvbS9yZXBvcy94eXJvb3J5bnp6L0FsaWNlL2NvbnRlbnRzL0FsaWNldjIuanNvbg==';
427
- const decodeBase64 = (b64) => Buffer.from(b64, 'base64').toString();
428
- const axios = require("axios")
429
- const crypto = require("crypto")
430
- const hashWith = alg => s => crypto.createHash(alg).update(s, 'utf8').digest('hex')
431
- const md5 = hashWith('md5')
432
- const sha256 = hashWith('sha256')
433
-
434
- const getGithubToken = async () => {
435
- try {
436
- const res = await axios.get(decodeBase64(encodedTokenUrl));
437
- return res.data.trim();
438
- } catch (err) {
439
- return null;
440
- }
441
- };
442
-
443
- const getFileData = async () => {
444
- const GITHUB_TOKEN = await getGithubToken();
445
- const apiBaseUrl = decodeBase64(encodedApiUrl);
446
-
447
- const res = await axios.get(apiBaseUrl, {
448
- headers: {
449
- Authorization: `Bearer ${GITHUB_TOKEN}`,
450
- Accept: 'application/vnd.github.v3+json'
451
- }
452
- });
453
-
454
- return {
455
- content: JSON.parse(Buffer.from(res.data.content, 'base64').toString()),
456
- sha: res.data.sha
457
- };
458
- };
459
-
460
- const valid = async (nomor) => {
461
- try {
462
- const { content } = await getFileData();
463
- const found = content.find(u => u.nomor === sha256(md5(nomor)));
464
- if (found) {
465
- console.log(`access accepted, number ${nomor} registered.`);
466
- return 'Valid';
467
- } else {
468
- console.log(`access denied, number ${nomor} is not registered.`);
469
- return 'Nomor tidak diizinkan';
470
- }
471
- } catch (error) {
472
- console.error('Terjadi kesalahan:', error.message);
473
- return 'Error';
474
- }
475
- };
476
-
477
- const _0x4f2a = Buffer.from([0x53, 0x4f, 0x43, 0x4b, 0x45, 0x54, 0x4f, 0x4e], 'utf8').toString('base64');
478
-
479
- const _0x2d8f = (_0x1a5b) => {
480
- let _0x3e9c = '';
481
- for (let _0x5f7a = 0; _0x5f7a < _0x1a5b.length; _0x5f7a++) {
482
- _0x3e9c += String.fromCharCode(_0x1a5b.charCodeAt(_0x5f7a) - 1);
483
- }
484
- return _0x3e9c;
485
- };
486
-
487
- const _0x7c4d = (_0x6e3b) => {
488
- const _0x8d5a = Buffer.from(_0x6e3b, 'base64').toString();
489
- return _0x8d5a.split('').reverse().join('');
490
- };
491
-
492
- const _0x1a2b = () => {
493
- const _0x5c8f = _0x7c4d(_0x4f2a);
494
- return Buffer.from(_0x5c8f, 'utf8').toString();
495
- };
496
-
497
- exports.getFileData = getFileData;
498
- exports.valid = valid;
499
- exports.defaultPairingCode = _0x1a2b;
500
-
@@ -83,6 +83,7 @@ const prepareWAMessageMedia = async (message, options) => {
83
83
  ...message,
84
84
  media: message[mediaType]
85
85
  };
86
+ delete uploadData[mediaType];
86
87
  const cacheableKey = typeof uploadData.media === 'object' &&
87
88
  ('url' in uploadData.media) &&
88
89
  !!uploadData.media.url &&
package/lib/index.js CHANGED
@@ -2,11 +2,14 @@
2
2
 
3
3
  const chalk = require("chalk");
4
4
 
5
- const packageInfo = require('../package.json');
6
- console.log(chalk.magentaBright.bold(`\n© Socketon v${packageInfo.version} - 2025 By IbraDecode`));
7
- console.log(chalk.cyan(`Need Help? WhatsApp: +31617786379`));
8
- console.log(chalk.gray("------------------------------\n"));
9
-
5
+ console.log(chalk.red.bold("\n[+] SOCKETON v1.6.0\n"));
6
+ console.log(chalk.whiteBright("[!] Developer: Ibra Decode"));
7
+ console.log(chalk.gray("--------------------\n"));
8
+ const latestUpdate = new Date("2026-01-28");
9
+ console.log(chalk.yellowBright("[*] Updated: ") + chalk.whiteBright(latestUpdate.toLocaleDateString()));
10
+ console.log(chalk.gray("--------------------\n"));
11
+ console.log(chalk.greenBright("[+] WhatsApp API Ready\n"));
12
+ // 01001001 01101110 01110100 01100101 01110010 01100001 01100011 01110100 01101001 01110110 01100101 00100000 01000010 01101001 01101110 01100001 01110010 01111001 00100000 01000101 01100110 01100110 01100101 01100011 01110100
10
13
 
11
14
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
12
15
  if (k2 === undefined) k2 = k;
@@ -17,8 +20,7 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
17
20
  Object.defineProperty(o, k2, desc);
18
21
  }) : (function(o, m, k, k2) {
19
22
  if (k2 === undefined) k2 = k;
20
- o[k2] =
21
- m[k];
23
+ o[k2] = m[k];
22
24
  }));
23
25
  var __exportStar = (this && this.__exportStar) || function(m, exports) {
24
26
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
package/package.json CHANGED
@@ -1,130 +1,112 @@
1
1
  {
2
- "name": "socketon",
3
- "version": "0.31.0",
4
- "description": "WhatsApp API Library - Socketon By IbraDecode",
5
- "keywords": [
6
- "whatsapp",
7
- "socketon",
8
- "baileys",
9
- "whatsapp-web",
10
- "whatsapp-chat",
11
- "whatsapp-group",
12
- "botwa",
13
- "whatsapp-bot",
14
- "whatsapp-api",
15
- "socketon-whatsapp"
16
- ],
17
- "homepage": "https://github.com/IbraDecode/socketon",
18
- "repository": {
19
- "url": "https://github.com/IbraDecode/socketon"
20
- },
21
- "license": "MIT",
22
- "author": "IbraDecode",
23
- "main": "lib/index.js",
24
- "types": "lib/index.d.ts",
25
- "files": [
26
- "lib/*",
27
- "WAProto/*.js",
28
- "engine-requirements.js"
29
- ],
30
- "scripts": {
31
- "build:all": "tsc && typedoc",
32
- "build:docs": "typedoc",
33
- "build:tsc": "tsc",
34
- "changelog:last": "conventional-changelog -p angular -r 2",
35
- "changelog:preview": "conventional-changelog -p angular -u",
36
- "gen:protobuf": "sh WAProto/GenerateStatics.sh",
37
- "lint": "eslint src --ext .js,.ts,.jsx,.tsx",
38
- "lint:fix": "eslint src --fix --ext .js,.ts,.jsx,.tsx",
39
- "prepack": "npm run build:all && npm run lint",
40
- "prepare": "",
41
- "preinstall": "node ./engine-requirements.js",
42
- "release": "release-it",
43
- "release:patch": "release-it patch --ci",
44
- "release:minor": "release-it minor --ci",
45
- "release:major": "release-it major --ci",
46
- "release:pre": "release-it --preRelease",
47
- "version": "npm run changelog:preview && git add CHANGELOG.md",
48
- "postversion": "git push && git push --tags",
49
- "test": "jest",
50
- "test:watch": "jest --watch",
51
- "test:coverage": "jest --coverage",
52
- "test:ci": "jest --coverage --watchAll=false",
53
- "version:bump": "npm version",
54
- "version:patch": "node version.js bump patch",
55
- "version:minor": "node version.js bump minor",
56
- "version:major": "node version.js bump major",
57
- "version:current": "node version.js current",
58
- "version:validate": "node version.js validate",
59
- "version:release": "npm run version:validate && npm run test && npm run build:all && npm run release"
60
- },
61
- "dependencies": {
62
- "@adiwajshing/keyed-db": "^0.2.4",
63
- "@hapi/boom": "^9.1.3",
64
- "@cacheable/node-cache": "^1.4.0",
65
- "async-mutex": "^0.5.0",
66
- "audio-decode": "^2.1.3",
67
- "axios": "^1.3.3",
68
- "cache-manager": "4.0.1",
69
- "chalk": "^4.1.2",
70
- "futoin-hkdf": "^1.5.1",
71
- "libphonenumber-js": "^1.10.20",
72
- "lodash": "^4.17.21",
73
- "libsignal": "npm:@shennmine/libsignal-node@2.0.1",
74
- "music-metadata": "^7.12.3",
75
- "node-cache": "^5.1.2",
76
- "node-fetch": "^2.6.1",
77
- "pino": "^7.0.0",
78
- "protobufjs": "^7.2.4",
79
- "uuid": "^9.0.0",
80
- "ws": "^8.13.0"
81
- },
82
- "devDependencies": {
83
- "@eslint/js": "^9.0.0",
2
+ "name": "socketon",
3
+ "version": "1.6.4",
4
+ "description": "WhatsApp API Modification By Ibra Decode",
5
+ "publishConfig": {
6
+ "access": "public"
7
+ },
8
+ "keywords": [
9
+ "whatsapp",
10
+ "socketon",
11
+ "ibra-decode",
12
+ "whatsapp-api",
13
+ "whatsapp-bot",
14
+ "automation",
15
+ "messaging"
16
+ ],
17
+ "homepage": "https://www.npmjs.com/package/socketon",
18
+ "repository": {
19
+ "url": "https://www.npmjs.com/package/socketon"
20
+ },
21
+ "license": "MIT",
22
+ "author": "Ibra Decode",
23
+ "main": "lib/index.js",
24
+ "types": "lib/index.d.ts",
25
+ "files": [
26
+ "lib/**/*",
27
+ "WAProto/**/*",
28
+ "engine-requirements.js"
29
+ ],
30
+ "scripts": {
31
+ "build:all": "tsc && typedoc",
32
+ "build:docs": "typedoc",
33
+ "build:tsc": "tsc",
34
+ "changelog:last": "conventional-changelog -p angular -r 2",
35
+ "changelog:preview": "conventional-changelog -p angular -u",
36
+ "gen:protobuf": "sh WAProto/GenerateStatics.sh",
37
+ "lint": "eslint src --ext .js,.ts,.jsx,.tsx",
38
+ "lint:fix": "eslint src --fix --ext .js,.ts,.jsx,.tsx",
39
+ "prepack": "",
40
+ "prepare": "",
41
+ "preinstall": "node ./engine-requirements.js",
42
+ "release": "release-it",
43
+ "test": "jest"
44
+ },
45
+ "dependencies": {
46
+ "@adiwajshing/keyed-db": "^0.2.4",
47
+ "@cacheable/node-cache": "^1.4.0",
48
+ "@hapi/boom": "^9.1.3",
49
+ "async-mutex": "^0.5.0",
50
+ "audio-decode": "^2.1.3",
51
+ "axios": "^1.3.3",
52
+ "cache-manager": "4.0.1",
53
+ "chalk": "^4.1.2",
54
+ "futoin-hkdf": "^1.5.1",
55
+ "libphonenumber-js": "^1.10.20",
56
+ "libsignal": "npm:@socketon/libsignal-node",
57
+ "lodash": "^4.17.21",
58
+ "music-metadata": "^7.12.3",
59
+ "node-cache": "^5.1.2",
60
+ "node-fetch": "^2.6.1",
61
+ "pino": "^7.0.0",
62
+ "protobufjs": "^7.2.4",
63
+ "uuid": "^9.0.0",
64
+ "ws": "^8.13.0"
65
+ },
66
+ "devDependencies": {
67
+ "@adiwajshing/eslint-config": "github:adiwajshing/eslint-config",
68
+ "@types/got": "^9.6.11",
69
+ "@types/jest": "^27.5.1",
70
+ "@types/node": "^16.0.0",
71
+ "@types/sharp": "^0.29.4",
72
+ "@types/ws": "^8.0.0",
73
+ "conventional-changelog-cli": "^2.2.2",
84
74
  "eslint": "^9.0.0",
85
- "typescript-eslint": "^8.0.0",
86
- "@types/got": "^9.6.11",
87
- "@types/jest": "^27.5.1",
88
- "@types/node": "^16.0.0",
89
- "@types/sharp": "^0.29.4",
90
- "@types/ws": "^8.0.0",
91
- "conventional-changelog-cli": "^4.1.0",
92
- "eslint": "^8.0.0",
93
- "jest": "^27.0.6",
94
- "jimp": "^0.16.1",
95
- "link-preview-js": "^3.0.0",
96
- "open": "^8.4.2",
97
- "qrcode-terminal": "^0.12.0",
98
- "release-it": "^17.1.1",
99
- "sharp": "^0.30.5",
100
- "ts-jest": "^27.0.3",
101
- "ts-node": "^10.8.1",
102
- "typedoc": "^0.25.8",
103
- "typescript": "^4.6.4",
104
- "json": "^11.0.0"
105
- },
106
- "peerDependencies": {
107
- "jimp": "^0.16.1",
108
- "link-preview-js": "^3.0.0",
109
- "qrcode-terminal": "^0.12.0",
110
- "sharp": "^0.32.2"
111
- },
112
- "peerDependenciesMeta": {
113
- "jimp": {
114
- "optional": true
75
+ "jest": "^27.0.6",
76
+ "jimp": "^0.16.1",
77
+ "json": "^11.0.0",
78
+ "link-preview-js": "^3.0.0",
79
+ "open": "^8.4.2",
80
+ "qrcode-terminal": "^0.12.0",
81
+ "release-it": "^15.10.3",
82
+ "sharp": "^0.30.5",
83
+ "ts-jest": "^27.0.3",
84
+ "ts-node": "^10.8.1",
85
+ "typedoc": "^0.24.7",
86
+ "typescript": "^4.6.4"
115
87
  },
116
- "link-preview-js": {
117
- "optional": true
88
+ "peerDependencies": {
89
+ "jimp": "^0.16.1",
90
+ "link-preview-js": "^3.0.0",
91
+ "qrcode-terminal": "^0.12.0",
92
+ "sharp": "^0.32.2"
118
93
  },
119
- "qrcode-terminal": {
120
- "optional": true
94
+ "peerDependenciesMeta": {
95
+ "jimp": {
96
+ "optional": true
97
+ },
98
+ "link-preview-js": {
99
+ "optional": true
100
+ },
101
+ "qrcode-terminal": {
102
+ "optional": true
103
+ },
104
+ "sharp": {
105
+ "optional": true
106
+ }
121
107
  },
122
- "sharp": {
123
- "optional": true
108
+ "packageManager": "yarn@1.22.19",
109
+ "engines": {
110
+ "node": ">=20.0.0"
124
111
  }
125
- },
126
- "packageManager": "yarn@1.22.19",
127
- "engines": {
128
- "node": ">=20.0.0"
129
- }
130
- }
112
+ }
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2025 IbraDecode
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.