socketon 0.30.7 → 1.6.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.
- package/README.md +37 -158
- package/WAProto/GenerateStatics.sh +4 -0
- package/WAProto/WAProto.proto +3345 -0
- package/WAProto/index.d.ts +37016 -0
- package/lib/Socket/business.d.ts +1 -1
- package/lib/Socket/chats.d.ts +1 -1
- package/lib/Socket/chats.js +28 -15
- package/lib/Socket/groups.d.ts +1 -1
- package/lib/Socket/{dugong.js → ibranihbossenggoldong.js} +10 -10
- package/lib/Socket/index.d.ts +1 -1
- package/lib/Socket/messages-send.d.ts +1 -1
- package/lib/Socket/messages-send.js +55 -55
- package/lib/Socket/newsletter.d.ts +1 -1
- package/lib/Socket/newsletter.js +63 -14
- package/lib/Socket/registration.d.ts +1 -1
- package/lib/Socket/socket.d.ts +1 -1
- package/lib/Socket/socket.js +26 -21
- package/lib/Socket/usync.d.ts +1 -1
- package/lib/Utils/generics.js +1 -78
- package/lib/Utils/messages.js +1 -0
- package/lib/index.js +9 -7
- package/package.json +16 -19
- package/LICENSE +0 -21
package/lib/Utils/generics.js
CHANGED
|
@@ -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
|
-
|
package/lib/Utils/messages.js
CHANGED
|
@@ -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
|
-
console.log(chalk.
|
|
6
|
-
console.log(chalk.
|
|
7
|
-
console.log(chalk.
|
|
8
|
-
|
|
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,30 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "socketon",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "WhatsApp API
|
|
3
|
+
"version": "1.6.0",
|
|
4
|
+
"description": "WhatsApp API Modification By Ibra Decode",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"whatsapp",
|
|
7
7
|
"socketon",
|
|
8
|
-
"
|
|
9
|
-
"whatsapp-web",
|
|
10
|
-
"whatsapp-chat",
|
|
11
|
-
"whatsapp-group",
|
|
12
|
-
"botwa",
|
|
13
|
-
"whatsapp-bot",
|
|
8
|
+
"ibra-decode",
|
|
14
9
|
"whatsapp-api",
|
|
15
|
-
"
|
|
10
|
+
"whatsapp-bot",
|
|
11
|
+
"automation",
|
|
12
|
+
"messaging"
|
|
16
13
|
],
|
|
17
|
-
"homepage": "https://
|
|
14
|
+
"homepage": "https://www.npmjs.com/package/socketon",
|
|
18
15
|
"repository": {
|
|
19
|
-
"url": "https://
|
|
16
|
+
"url": "https://www.npmjs.com/package/socketon"
|
|
20
17
|
},
|
|
21
18
|
"license": "MIT",
|
|
22
|
-
"author": "
|
|
19
|
+
"author": "Ibra Decode",
|
|
23
20
|
"main": "lib/index.js",
|
|
24
21
|
"types": "lib/index.d.ts",
|
|
25
22
|
"files": [
|
|
26
|
-
"lib
|
|
27
|
-
"WAProto
|
|
23
|
+
"lib/**/*",
|
|
24
|
+
"WAProto/**/*",
|
|
28
25
|
"engine-requirements.js"
|
|
29
26
|
],
|
|
30
27
|
"scripts": {
|
|
@@ -44,8 +41,8 @@
|
|
|
44
41
|
},
|
|
45
42
|
"dependencies": {
|
|
46
43
|
"@adiwajshing/keyed-db": "^0.2.4",
|
|
47
|
-
"@hapi/boom": "^9.1.3",
|
|
48
44
|
"@cacheable/node-cache": "^1.4.0",
|
|
45
|
+
"@hapi/boom": "^9.1.3",
|
|
49
46
|
"async-mutex": "^0.5.0",
|
|
50
47
|
"audio-decode": "^2.1.3",
|
|
51
48
|
"axios": "^1.3.3",
|
|
@@ -53,8 +50,8 @@
|
|
|
53
50
|
"chalk": "^4.1.2",
|
|
54
51
|
"futoin-hkdf": "^1.5.1",
|
|
55
52
|
"libphonenumber-js": "^1.10.20",
|
|
53
|
+
"libsignal": "npm:@socketon/libsignal-node",
|
|
56
54
|
"lodash": "^4.17.21",
|
|
57
|
-
"libsignal": "npm:@shennmine/libsignal-node@2.0.1",
|
|
58
55
|
"music-metadata": "^7.12.3",
|
|
59
56
|
"node-cache": "^5.1.2",
|
|
60
57
|
"node-fetch": "^2.6.1",
|
|
@@ -71,9 +68,10 @@
|
|
|
71
68
|
"@types/sharp": "^0.29.4",
|
|
72
69
|
"@types/ws": "^8.0.0",
|
|
73
70
|
"conventional-changelog-cli": "^2.2.2",
|
|
74
|
-
"eslint": "^
|
|
71
|
+
"eslint": "^9.0.0",
|
|
75
72
|
"jest": "^27.0.6",
|
|
76
73
|
"jimp": "^0.16.1",
|
|
74
|
+
"json": "^11.0.0",
|
|
77
75
|
"link-preview-js": "^3.0.0",
|
|
78
76
|
"open": "^8.4.2",
|
|
79
77
|
"qrcode-terminal": "^0.12.0",
|
|
@@ -82,8 +80,7 @@
|
|
|
82
80
|
"ts-jest": "^27.0.3",
|
|
83
81
|
"ts-node": "^10.8.1",
|
|
84
82
|
"typedoc": "^0.24.7",
|
|
85
|
-
"typescript": "^4.6.4"
|
|
86
|
-
"json": "^11.0.0"
|
|
83
|
+
"typescript": "^4.6.4"
|
|
87
84
|
},
|
|
88
85
|
"peerDependencies": {
|
|
89
86
|
"jimp": "^0.16.1",
|
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.
|