fca-smart-shankar 10.9.1 → 12.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.
- package/.cache/nix/binary-cache-v6.sqlite +0 -0
- package/.cache/replit/env/latest +117 -48
- package/.cache/replit/env/latest.json +1 -1
- package/.cache/replit/modules/nix.res +1 -0
- package/.cache/replit/modules/nodejs-20.res +1 -0
- package/.cache/replit/nix/env.json +1 -0
- package/.cache/typescript/5.6/node_modules/.package-lock.json +171 -0
- package/.cache/typescript/5.6/node_modules/@types/bluebird/LICENSE +21 -0
- package/.cache/typescript/5.6/node_modules/@types/bluebird/README.md +15 -0
- package/.cache/typescript/5.6/node_modules/@types/bluebird/index.d.ts +1365 -0
- package/.cache/typescript/5.6/node_modules/@types/bluebird/package.json +25 -0
- package/.cache/typescript/5.6/node_modules/@types/caseless/LICENSE +21 -0
- package/.cache/typescript/5.6/node_modules/@types/caseless/README.md +48 -0
- package/.cache/typescript/5.6/node_modules/@types/caseless/index.d.ts +29 -0
- package/.cache/typescript/5.6/node_modules/@types/caseless/package.json +35 -0
- package/.cache/typescript/5.6/node_modules/@types/cheerio/LICENSE +21 -0
- package/.cache/typescript/5.6/node_modules/@types/cheerio/README.md +15 -0
- package/.cache/typescript/5.6/node_modules/@types/cheerio/index.d.ts +318 -0
- package/.cache/typescript/5.6/node_modules/@types/cheerio/package.json +71 -0
- package/.cache/typescript/5.6/node_modules/@types/mocha/LICENSE +21 -0
- package/.cache/typescript/5.6/node_modules/@types/mocha/README.md +15 -0
- package/.cache/typescript/5.6/node_modules/@types/mocha/index.d.ts +2929 -0
- package/.cache/typescript/5.6/node_modules/@types/mocha/package.json +56 -0
- package/.cache/typescript/5.6/node_modules/@types/node/LICENSE +21 -0
- package/.cache/typescript/5.6/node_modules/@types/node/README.md +15 -0
- package/.cache/typescript/5.6/node_modules/@types/node/assert/strict.d.ts +8 -0
- package/.cache/typescript/5.6/node_modules/@types/node/assert.d.ts +1040 -0
- package/.cache/typescript/5.6/node_modules/@types/node/async_hooks.d.ts +541 -0
- package/.cache/typescript/5.6/node_modules/@types/node/buffer.buffer.d.ts +385 -0
- package/.cache/typescript/5.6/node_modules/@types/node/buffer.d.ts +1933 -0
- package/.cache/typescript/5.6/node_modules/@types/node/child_process.d.ts +1549 -0
- package/.cache/typescript/5.6/node_modules/@types/node/cluster.d.ts +579 -0
- package/.cache/typescript/5.6/node_modules/@types/node/compatibility/disposable.d.ts +16 -0
- package/.cache/typescript/5.6/node_modules/@types/node/compatibility/index.d.ts +9 -0
- package/.cache/typescript/5.6/node_modules/@types/node/compatibility/indexable.d.ts +23 -0
- package/.cache/typescript/5.6/node_modules/@types/node/compatibility/iterators.d.ts +21 -0
- package/.cache/typescript/5.6/node_modules/@types/node/console.d.ts +452 -0
- package/.cache/typescript/5.6/node_modules/@types/node/constants.d.ts +19 -0
- package/.cache/typescript/5.6/node_modules/@types/node/crypto.d.ts +4475 -0
- package/.cache/typescript/5.6/node_modules/@types/node/dgram.d.ts +596 -0
- package/.cache/typescript/5.6/node_modules/@types/node/diagnostics_channel.d.ts +554 -0
- package/.cache/typescript/5.6/node_modules/@types/node/dns/promises.d.ts +476 -0
- package/.cache/typescript/5.6/node_modules/@types/node/dns.d.ts +865 -0
- package/.cache/typescript/5.6/node_modules/@types/node/dom-events.d.ts +124 -0
- package/.cache/typescript/5.6/node_modules/@types/node/domain.d.ts +170 -0
- package/.cache/typescript/5.6/node_modules/@types/node/events.d.ts +931 -0
- package/.cache/typescript/5.6/node_modules/@types/node/fs/promises.d.ts +1275 -0
- package/.cache/typescript/5.6/node_modules/@types/node/fs.d.ts +4396 -0
- package/.cache/typescript/5.6/node_modules/@types/node/globals.d.ts +566 -0
- package/.cache/typescript/5.6/node_modules/@types/node/globals.typedarray.d.ts +21 -0
- package/.cache/typescript/5.6/node_modules/@types/node/http.d.ts +1958 -0
- package/.cache/typescript/5.6/node_modules/@types/node/http2.d.ts +2558 -0
- package/.cache/typescript/5.6/node_modules/@types/node/https.d.ts +543 -0
- package/.cache/typescript/5.6/node_modules/@types/node/index.d.ts +92 -0
- package/.cache/typescript/5.6/node_modules/@types/node/inspector.d.ts +3966 -0
- package/.cache/typescript/5.6/node_modules/@types/node/module.d.ts +402 -0
- package/.cache/typescript/5.6/node_modules/@types/node/net.d.ts +1001 -0
- package/.cache/typescript/5.6/node_modules/@types/node/os.d.ts +495 -0
- package/.cache/typescript/5.6/node_modules/@types/node/package.json +220 -0
- package/.cache/typescript/5.6/node_modules/@types/node/path.d.ts +200 -0
- package/.cache/typescript/5.6/node_modules/@types/node/perf_hooks.d.ts +965 -0
- package/.cache/typescript/5.6/node_modules/@types/node/process.d.ts +1963 -0
- package/.cache/typescript/5.6/node_modules/@types/node/punycode.d.ts +117 -0
- package/.cache/typescript/5.6/node_modules/@types/node/querystring.d.ts +153 -0
- package/.cache/typescript/5.6/node_modules/@types/node/readline/promises.d.ts +162 -0
- package/.cache/typescript/5.6/node_modules/@types/node/readline.d.ts +589 -0
- package/.cache/typescript/5.6/node_modules/@types/node/repl.d.ts +430 -0
- package/.cache/typescript/5.6/node_modules/@types/node/sea.d.ts +153 -0
- package/.cache/typescript/5.6/node_modules/@types/node/sqlite.d.ts +213 -0
- package/.cache/typescript/5.6/node_modules/@types/node/stream/consumers.d.ts +12 -0
- package/.cache/typescript/5.6/node_modules/@types/node/stream/promises.d.ts +90 -0
- package/.cache/typescript/5.6/node_modules/@types/node/stream/web.d.ts +609 -0
- package/.cache/typescript/5.6/node_modules/@types/node/stream.d.ts +1726 -0
- package/.cache/typescript/5.6/node_modules/@types/node/string_decoder.d.ts +67 -0
- package/.cache/typescript/5.6/node_modules/@types/node/test.d.ts +2248 -0
- package/.cache/typescript/5.6/node_modules/@types/node/timers/promises.d.ts +97 -0
- package/.cache/typescript/5.6/node_modules/@types/node/timers.d.ts +240 -0
- package/.cache/typescript/5.6/node_modules/@types/node/tls.d.ts +1226 -0
- package/.cache/typescript/5.6/node_modules/@types/node/trace_events.d.ts +197 -0
- package/.cache/typescript/5.6/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +385 -0
- package/.cache/typescript/5.6/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +19 -0
- package/.cache/typescript/5.6/node_modules/@types/node/ts5.6/index.d.ts +92 -0
- package/.cache/typescript/5.6/node_modules/@types/node/tty.d.ts +208 -0
- package/.cache/typescript/5.6/node_modules/@types/node/url.d.ts +972 -0
- package/.cache/typescript/5.6/node_modules/@types/node/util.d.ts +2371 -0
- package/.cache/typescript/5.6/node_modules/@types/node/v8.d.ts +808 -0
- package/.cache/typescript/5.6/node_modules/@types/node/vm.d.ts +976 -0
- package/.cache/typescript/5.6/node_modules/@types/node/wasi.d.ts +181 -0
- package/.cache/typescript/5.6/node_modules/@types/node/worker_threads.d.ts +745 -0
- package/.cache/typescript/5.6/node_modules/@types/node/zlib.d.ts +539 -0
- package/.cache/typescript/5.6/node_modules/@types/request/LICENSE +21 -0
- package/.cache/typescript/5.6/node_modules/@types/request/README.md +15 -0
- package/.cache/typescript/5.6/node_modules/@types/request/index.d.ts +395 -0
- package/.cache/typescript/5.6/node_modules/@types/request/package.json +70 -0
- package/.cache/typescript/5.6/node_modules/@types/tough-cookie/LICENSE +21 -0
- package/.cache/typescript/5.6/node_modules/@types/tough-cookie/README.md +15 -0
- package/.cache/typescript/5.6/node_modules/@types/tough-cookie/index.d.ts +321 -0
- package/.cache/typescript/5.6/node_modules/@types/tough-cookie/package.json +35 -0
- package/.cache/typescript/5.6/node_modules/asynckit/LICENSE +21 -0
- package/.cache/typescript/5.6/node_modules/asynckit/README.md +233 -0
- package/.cache/typescript/5.6/node_modules/asynckit/bench.js +76 -0
- package/.cache/typescript/5.6/node_modules/asynckit/index.js +6 -0
- package/.cache/typescript/5.6/node_modules/asynckit/lib/abort.js +29 -0
- package/.cache/typescript/5.6/node_modules/asynckit/lib/async.js +34 -0
- package/.cache/typescript/5.6/node_modules/asynckit/lib/defer.js +26 -0
- package/.cache/typescript/5.6/node_modules/asynckit/lib/iterate.js +75 -0
- package/.cache/typescript/5.6/node_modules/asynckit/lib/readable_asynckit.js +91 -0
- package/.cache/typescript/5.6/node_modules/asynckit/lib/readable_parallel.js +25 -0
- package/.cache/typescript/5.6/node_modules/asynckit/lib/readable_serial.js +25 -0
- package/.cache/typescript/5.6/node_modules/asynckit/lib/readable_serial_ordered.js +29 -0
- package/.cache/typescript/5.6/node_modules/asynckit/lib/state.js +37 -0
- package/.cache/typescript/5.6/node_modules/asynckit/lib/streamify.js +141 -0
- package/.cache/typescript/5.6/node_modules/asynckit/lib/terminator.js +29 -0
- package/.cache/typescript/5.6/node_modules/asynckit/package.json +63 -0
- package/.cache/typescript/5.6/node_modules/asynckit/parallel.js +43 -0
- package/.cache/typescript/5.6/node_modules/asynckit/serial.js +17 -0
- package/.cache/typescript/5.6/node_modules/asynckit/serialOrdered.js +75 -0
- package/.cache/typescript/5.6/node_modules/asynckit/stream.js +21 -0
- package/.cache/typescript/5.6/node_modules/combined-stream/License +19 -0
- package/.cache/typescript/5.6/node_modules/combined-stream/Readme.md +138 -0
- package/.cache/typescript/5.6/node_modules/combined-stream/lib/combined_stream.js +208 -0
- package/.cache/typescript/5.6/node_modules/combined-stream/package.json +25 -0
- package/.cache/typescript/5.6/node_modules/combined-stream/yarn.lock +17 -0
- package/.cache/typescript/5.6/node_modules/delayed-stream/License +19 -0
- package/.cache/typescript/5.6/node_modules/delayed-stream/Makefile +7 -0
- package/.cache/typescript/5.6/node_modules/delayed-stream/Readme.md +141 -0
- package/.cache/typescript/5.6/node_modules/delayed-stream/lib/delayed_stream.js +107 -0
- package/.cache/typescript/5.6/node_modules/delayed-stream/package.json +27 -0
- package/.cache/typescript/5.6/node_modules/form-data/License +19 -0
- package/.cache/typescript/5.6/node_modules/form-data/Readme.md +350 -0
- package/.cache/typescript/5.6/node_modules/form-data/index.d.ts +51 -0
- package/.cache/typescript/5.6/node_modules/form-data/lib/browser.js +2 -0
- package/.cache/typescript/5.6/node_modules/form-data/lib/form_data.js +484 -0
- package/.cache/typescript/5.6/node_modules/form-data/lib/populate.js +10 -0
- package/.cache/typescript/5.6/node_modules/form-data/package.json +72 -0
- package/.cache/typescript/5.6/node_modules/mime-db/HISTORY.md +507 -0
- package/.cache/typescript/5.6/node_modules/mime-db/LICENSE +23 -0
- package/.cache/typescript/5.6/node_modules/mime-db/README.md +100 -0
- package/.cache/typescript/5.6/node_modules/mime-db/db.json +8519 -0
- package/.cache/typescript/5.6/node_modules/mime-db/index.js +12 -0
- package/.cache/typescript/5.6/node_modules/mime-db/package.json +60 -0
- package/.cache/typescript/5.6/node_modules/mime-types/HISTORY.md +397 -0
- package/.cache/typescript/5.6/node_modules/mime-types/LICENSE +23 -0
- package/.cache/typescript/5.6/node_modules/mime-types/README.md +113 -0
- package/.cache/typescript/5.6/node_modules/mime-types/index.js +188 -0
- package/.cache/typescript/5.6/node_modules/mime-types/package.json +44 -0
- package/.cache/typescript/5.6/node_modules/safe-buffer/LICENSE +21 -0
- package/.cache/typescript/5.6/node_modules/safe-buffer/README.md +584 -0
- package/.cache/typescript/5.6/node_modules/safe-buffer/index.d.ts +187 -0
- package/.cache/typescript/5.6/node_modules/safe-buffer/index.js +65 -0
- package/.cache/typescript/5.6/node_modules/safe-buffer/package.json +51 -0
- package/.cache/typescript/5.6/node_modules/types-registry/README.md +2 -0
- package/.cache/typescript/5.6/node_modules/types-registry/index.json +1 -0
- package/.cache/typescript/5.6/node_modules/types-registry/package.json +20 -0
- package/.cache/typescript/5.6/node_modules/undici-types/LICENSE +21 -0
- package/.cache/typescript/5.6/node_modules/undici-types/README.md +6 -0
- package/.cache/typescript/5.6/node_modules/undici-types/agent.d.ts +31 -0
- package/.cache/typescript/5.6/node_modules/undici-types/api.d.ts +43 -0
- package/.cache/typescript/5.6/node_modules/undici-types/balanced-pool.d.ts +29 -0
- package/.cache/typescript/5.6/node_modules/undici-types/cache.d.ts +36 -0
- package/.cache/typescript/5.6/node_modules/undici-types/client.d.ts +108 -0
- package/.cache/typescript/5.6/node_modules/undici-types/connector.d.ts +34 -0
- package/.cache/typescript/5.6/node_modules/undici-types/content-type.d.ts +21 -0
- package/.cache/typescript/5.6/node_modules/undici-types/cookies.d.ts +28 -0
- package/.cache/typescript/5.6/node_modules/undici-types/diagnostics-channel.d.ts +66 -0
- package/.cache/typescript/5.6/node_modules/undici-types/dispatcher.d.ts +255 -0
- package/.cache/typescript/5.6/node_modules/undici-types/env-http-proxy-agent.d.ts +21 -0
- package/.cache/typescript/5.6/node_modules/undici-types/errors.d.ts +149 -0
- package/.cache/typescript/5.6/node_modules/undici-types/eventsource.d.ts +61 -0
- package/.cache/typescript/5.6/node_modules/undici-types/fetch.d.ts +209 -0
- package/.cache/typescript/5.6/node_modules/undici-types/file.d.ts +39 -0
- package/.cache/typescript/5.6/node_modules/undici-types/filereader.d.ts +54 -0
- package/.cache/typescript/5.6/node_modules/undici-types/formdata.d.ts +108 -0
- package/.cache/typescript/5.6/node_modules/undici-types/global-dispatcher.d.ts +9 -0
- package/.cache/typescript/5.6/node_modules/undici-types/global-origin.d.ts +7 -0
- package/.cache/typescript/5.6/node_modules/undici-types/handlers.d.ts +15 -0
- package/.cache/typescript/5.6/node_modules/undici-types/header.d.ts +4 -0
- package/.cache/typescript/5.6/node_modules/undici-types/index.d.ts +71 -0
- package/.cache/typescript/5.6/node_modules/undici-types/interceptors.d.ts +17 -0
- package/.cache/typescript/5.6/node_modules/undici-types/mock-agent.d.ts +50 -0
- package/.cache/typescript/5.6/node_modules/undici-types/mock-client.d.ts +25 -0
- package/.cache/typescript/5.6/node_modules/undici-types/mock-errors.d.ts +12 -0
- package/.cache/typescript/5.6/node_modules/undici-types/mock-interceptor.d.ts +93 -0
- package/.cache/typescript/5.6/node_modules/undici-types/mock-pool.d.ts +25 -0
- package/.cache/typescript/5.6/node_modules/undici-types/package.json +55 -0
- package/.cache/typescript/5.6/node_modules/undici-types/patch.d.ts +33 -0
- package/.cache/typescript/5.6/node_modules/undici-types/pool-stats.d.ts +19 -0
- package/.cache/typescript/5.6/node_modules/undici-types/pool.d.ts +39 -0
- package/.cache/typescript/5.6/node_modules/undici-types/proxy-agent.d.ts +28 -0
- package/.cache/typescript/5.6/node_modules/undici-types/readable.d.ts +60 -0
- package/.cache/typescript/5.6/node_modules/undici-types/retry-agent.d.ts +8 -0
- package/.cache/typescript/5.6/node_modules/undici-types/retry-handler.d.ts +116 -0
- package/.cache/typescript/5.6/node_modules/undici-types/util.d.ts +18 -0
- package/.cache/typescript/5.6/node_modules/undici-types/webidl.d.ts +222 -0
- package/.cache/typescript/5.6/node_modules/undici-types/websocket.d.ts +150 -0
- package/.cache/typescript/5.6/package-lock.json +183 -0
- package/.cache/typescript/5.6/package.json +1 -0
- package/.replit +3 -3
- package/LICENSE-MIT +21 -0
- package/README.md +176 -30
- package/index.js +452 -425
- package/package.json +39 -90
- package/replit.nix +3 -0
- package/src/addExternalModule.js +14 -5
- package/src/addUserToGroup.js +57 -21
- package/src/changeAdminStatus.js +46 -22
- package/src/changeArchivedStatus.js +26 -12
- package/src/changeAvatar.js +136 -0
- package/src/{changeAvt.js → changeAvatarV2.js} +4 -3
- package/src/changeBio.js +26 -15
- package/src/changeBlockedStatus.js +22 -9
- package/src/changeBlockedStatusMqtt.js +80 -0
- package/src/changeCover.js +73 -0
- package/src/changeGroupImage.js +55 -26
- package/src/changeName.js +79 -0
- package/src/changeNickname.js +28 -14
- package/src/changeThreadColor.js +22 -19
- package/src/changeThreadEmoji.js +25 -12
- package/src/changeUsername.js +59 -0
- package/src/createCommentPost.js +230 -0
- package/src/createNewGroup.js +36 -18
- package/src/createPoll.js +28 -17
- package/src/createPost.js +276 -0
- package/src/data/getThreadInfo.json +1 -0
- package/src/deleteMessage.js +25 -14
- package/src/deleteThread.js +26 -13
- package/src/editMessage.js +56 -50
- package/src/editMessageOld.js +67 -0
- package/src/follow.js +74 -0
- package/src/forwardAttachment.js +28 -16
- package/src/getAccess.js +112 -0
- package/src/getAvatarUser.js +78 -0
- package/src/getCurrentUserID.js +3 -3
- package/src/getEmojiUrl.js +10 -8
- package/src/getFriendsList.js +25 -15
- package/src/getMessage.js +813 -81
- package/src/getRegion.js +7 -0
- package/src/getThreadHistory.js +241 -98
- package/src/getThreadHistoryDeprecated.js +93 -0
- package/src/getThreadInfo.js +90 -287
- package/src/getThreadInfoDeprecated.js +80 -0
- package/src/getThreadList.js +215 -158
- package/src/getThreadListDeprecated.js +75 -0
- package/src/getThreadPictures.js +40 -20
- package/src/getUID.js +113 -50
- package/src/getUserID.js +18 -14
- package/src/getUserInfo.js +35 -75
- package/src/handleFriendRequest.js +25 -14
- package/src/handleMessageRequest.js +37 -21
- package/src/httpGet.js +36 -20
- package/src/httpPost.js +37 -20
- package/src/httpPostFormData.js +53 -24
- package/src/listenMqtt.js +413 -666
- package/src/listenNotification.js +85 -0
- package/src/logout.js +24 -17
- package/src/markAsDelivered.js +23 -16
- package/src/markAsRead.js +43 -28
- package/src/markAsReadAll.js +22 -15
- package/src/markAsSeen.js +29 -19
- package/src/muteThread.js +18 -13
- package/src/pinMessage.js +59 -0
- package/src/refreshFb_dtsg.js +89 -0
- package/src/removeUserFromGroup.js +48 -18
- package/src/resolvePhotoUrl.js +22 -14
- package/src/searchForThread.js +23 -13
- package/src/searchStickers.js +53 -0
- package/src/sendMessage.js +180 -122
- package/src/sendMessageMqtt.js +322 -0
- package/src/sendTypingIndicator.js +42 -21
- package/src/sendTypingIndicatorV2.js +28 -0
- package/src/setMessageReaction.js +33 -20
- package/src/setMessageReactionMqtt.js +62 -0
- package/src/setPostReaction.js +105 -95
- package/src/setProfileGuard.js +45 -0
- package/src/setStoryReaction.js +64 -0
- package/src/setTitle.js +35 -19
- package/src/shareContact.js +92 -37
- package/src/shareLink.js +6 -5
- package/src/stopListenMqtt.js +23 -0
- package/src/threadColors.js +110 -18
- package/src/unfriend.js +20 -11
- package/src/unsendMessage.js +31 -34
- package/src/uploadAttachment.js +94 -0
- package/test/test-page.js +1 -1
- package/test/test.js +1 -1
- package/utils.js +1237 -2935
- package/.cache/replit/modules/nodejs-14.res +0 -1
- package/.cache/replit/modules/web.res +0 -1
- package/.cache/typescript/5.5/package.json +0 -1
- package/.config/configstore/update-notifier-npm.json +0 -4
- package/.gitattributes +0 -2
- package/.upm/store.json +0 -1
- package/Extra/Balancer.js +0 -49
- package/Extra/Bypass/956/index.js +0 -234
- package/Extra/Bypass/test/aaaa.json +0 -170
- package/Extra/Bypass/test/index.js +0 -188
- package/Extra/Database/index.js +0 -469
- package/Extra/ExtraAddons.js +0 -82
- package/Extra/ExtraFindUID.js +0 -62
- package/Extra/ExtraGetThread.js +0 -365
- package/Extra/ExtraScreenShot.js +0 -430
- package/Extra/ExtraUptimeRobot.js +0 -38
- package/Extra/Html/Classic/script.js +0 -119
- package/Extra/Html/Classic/style.css +0 -8
- package/Extra/Security/Base/Step_1.js +0 -6
- package/Extra/Security/Base/Step_2.js +0 -22
- package/Extra/Security/Base/Step_3.js +0 -22
- package/Extra/Security/Base/index.js +0 -191
- package/Extra/Security/Index.js +0 -5
- package/Extra/Security/Step_1.js +0 -6
- package/Extra/Security/Step_2.js +0 -22
- package/Extra/Security/Step_3.js +0 -22
- package/Extra/Src/Change_Environment.js +0 -24
- package/Extra/Src/Check_Update.js +0 -67
- package/Extra/Src/History.js +0 -115
- package/Extra/Src/Instant_Update.js +0 -65
- package/Extra/Src/Last-Run.js +0 -65
- package/Extra/Src/Premium.js +0 -81
- package/Extra/Src/Release_Memory.js +0 -160
- package/Extra/Src/Websocket.js +0 -213
- package/Extra/Src/image/checkmate.jpg +0 -0
- package/Extra/Src/test.js +0 -28
- package/Extra/Src/uuid.js +0 -137
- package/Func/AcceptAgreement.js +0 -31
- package/Func/ClearCache.js +0 -64
- package/Func/ReportV1.js +0 -54
- package/LICENSE +0 -678
- package/Language/index.json +0 -228
- package/Main.js +0 -1444
- package/SECURITY.md +0 -18
- package/broadcast.js +0 -44
- package/logger.js +0 -66
- package/src/Dev_Horizon_Data.js +0 -125
- package/src/Dev_getThreadInfoOLD.js +0 -422
- package/src/Dev_shareTest2.js +0 -68
- package/src/Dev_shareTest3.js +0 -71
- package/src/Premium.js +0 -25
- package/src/Screenshot.js +0 -83
- package/src/getAccessToken.js +0 -28
- package/src/getThreadInfoOLD.js +0 -422
- package/src/getThreadMain.js +0 -220
- package/src/getUserInfoMain.js +0 -65
- package/src/getUserInfoV2.js +0 -32
- package/src/getUserInfoV3.js +0 -63
- package/src/getUserInfoV4.js +0 -55
- package/src/getUserInfoV5.js +0 -61
- package/src/listenMqttV1.js +0 -846
- package/src/sendMqttMessage.js +0 -71
- package/src/unsendMqttMessage.js +0 -66
- package/test/Database_Test.js +0 -4
- package/test/Db2.js +0 -530
- package/test/Shankar_Database/A_README.md +0 -1
- package/test/Shankar_Database/Database.db +0 -0
- package/test/data/shareAttach.js +0 -146
- package/test/data/something.mov +0 -0
- package/test/data/test.png +0 -0
- package/test/data/test.txt +0 -7
- package/test/env/.env +0 -0
- package/test/example-db.db +0 -0
- package/test/memoryleak.js +0 -18
- package/test/testname.js +0 -1342
- package/test/testv2.js +0 -3
- /package/{Extra/Security/AES_256_GCM/index.js → .cache/nix/binary-cache-v6.sqlite-journal} +0 -0
package/Extra/Database/index.js
DELETED
@@ -1,469 +0,0 @@
|
|
1
|
-
/* eslint-disable no-self-assign */
|
2
|
-
/* eslint-disable linebreak-style */
|
3
|
-
const get = require('lodash/get');
|
4
|
-
const set = require('lodash/set');
|
5
|
-
const BetterDB = require("better-sqlite3");
|
6
|
-
const fs = require('fs-extra');
|
7
|
-
const request = require('request');
|
8
|
-
const deasync = require('deasync');
|
9
|
-
|
10
|
-
if (!fs.existsSync(process.cwd() + '/Horizon_Database')) {
|
11
|
-
fs.mkdirSync(process.cwd() + '/Horizon_Database');
|
12
|
-
fs.writeFileSync(process.cwd() + '/Horizon_Database/A_README.md', 'This folder is used by ChernobyL(NANI =)) ) to store data. Do not delete this folder or any of the files in it.', 'utf8');
|
13
|
-
}
|
14
|
-
var db = new BetterDB(process.cwd() + "/Horizon_Database/SyntheticDatabase.sqlite");
|
15
|
-
|
16
|
-
function Lset(key, value) {
|
17
|
-
if (!key)
|
18
|
-
throw new TypeError(
|
19
|
-
"No key specified."
|
20
|
-
);
|
21
|
-
return arbitrate("set",{
|
22
|
-
stringify: false,
|
23
|
-
id: key,
|
24
|
-
data: value,
|
25
|
-
ops: {},
|
26
|
-
});
|
27
|
-
}
|
28
|
-
|
29
|
-
function Lget(key) {
|
30
|
-
if (!key)
|
31
|
-
throw new TypeError(
|
32
|
-
"No key specified."
|
33
|
-
);
|
34
|
-
return arbitrate("fetch", { id: key, ops: {} || {} });
|
35
|
-
}
|
36
|
-
|
37
|
-
function Lhas(key) {
|
38
|
-
if (!key)
|
39
|
-
throw new TypeError(
|
40
|
-
"No key specified."
|
41
|
-
);
|
42
|
-
return arbitrate("has", { id: key, ops: {} });
|
43
|
-
}
|
44
|
-
|
45
|
-
function Lremove(key) {
|
46
|
-
if (!key)
|
47
|
-
throw new TypeError(
|
48
|
-
"No key specified."
|
49
|
-
);
|
50
|
-
return arbitrate("delete", { id: key, ops: {} });
|
51
|
-
}
|
52
|
-
|
53
|
-
function LremoveMultiple(key) {
|
54
|
-
if (!key)
|
55
|
-
throw new TypeError(
|
56
|
-
"No key specified."
|
57
|
-
);
|
58
|
-
try {
|
59
|
-
for (let i of key) {
|
60
|
-
arbitrate("delete", { id: i, ops: {} });
|
61
|
-
}
|
62
|
-
return true;
|
63
|
-
}
|
64
|
-
catch (err) {
|
65
|
-
return false;
|
66
|
-
}
|
67
|
-
}
|
68
|
-
|
69
|
-
function Llist() {
|
70
|
-
return arbitrate("all",{ ops: {} });
|
71
|
-
}
|
72
|
-
|
73
|
-
function Replit_Set(key, value) {
|
74
|
-
try {
|
75
|
-
var done = false;
|
76
|
-
|
77
|
-
request({
|
78
|
-
url: process.env.REPLIT_DB_URL,
|
79
|
-
method: "POST",
|
80
|
-
headers: {
|
81
|
-
'Content-Type': 'application/x-www-form-urlencoded',
|
82
|
-
},
|
83
|
-
body: `${encodeURIComponent(key)}=${encodeURIComponent(JSON.stringify(value))}`
|
84
|
-
|
85
|
-
}, function (error, response, body) {
|
86
|
-
done = true;
|
87
|
-
});
|
88
|
-
|
89
|
-
deasync.loopWhile(function(){
|
90
|
-
return !done;
|
91
|
-
});
|
92
|
-
|
93
|
-
return;
|
94
|
-
|
95
|
-
}
|
96
|
-
catch (e) {
|
97
|
-
console.log(e);
|
98
|
-
return false;
|
99
|
-
}
|
100
|
-
}
|
101
|
-
|
102
|
-
function Replit_Get(key) {
|
103
|
-
try {
|
104
|
-
var done = false;
|
105
|
-
var response = null;
|
106
|
-
|
107
|
-
request(process.env.REPLIT_DB_URL + "/" + key, function (error, res, body) {
|
108
|
-
if (!error && res.statusCode == 200) {
|
109
|
-
response = body;
|
110
|
-
}
|
111
|
-
done = true;
|
112
|
-
});
|
113
|
-
|
114
|
-
deasync.loopWhile(function(){
|
115
|
-
return !done;
|
116
|
-
});
|
117
|
-
|
118
|
-
return JSON.parse(response);
|
119
|
-
}
|
120
|
-
catch (e) {
|
121
|
-
console.log(e);
|
122
|
-
return false;
|
123
|
-
}
|
124
|
-
}
|
125
|
-
|
126
|
-
function Replit_Has(key) {
|
127
|
-
try {
|
128
|
-
var done = false;
|
129
|
-
var response = null;
|
130
|
-
|
131
|
-
request(process.env.REPLIT_DB_URL + "/" + key, function (error, res, body) {
|
132
|
-
if (!error && res.statusCode == 200) {
|
133
|
-
response = body;
|
134
|
-
}
|
135
|
-
done = true;
|
136
|
-
});
|
137
|
-
|
138
|
-
deasync.loopWhile(function(){
|
139
|
-
return !done;
|
140
|
-
});
|
141
|
-
|
142
|
-
return response != null;
|
143
|
-
}
|
144
|
-
catch (e) {
|
145
|
-
console.log(e);
|
146
|
-
return false;
|
147
|
-
}
|
148
|
-
}
|
149
|
-
|
150
|
-
function Replit_Remove(key) {
|
151
|
-
try {
|
152
|
-
var done = false;
|
153
|
-
request.delete(process.env.REPLIT_DB_URL + "/" + key , function (error, response, body) {
|
154
|
-
done = true;
|
155
|
-
});
|
156
|
-
|
157
|
-
deasync.loopWhile(function(){
|
158
|
-
return !done;
|
159
|
-
});
|
160
|
-
|
161
|
-
return;
|
162
|
-
}
|
163
|
-
catch (e) {
|
164
|
-
console.log(e);
|
165
|
-
return false;
|
166
|
-
}
|
167
|
-
}
|
168
|
-
function Replit_RemoveMultiple(keys) {
|
169
|
-
try {
|
170
|
-
for (const key of keys) {
|
171
|
-
request.delete(process.env.REPLIT_DB_URL + "/" + key , function (error, response, body) {});
|
172
|
-
}
|
173
|
-
return true;
|
174
|
-
}
|
175
|
-
catch (e) {
|
176
|
-
console.log(e);
|
177
|
-
return false;
|
178
|
-
}
|
179
|
-
}
|
180
|
-
|
181
|
-
function Replit_List() {
|
182
|
-
var done = false;
|
183
|
-
var response = null;
|
184
|
-
|
185
|
-
request(process.env.REPLIT_DB_URL + "?encode=true" + `&prefix=${encodeURIComponent("")}`, function (error, res, body) {
|
186
|
-
if (!error && res.statusCode == 200) {
|
187
|
-
response = body;
|
188
|
-
}
|
189
|
-
done = true;
|
190
|
-
|
191
|
-
});
|
192
|
-
|
193
|
-
deasync.loopWhile(function(){
|
194
|
-
return !done;
|
195
|
-
});
|
196
|
-
|
197
|
-
if (response.length === 0) {
|
198
|
-
return [];
|
199
|
-
}
|
200
|
-
return response.split("\n").map(decodeURIComponent);
|
201
|
-
}
|
202
|
-
|
203
|
-
|
204
|
-
var methods = {
|
205
|
-
fetch: function(db, params, options) {
|
206
|
-
let fetched = db.prepare(`SELECT * FROM ${options.table} WHERE ID = (?)`).get(params.id);
|
207
|
-
if (!fetched) return null;
|
208
|
-
try {
|
209
|
-
fetched = JSON.parse(fetched.json);
|
210
|
-
} catch (e) {
|
211
|
-
fetched = fetched.json;
|
212
|
-
}
|
213
|
-
return fetched;
|
214
|
-
},
|
215
|
-
set: function(db, params, options) {
|
216
|
-
let fetched = db.prepare(`SELECT * FROM ${options.table} WHERE ID = (?)`).get(params.id);
|
217
|
-
if (!fetched) {
|
218
|
-
db.prepare(`INSERT INTO ${options.table} (ID,json) VALUES (?,?)`).run(params.id, '{}');
|
219
|
-
fetched = db.prepare(`SELECT * FROM ${options.table} WHERE ID = (?)`).get(params.id);
|
220
|
-
}
|
221
|
-
try {
|
222
|
-
fetched = JSON.parse(fetched);
|
223
|
-
} catch (e) {
|
224
|
-
fetched = fetched;
|
225
|
-
}
|
226
|
-
if (typeof fetched === 'object' && params.ops.target) {
|
227
|
-
params.data = JSON.parse(params.data);
|
228
|
-
params.data = set(fetched, params.ops.target, params.data);
|
229
|
-
}
|
230
|
-
else if (params.ops.target) throw new TypeError('Cannot target a non-object.');
|
231
|
-
db.prepare(`UPDATE ${options.table} SET json = (?) WHERE ID = (?)`).run(JSON.stringify(params.data), params.id);
|
232
|
-
let newData = db.prepare(`SELECT * FROM ${options.table} WHERE ID = (?)`).get(params.id).json;
|
233
|
-
if (newData === '{}') return null;
|
234
|
-
else {
|
235
|
-
try { newData = JSON.parse(newData);
|
236
|
-
}
|
237
|
-
catch (e) {
|
238
|
-
newData = newData;
|
239
|
-
}
|
240
|
-
return newData;
|
241
|
-
}
|
242
|
-
},
|
243
|
-
add: function addDB(db, params, options) {
|
244
|
-
let fetched = db.prepare(`SELECT * FROM ${options.table} WHERE ID = (?)`).get(params.id);
|
245
|
-
if (!fetched) {
|
246
|
-
db.prepare(`INSERT INTO ${options.table} (ID,json) VALUES (?,?)`).run(params.id, '{}');
|
247
|
-
fetched = db.prepare(`SELECT * FROM ${options.table} WHERE ID = (?)`).get(params.id);
|
248
|
-
}
|
249
|
-
if (params.ops.target) {
|
250
|
-
try {
|
251
|
-
fetched = JSON.parse(fetched);
|
252
|
-
}
|
253
|
-
catch (e) {
|
254
|
-
fetched = fetched;
|
255
|
-
}
|
256
|
-
let oldValue = get(fetched, params.ops.target);
|
257
|
-
if (oldValue === undefined) oldValue = 0;
|
258
|
-
else if (isNaN(oldValue)) throw new Error(`Data @ ID: "${params.id}" IS NOT A number.\nFOUND: ${fetched}\nEXPECTED: number`);
|
259
|
-
params.data = set(fetched, params.ops.target, oldValue + JSON.parse(params.data));
|
260
|
-
}
|
261
|
-
else {
|
262
|
-
if (fetched.json === '{}') fetched.json = 0;
|
263
|
-
try {
|
264
|
-
fetched.json = JSON.parse(fetched);
|
265
|
-
} catch (e) {
|
266
|
-
fetched.json = fetched.json;
|
267
|
-
}
|
268
|
-
if (isNaN(fetched.json)) throw new Error(`Data @ ID: "${params.id}" IS NOT A number.\nFOUND: ${fetched.json}\nEXPECTED: number`);
|
269
|
-
params.data = parseInt(fetched.json, 10) + parseInt(params.data, 10);
|
270
|
-
}
|
271
|
-
db.prepare(`UPDATE ${options.table} SET json = (?) WHERE ID = (?)`).run(JSON.stringify(params.data), params.id);
|
272
|
-
let newData = db.prepare(`SELECT * FROM ${options.table} WHERE ID = (?)`).get(params.id).json;
|
273
|
-
if (newData === '{}') return null;
|
274
|
-
else {
|
275
|
-
try {
|
276
|
-
newData = JSON.parse(newData);
|
277
|
-
}
|
278
|
-
catch (e) {
|
279
|
-
newData = newData;
|
280
|
-
}
|
281
|
-
return newData;
|
282
|
-
}
|
283
|
-
},
|
284
|
-
subtract: function subtractDB(db, params, options) {
|
285
|
-
let fetched = db.prepare(`SELECT * FROM ${options.table} WHERE ID = (?)`).get(params.id);
|
286
|
-
if (!fetched) {
|
287
|
-
db.prepare(`INSERT INTO ${options.table} (ID,json) VALUES (?,?)`).run(params.id, '{}');
|
288
|
-
fetched = db.prepare(`SELECT * FROM ${options.table} WHERE ID = (?)`).get(params.id);
|
289
|
-
}
|
290
|
-
if (params.ops.target) {
|
291
|
-
try { fetched = JSON.parse(fetched); } catch (e) {}
|
292
|
-
params.data = JSON.parse(params.data);
|
293
|
-
let oldValue = get(fetched, params.ops.target);
|
294
|
-
if (oldValue === undefined) oldValue = 0;
|
295
|
-
else if (isNaN(oldValue)) throw new Error('Target is not a number.');
|
296
|
-
params.data = set(fetched, params.ops.target, oldValue - params.data);
|
297
|
-
} else {
|
298
|
-
if (fetched.json === '{}') fetched.json = 0;
|
299
|
-
else fetched.json = JSON.parse(fetched.json);
|
300
|
-
try { fetched.json = JSON.parse(fetched); } catch (e) {}
|
301
|
-
if (isNaN(fetched.json)) throw new Error('Target is not a number.');
|
302
|
-
params.data = parseInt(fetched.json, 10) - parseInt(params.data, 10);
|
303
|
-
}
|
304
|
-
params.data = JSON.stringify(params.data);
|
305
|
-
db.prepare(`UPDATE ${options.table} SET json = (?) WHERE ID = (?)`).run(params.data, params.id);
|
306
|
-
let newData = db.prepare(`SELECT * FROM ${options.table} WHERE ID = (?)`).get(params.id).json;
|
307
|
-
if (newData === '{}') return null;
|
308
|
-
else {
|
309
|
-
try { newData = JSON.parse(newData); } catch (e) {}
|
310
|
-
return newData;
|
311
|
-
}
|
312
|
-
},
|
313
|
-
push: function pushDB(db, params, options) {
|
314
|
-
let fetched = db.prepare(`SELECT * FROM ${options.table} WHERE ID = (?)`).get(params.id);
|
315
|
-
if (!fetched) {
|
316
|
-
db.prepare(`INSERT INTO ${options.table} (ID,json) VALUES (?,?)`).run(params.id, '{}');
|
317
|
-
fetched = db.prepare(`SELECT * FROM ${options.table} WHERE ID = (?)`).get(params.id);
|
318
|
-
}
|
319
|
-
if (params.ops.target) {
|
320
|
-
fetched = JSON.parse(fetched.json);
|
321
|
-
try { fetched = JSON.parse(fetched); } catch (e) {}
|
322
|
-
params.data = JSON.parse(params.data);
|
323
|
-
if (typeof fetched !== 'object') throw new TypeError('Cannot push into a non-object.');
|
324
|
-
let oldArray = get(fetched, params.ops.target);
|
325
|
-
if (oldArray === undefined) oldArray = [];
|
326
|
-
else if (!Array.isArray(oldArray)) throw new TypeError('Target is not an array.');
|
327
|
-
oldArray.push(params.data);
|
328
|
-
params.data = set(fetched, params.ops.target, oldArray);
|
329
|
-
} else {
|
330
|
-
if (fetched.json === '{}') fetched.json = [];
|
331
|
-
else fetched.json = JSON.parse(fetched.json);
|
332
|
-
try { fetched.json = JSON.parse(fetched.json); } catch (e) {}
|
333
|
-
params.data = JSON.parse(params.data);
|
334
|
-
if (!Array.isArray(fetched.json)) throw new TypeError('Target is not an array.');
|
335
|
-
fetched.json.push(params.data);
|
336
|
-
params.data = fetched.json;
|
337
|
-
}
|
338
|
-
params.data = JSON.stringify(params.data);
|
339
|
-
db.prepare(`UPDATE ${options.table} SET json = (?) WHERE ID = (?)`).run(params.data, params.id);
|
340
|
-
let newData = db.prepare(`SELECT * FROM ${options.table} WHERE ID = (?)`).get(params.id).json;
|
341
|
-
if (newData === '{}') return null;
|
342
|
-
else {
|
343
|
-
newData = JSON.parse(newData);
|
344
|
-
try { newData = JSON.parse(newData); } catch (e) {}
|
345
|
-
return newData;
|
346
|
-
}
|
347
|
-
},
|
348
|
-
delete: function deleteDB(db, params, options) {
|
349
|
-
const unset = require('lodash/unset');
|
350
|
-
let fetched = db.prepare(`SELECT * FROM ${options.table} WHERE ID = (?)`).get(params.id);
|
351
|
-
if (!fetched) return false;
|
352
|
-
else fetched = JSON.parse(fetched.json);
|
353
|
-
try { fetched = JSON.parse(fetched); } catch (e) {}
|
354
|
-
if (typeof fetched === 'object' && params.ops.target) {
|
355
|
-
unset(fetched, params.ops.target);
|
356
|
-
fetched = JSON.stringify(fetched);
|
357
|
-
db.prepare(`UPDATE ${options.table} SET json = (?) WHERE ID = (?)`).run(fetched, params.id);
|
358
|
-
return true;
|
359
|
-
}
|
360
|
-
else if (params.ops.target) throw new TypeError('Target is not an object.');
|
361
|
-
else db.prepare(`DELETE FROM ${options.table} WHERE ID = (?)`).run(params.id);
|
362
|
-
return true;
|
363
|
-
},
|
364
|
-
has: function hasDB(db, params, options) {
|
365
|
-
let fetched = db.prepare(`SELECT * FROM ${options.table} WHERE ID = (?)`).get(params.id);
|
366
|
-
if (!fetched) return false;
|
367
|
-
else fetched = JSON.parse(fetched.json);
|
368
|
-
try { fetched = JSON.parse(fetched); } catch (e) {}
|
369
|
-
if (params.ops.target) fetched = get(fetched, params.ops.target);
|
370
|
-
return (typeof fetched != 'undefined');
|
371
|
-
},
|
372
|
-
all: function allDB(db, params, options) {
|
373
|
-
var stmt = db.prepare(`SELECT * FROM ${options.table} WHERE ID IS NOT NULL`);
|
374
|
-
let resp = [];
|
375
|
-
for (var row of stmt.iterate()) {
|
376
|
-
try {
|
377
|
-
resp.push({
|
378
|
-
ID: row.ID,
|
379
|
-
data: JSON.parse(row.json)
|
380
|
-
});
|
381
|
-
}
|
382
|
-
catch (e) {
|
383
|
-
return [];
|
384
|
-
}
|
385
|
-
}
|
386
|
-
return resp;
|
387
|
-
},
|
388
|
-
type: function typeDB(db, params, options) {
|
389
|
-
let fetched = db.prepare(`SELECT * FROM ${options.table} WHERE ID = (?)`).get(params.id);
|
390
|
-
if (!fetched) return null; // If empty, return null
|
391
|
-
fetched = JSON.parse(fetched.json);
|
392
|
-
try { fetched = JSON.parse(fetched); } catch (e) {}
|
393
|
-
if (params.ops.target) fetched = get(fetched, params.ops.target); // Get prop using dot notation
|
394
|
-
return typeof fetched;
|
395
|
-
},
|
396
|
-
clear: function clearDB(db, params, options) {
|
397
|
-
let fetched = db.prepare(`DELETE FROM ${options.table}`).run();
|
398
|
-
if(!fetched) return null;
|
399
|
-
return fetched.changes;
|
400
|
-
|
401
|
-
}
|
402
|
-
};
|
403
|
-
|
404
|
-
|
405
|
-
function arbitrate(method, params) {
|
406
|
-
let options = {table: "json"};
|
407
|
-
db.prepare(`CREATE TABLE IF NOT EXISTS ${options.table} (ID TEXT, json TEXT)`).run();
|
408
|
-
if (params.ops.target && params.ops.target[0] === ".") params.ops.target = params.ops.target.slice(1); // Remove prefix if necessary
|
409
|
-
if (params.data && params.data === Infinity) throw new TypeError(`You cannot set Infinity into the database @ ID: ${params.id}`);
|
410
|
-
if (params.id && typeof params.id == "string" && params.id.includes(".")) {
|
411
|
-
let unparsed = params.id.split(".");
|
412
|
-
params.id = unparsed.shift();
|
413
|
-
params.ops.target = unparsed.join(".");
|
414
|
-
}
|
415
|
-
return methods[method](db, params, options);
|
416
|
-
}
|
417
|
-
|
418
|
-
|
419
|
-
module.exports = function ChernobyL(Local) {
|
420
|
-
if (Local && process.env["REPL_ID"]) {
|
421
|
-
return {
|
422
|
-
set: Lset,
|
423
|
-
get: Lget,
|
424
|
-
has: Lhas,
|
425
|
-
delete: Lremove,
|
426
|
-
deleteMultiple: LremoveMultiple,
|
427
|
-
list: Llist
|
428
|
-
};
|
429
|
-
} else if (!Local && process.env["REPL_ID"]) {
|
430
|
-
return {
|
431
|
-
set: Replit_Set,
|
432
|
-
get: Replit_Get,
|
433
|
-
has: Replit_Has,
|
434
|
-
delete: Replit_Remove,
|
435
|
-
deleteMultiple: Replit_RemoveMultiple,
|
436
|
-
list: Replit_List
|
437
|
-
};
|
438
|
-
}
|
439
|
-
else if (Local && !process.env["REPL_ID"]) {
|
440
|
-
return {
|
441
|
-
set: Lset,
|
442
|
-
get: Lget,
|
443
|
-
has: Lhas,
|
444
|
-
delete: Lremove,
|
445
|
-
deleteMultiple: LremoveMultiple,
|
446
|
-
list: Llist
|
447
|
-
};
|
448
|
-
}
|
449
|
-
else if (!Local && !process.env["REPL_ID"]) {
|
450
|
-
return {
|
451
|
-
set: Lset,
|
452
|
-
get: Lget,
|
453
|
-
has: Lhas,
|
454
|
-
delete: Lremove,
|
455
|
-
deleteMultiple: LremoveMultiple,
|
456
|
-
list: Llist
|
457
|
-
};
|
458
|
-
}
|
459
|
-
else {
|
460
|
-
return {
|
461
|
-
set: Lset,
|
462
|
-
get: Lget,
|
463
|
-
has: Lhas,
|
464
|
-
delete: Lremove,
|
465
|
-
deleteMultiple: LremoveMultiple,
|
466
|
-
list: Llist
|
467
|
-
};
|
468
|
-
}
|
469
|
-
};
|
package/Extra/ExtraAddons.js
DELETED
@@ -1,82 +0,0 @@
|
|
1
|
-
'use strict';
|
2
|
-
|
3
|
-
var utils = require('../utils');
|
4
|
-
var logger = require('../logger')
|
5
|
-
var OTP = require('totp-generator');
|
6
|
-
|
7
|
-
module.exports.getInfo = async function (id,jar,ctx,defaultFuncs) {
|
8
|
-
var AccessToken = await module.exports.getAccessToken(jar,ctx,defaultFuncs);
|
9
|
-
var { body:Data } = await utils.get(`https://graph.facebook.com/${id}?fields=age_range,picture,cover,name,first_name,email,about,birthday,gender,website,hometown,link,location,quotes,relationship_status,significant_other,username,subscribers.limite(0)&access_token=${AccessToken}`,jar,null,ctx.globalOptions);
|
10
|
-
var Format = {
|
11
|
-
id: JSON.parse(Data).id || "No Data",
|
12
|
-
name: JSON.parse(Data).name || "No Data Available",
|
13
|
-
first_name: JSON.parse(Data).first_name || "No Data Available",
|
14
|
-
username: JSON.parse(Data).username || "No Data Available",
|
15
|
-
link: JSON.parse(Data).link || "No Data Available",
|
16
|
-
verified: JSON.parse(Data).verified || "No Data Available",
|
17
|
-
about: JSON.parse(Data).about || "No Data Available",
|
18
|
-
avatar: JSON.parse(Data).picture.data.url || "No Data Available",
|
19
|
-
cover: JSON.parse(Data).cover.source || "No Data Available",
|
20
|
-
birthday: JSON.parse(Data).birthday || "No Data Available",
|
21
|
-
age: JSON.parse(Data).age_range.min || "No Data Available",
|
22
|
-
follow: JSON.parse(Data).subscribers.summary.total_count || "No Data Available",
|
23
|
-
gender: JSON.parse(Data).gender || "No Data Available",
|
24
|
-
hometown: JSON.parse(Data).hometown || "No Data Available",
|
25
|
-
email: JSON.parse(Data).email || "No Data Available",
|
26
|
-
interested_in: JSON.parse(Data).interested_in || "No Data Available",
|
27
|
-
location: JSON.parse(Data).location || "No Data Available",
|
28
|
-
locale: JSON.parse(Data).locale || "No Data Available",
|
29
|
-
relationship_status: JSON.parse(Data).relationship_status || "No Data Available",
|
30
|
-
love: JSON.parse(Data).significant_other || "No Data Available",
|
31
|
-
website: JSON.parse(Data).website || "No Data Available",
|
32
|
-
quotes: JSON.parse(Data).quotes || "No Data Available",
|
33
|
-
timezone: JSON.parse(Data).timezone || "No Data Available",
|
34
|
-
updated_time: JSON.parse(Data).updated_time || "No Data Available"
|
35
|
-
}
|
36
|
-
return Format;
|
37
|
-
}
|
38
|
-
|
39
|
-
/**
|
40
|
-
* Help: @ManhG
|
41
|
-
* Author: @KanzuWakazaki
|
42
|
-
*/
|
43
|
-
|
44
|
-
module.exports.getAccessToken = async function (jar, ctx,defaultFuncs) {
|
45
|
-
if (global.Fca.Data.AccessToken) {
|
46
|
-
return global.Fca.Data.AccessToken;
|
47
|
-
}
|
48
|
-
else {
|
49
|
-
var nextURLS = "https://business.facebook.com/security/twofactor/reauth/enter/"
|
50
|
-
return defaultFuncs.get('https://business.facebook.com/content_management', jar, null, ctx.globalOptions).then(async function(data) {
|
51
|
-
try {
|
52
|
-
if (/"],\["(.*?)","/.exec(/LMBootstrapper(.*?){"__m":"LMBootstrapper"}/.exec(data.body)[1])[1]) {
|
53
|
-
global.Fca.Data.AccessToken = /"],\["(.*?)","/.exec(/LMBootstrapper(.*?){"__m":"LMBootstrapper"}/.exec(data.body)[1])[1];
|
54
|
-
return /"],\["(.*?)","/.exec(/LMBootstrapper(.*?){"__m":"LMBootstrapper"}/.exec(data.body)[1])[1];
|
55
|
-
}
|
56
|
-
}
|
57
|
-
catch (_) {
|
58
|
-
if (global.Fca.Require.ShankarConfig.AuthString.includes('|')) return logger.Error(global.Fca.Require.Language.Index.Missing)
|
59
|
-
var OPTCODE = global.Fca.Require.ShankarConfig.AuthString.includes(" ") ? global.Fca.Require.ShankarConfig.AuthString.replace(RegExp(" ", 'g'), "") : global.Fca.Require.ShankarConfig.AuthString;
|
60
|
-
var Form = {
|
61
|
-
approvals_code: OTP(String(OPTCODE)),
|
62
|
-
save_device: false,
|
63
|
-
lsd: utils.getFrom(data.body, "[\"LSD\",[],{\"token\":\"", "\"}")
|
64
|
-
}
|
65
|
-
return defaultFuncs.post(nextURLS, jar, Form, ctx.globalOptions, {
|
66
|
-
referer: "https://business.facebook.com/security/twofactor/reauth/?twofac_next=https%3A%2F%2Fbusiness.facebook.com%2Fcontent_management&type=avoid_bypass&app_id=0&save_device=0",
|
67
|
-
}).then(async function(dataa) {
|
68
|
-
if (String(dataa.body).includes(false)) throw { Error: "Invaild OTP | ShankarConfigFca.json: AuthString" }
|
69
|
-
return utils.get('https://business.facebook.com/content_management', jar, null, ctx.globalOptions,{
|
70
|
-
referer: "https://business.facebook.com/security/twofactor/reauth/?twofac_next=https%3A%2F%2Fbusiness.facebook.com%2Fcontent_management&type=avoid_bypass&app_id=0&save_device=0",
|
71
|
-
}).then(async function(data) {
|
72
|
-
var Access_Token = /"],\["(.*?)","/.exec(/BusinessToolEmptyView.brands.react(.*?){"__m":"BusinessToolEmptyView.brands.react"}/.exec(data.body)[1])[1];
|
73
|
-
global.Fca.Data.AccessToken = Access_Token;
|
74
|
-
return Access_Token;
|
75
|
-
});
|
76
|
-
});
|
77
|
-
}
|
78
|
-
})
|
79
|
-
}
|
80
|
-
}
|
81
|
-
|
82
|
-
//hard working =))
|
package/Extra/ExtraFindUID.js
DELETED
@@ -1,62 +0,0 @@
|
|
1
|
-
'use strict';
|
2
|
-
|
3
|
-
const got = global.Fca.Require.Fetch;
|
4
|
-
|
5
|
-
/**
|
6
|
-
* @param {string | URL} url
|
7
|
-
* @param {{ sendMessage: (arg0: string, arg1: any) => any; }} api
|
8
|
-
*/
|
9
|
-
async function getUIDSlow(url,api) {
|
10
|
-
var FormData = require("form-data");
|
11
|
-
var Form = new FormData();
|
12
|
-
var Url = new URL(url);
|
13
|
-
Form.append('username', Url.pathname.replace(/\//g, ""));
|
14
|
-
try {
|
15
|
-
var data = await got.post('https://api.findids.net/api/get-uid-from-username',{
|
16
|
-
body: Form,
|
17
|
-
userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.79 Safari/537.36'
|
18
|
-
})
|
19
|
-
} catch (e) {
|
20
|
-
console.log(global.Fca.Data.event.threadID,e)
|
21
|
-
return api.sendMessage("Lỗi: " + e.message,global.Fca.Data.event.threadID);
|
22
|
-
}
|
23
|
-
if (JSON.parse(data.body.toString()).status != 200) return api.sendMessage('Has Encountered an Error !',global.Fca.Data.event.threadID)
|
24
|
-
if (typeof JSON.parse(data.body.toString()).error === 'string') return "errr"
|
25
|
-
else return JSON.parse(data.body.toString()).data.id || "nịt";
|
26
|
-
}
|
27
|
-
|
28
|
-
/**
|
29
|
-
* @param {string | URL} url
|
30
|
-
* @param {{ sendMessage: (arg0: string, arg1: any, arg2: any) => any; }} api
|
31
|
-
*/
|
32
|
-
async function getUIDFast(url,api) {
|
33
|
-
var FormData = require("form-data");
|
34
|
-
var Form = new FormData();
|
35
|
-
var Url = new URL(url);
|
36
|
-
Form.append('link', Url.href);
|
37
|
-
try {
|
38
|
-
var data = await got.post('https://id.traodoisub.com/api.php',{
|
39
|
-
body: Form
|
40
|
-
})
|
41
|
-
} catch (e) {
|
42
|
-
return api.sendMessage("Error: " + e.message,global.Fca.Data.event.threadID,global.Fca.Data.event.messageID);
|
43
|
-
}
|
44
|
-
if (JSON.parse(data.body.toString()).error) return api.sendMessage(JSON.parse(data.body.toString()).error,global.Fca.Data.event.threadID,global.Fca.Data.event.messageID);
|
45
|
-
else return JSON.parse(data.body.toString()).id || "I feel a little sad";
|
46
|
-
}
|
47
|
-
|
48
|
-
/**
|
49
|
-
* @param {any} url
|
50
|
-
* @param {any} api
|
51
|
-
*/
|
52
|
-
async function getUID(url,api) {
|
53
|
-
var getUID = await getUIDFast(url,api);
|
54
|
-
if (!isNaN(getUID) == true) return getUID;
|
55
|
-
else {
|
56
|
-
let getUID = await getUIDSlow(url,api);
|
57
|
-
if (!isNaN(data) == true) return getUID;
|
58
|
-
else return null;
|
59
|
-
}
|
60
|
-
}
|
61
|
-
|
62
|
-
module.exports = getUID;
|