fca-test-mtx 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- package/.cache/nix/binary-cache-v6.sqlite-journal +0 -0
- package/.cache/replit/__replit_disk_meta.json +1 -0
- package/.cache/replit/modules/nodejs-20:v22-20240103-2da4911.res +1 -0
- package/.cache/replit/modules.stamp +0 -0
- package/.cache/replit/nix/env.json +1 -0
- package/.cache/typescript/5.0/package.json +1 -0
- package/.cache/typescript/5.3/package.json +1 -0
- package/.gitattributes +2 -0
- package/.prettierrc +4 -0
- package/.replit +14 -0
- package/.upm/store.json +1 -0
- package/Extra/Database/index.js +469 -0
- package/Extra/ExtraAddons.js +82 -0
- package/Extra/ExtraFindUID.js +62 -0
- package/Extra/ExtraGetThread.js +340 -0
- package/Extra/ExtraScreenShot.js +430 -0
- package/Extra/ExtraUptimeRobot.js +38 -0
- package/Extra/Html/Classic/script.js +119 -0
- package/Extra/Html/Classic/style.css +8 -0
- package/Extra/Security/AES_256_GCM/index.js +0 -0
- package/Extra/Security/Base/Step_1.js +6 -0
- package/Extra/Security/Base/Step_2.js +22 -0
- package/Extra/Security/Base/Step_3.js +22 -0
- package/Extra/Security/Base/index.js +173 -0
- package/Extra/Security/Index.js +5 -0
- package/Extra/Security/Step_1.js +6 -0
- package/Extra/Security/Step_2.js +22 -0
- package/Extra/Security/Step_3.js +22 -0
- package/Extra/Src/Change_Environment.js +24 -0
- package/Extra/Src/Check_Update.js +66 -0
- package/Extra/Src/History.js +115 -0
- package/Extra/Src/Instant_Update.js +65 -0
- package/Extra/Src/Last-Run.js +65 -0
- package/Extra/Src/Premium.js +81 -0
- package/Extra/Src/Release_Memory.js +41 -0
- package/Extra/Src/Websocket.js +213 -0
- package/Extra/Src/images/checkmate.jpg +0 -0
- package/Extra/Src/uuid.js +137 -0
- package/ExtraGetThread.js +1217 -0
- package/Func/AcceptAgreement.js +31 -0
- package/Func/ClearCache.js +64 -0
- package/Func/ReportV1.js +54 -0
- package/LICENSE +21 -0
- package/Language/index.json +110 -0
- package/README.md +136 -0
- package/SECURITY.md +18 -0
- package/broadcast.js +40 -0
- package/index.js +387 -0
- package/ivancotacte1.png +0 -0
- package/ivancotacte2.jpg +0 -0
- package/ivancotacte3.png +0 -0
- package/logger.js +67 -0
- package/package.json +93 -0
- package/replit.nix +3 -0
- package/src/Dev_Horizon_Data.js +125 -0
- package/src/Premium.js +25 -0
- package/src/Screenshot.js +83 -0
- package/src/addExternalModule.js +16 -0
- package/src/addUserToGroup.js +79 -0
- package/src/changeAdminStatus.js +79 -0
- package/src/changeArchivedStatus.js +41 -0
- package/src/changeAvt.js +85 -0
- package/src/changeBio.js +65 -0
- package/src/changeBlockedStatus.js +36 -0
- package/src/changeGroupImage.js +106 -0
- package/src/changeNickname.js +45 -0
- package/src/changeThreadColor.js +62 -0
- package/src/changeThreadEmoji.js +42 -0
- package/src/createNewGroup.js +70 -0
- package/src/createPoll.js +60 -0
- package/src/deleteMessage.js +45 -0
- package/src/deleteThread.js +43 -0
- package/src/forwardAttachment.js +48 -0
- package/src/getAccessToken.js +28 -0
- package/src/getCurrentUserID.js +7 -0
- package/src/getEmojiUrl.js +27 -0
- package/src/getFriendsList.js +73 -0
- package/src/getMessage.js +80 -0
- package/src/getThreadHistory.js +537 -0
- package/src/getThreadInfo.js +425 -0
- package/src/getThreadList.js +213 -0
- package/src/getThreadMain.js +220 -0
- package/src/getThreadPictures.js +59 -0
- package/src/getUID.js +59 -0
- package/src/getUserID.js +62 -0
- package/src/getUserInfo.js +113 -0
- package/src/getUserInfoMain.js +65 -0
- package/src/getUserInfoV2.js +32 -0
- package/src/getUserInfoV3.js +63 -0
- package/src/getUserInfoV4.js +55 -0
- package/src/getUserInfoV5.js +61 -0
- package/src/handleFriendRequest.js +46 -0
- package/src/handleMessageRequest.js +49 -0
- package/src/httpGet.js +49 -0
- package/src/httpPost.js +48 -0
- package/src/httpPostFormData.js +41 -0
- package/src/listenMqtt.js +787 -0
- package/src/logout.js +68 -0
- package/src/markAsDelivered.js +48 -0
- package/src/markAsRead.js +70 -0
- package/src/markAsReadAll.js +43 -0
- package/src/markAsSeen.js +51 -0
- package/src/muteThread.js +47 -0
- package/src/removeUserFromGroup.js +49 -0
- package/src/resolvePhotoUrl.js +37 -0
- package/src/searchForThread.js +43 -0
- package/src/sendMessage.js +455 -0
- package/src/sendTypingIndicator.js +80 -0
- package/src/setMessageReaction.js +109 -0
- package/src/setPostReaction.js +102 -0
- package/src/setTitle.js +74 -0
- package/src/threadColors.js +39 -0
- package/src/unfriend.js +43 -0
- package/src/unsendMessage.js +40 -0
- package/test/Database_Test.js +4 -0
- package/test/ExtraGetThread.js +530 -0
- package/test/Horizon_Database/A_README.md +1 -0
- package/test/Horizon_Database/Database.db +0 -0
- package/test/data/shareAttach.js +146 -0
- package/test/data/something.mov +0 -0
- package/test/data/test.png +0 -0
- package/test/data/test.txt +7 -0
- package/test/example-config.json +18 -0
- package/test/example-db.db +0 -0
- package/test/memoryleak.js +18 -0
- package/test/test-page.js +140 -0
- package/test/test.js +385 -0
- package/test/testv2.js +18 -0
- package/utils.js +1683 -0
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
{"nonce":947360290981994167,"last_updated":{"seconds":1699397888,"nanos":166843000}}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"type":"resolve","resolvedModuleId":"nodejs-20:v22-20240103-2da4911","inputHash":"","resolutionPath":["nodejs-20:v8-20230920-bd784b9","nodejs-20:v9-20231020-a3526c9","nodejs-20:v10-20231103-2b03dda","nodejs-20:v11-20231122-8e4093b","nodejs-20:v12-20231130-57acee0","nodejs-20:v13-20231201-3b22c78","nodejs-20:v14-20231206-9a12353","nodejs-20:v15-20231206-d8b5d0b","nodejs-20:v16-20231207-cf9ab20","nodejs-20:v17-20231207-25d440f","nodejs-20:v18-20231211-ac14ad7","nodejs-20:v19-20231216-fb57c71","nodejs-20:v20-20231219-faac932","nodejs-20:v21-20240102-fd07a42","nodejs-20:v22-20240103-2da4911"],"error":"","Changed":true}
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
{"entries":{"replit.nix":{"env":{"AR":"ar","AS":"as","CC":"gcc","CONFIG_SHELL":"/nix/store/7q1b1bsmxi91zci6g8714rcljl620y7f-bash-5.2-p15/bin/bash","CXX":"g++","HOST_PATH":"/nix/store/f11ibsj5vmqcy8ihfa8mzvpfs4af7cw5-coreutils-9.1/bin:/nix/store/jvh4fbqfxwwn162k5hb8ndc4h5555wfa-findutils-4.9.0/bin:/nix/store/w4pi0awp7mkfwwqi64bhy83srwkcs9af-diffutils-3.9/bin:/nix/store/w64nwxs3r6cyqgy6ssxib5i2r6k8yfc2-gnused-4.9/bin:/nix/store/rn5b13lbsslbvmmbqnqxdcagzqp4435w-gnugrep-3.7/bin:/nix/store/2hd6hniab7x4k5vlnxl27vcfm99h4qjm-gawk-5.2.1/bin:/nix/store/g04kanq0g4a9vdlw9mqayvcqfy71r19r-gnutar-1.34/bin:/nix/store/5z4s362vmm6l0qf6x5rjr39y6mf35xjn-gzip-1.12/bin:/nix/store/vhpdjfcb7bdpzgqnlivb8629g02257f9-bzip2-1.0.8-bin/bin:/nix/store/v379zfyn6473hcy2nvlam0vkn120gfbp-gnumake-4.4.1/bin:/nix/store/7q1b1bsmxi91zci6g8714rcljl620y7f-bash-5.2-p15/bin:/nix/store/2mwcbkx6br4nfk1gljc62vmll80l20y3-patch-2.7.6/bin:/nix/store/z9355bsrkh1as20pil82nnvn5fc14gbr-xz-5.4.3-bin/bin:/nix/store/087609j187svcvxi5rn0jk3b9rh9pm24-file-5.44/bin","LD":"ld","LOCALE_ARCHIVE":"/usr/lib/locale/locale-archive","NIX_BINTOOLS":"/nix/store/2fr6714pqybnns0sfm9swa4dlaxg8sjz-binutils-wrapper-2.40","NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu":"1","NIX_BUILD_CORES":"2","NIX_BUILD_TOP":"/tmp","NIX_CC":"/nix/store/d9fndiing52fkalp5knfalrvlb3isi6w-gcc-wrapper-12.2.0","NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu":"1","NIX_CFLAGS_COMPILE":" -frandom-seed=qq47x68jnn","NIX_ENFORCE_NO_NATIVE":"1","NIX_HARDENING_ENABLE":"fortify stackprotector pic strictoverflow format relro bindnow","NIX_LDFLAGS":"-rpath /nix/store/qq47x68jnncyynia9dy84qnc12nh942m-nix-shell/lib64 -rpath /nix/store/qq47x68jnncyynia9dy84qnc12nh942m-nix-shell/lib ","NIX_STORE":"/nix/store","NM":"nm","OBJCOPY":"objcopy","OBJDUMP":"objdump","PATH":"/nix/store/5d0bgm1j7nwan9z0gkv7lfsm5chz0jwq-bash-interactive-5.2-p15/bin:/nix/store/xxpqzipy93i49sgvm6rl8b9lm1p0bx9b-patchelf-0.15.0/bin:/nix/store/d9fndiing52fkalp5knfalrvlb3isi6w-gcc-wrapper-12.2.0/bin:/nix/store/hqbh8ibqaq8x6riwz48xvyx4dvvldd9f-gcc-12.2.0/bin:/nix/store/d9phlk9dq80grqczgbyi1z2w570bbnz8-glibc-2.37-8-bin/bin:/nix/store/f11ibsj5vmqcy8ihfa8mzvpfs4af7cw5-coreutils-9.1/bin:/nix/store/2fr6714pqybnns0sfm9swa4dlaxg8sjz-binutils-wrapper-2.40/bin:/nix/store/dx8hynidprz3kf4ngcjipnwaxp6h229f-binutils-2.40/bin:/nix/store/f11ibsj5vmqcy8ihfa8mzvpfs4af7cw5-coreutils-9.1/bin:/nix/store/jvh4fbqfxwwn162k5hb8ndc4h5555wfa-findutils-4.9.0/bin:/nix/store/w4pi0awp7mkfwwqi64bhy83srwkcs9af-diffutils-3.9/bin:/nix/store/w64nwxs3r6cyqgy6ssxib5i2r6k8yfc2-gnused-4.9/bin:/nix/store/rn5b13lbsslbvmmbqnqxdcagzqp4435w-gnugrep-3.7/bin:/nix/store/2hd6hniab7x4k5vlnxl27vcfm99h4qjm-gawk-5.2.1/bin:/nix/store/g04kanq0g4a9vdlw9mqayvcqfy71r19r-gnutar-1.34/bin:/nix/store/5z4s362vmm6l0qf6x5rjr39y6mf35xjn-gzip-1.12/bin:/nix/store/vhpdjfcb7bdpzgqnlivb8629g02257f9-bzip2-1.0.8-bin/bin:/nix/store/v379zfyn6473hcy2nvlam0vkn120gfbp-gnumake-4.4.1/bin:/nix/store/7q1b1bsmxi91zci6g8714rcljl620y7f-bash-5.2-p15/bin:/nix/store/2mwcbkx6br4nfk1gljc62vmll80l20y3-patch-2.7.6/bin:/nix/store/z9355bsrkh1as20pil82nnvn5fc14gbr-xz-5.4.3-bin/bin:/nix/store/087609j187svcvxi5rn0jk3b9rh9pm24-file-5.44/bin","RANLIB":"ranlib","READELF":"readelf","SIZE":"size","SOURCE_DATE_EPOCH":"315532800","STRINGS":"strings","STRIP":"strip","XDG_DATA_DIRS":"/nix/store/xxpqzipy93i49sgvm6rl8b9lm1p0bx9b-patchelf-0.15.0/share","_":"/nix/store/f11ibsj5vmqcy8ihfa8mzvpfs4af7cw5-coreutils-9.1/bin/env","__ETC_PROFILE_SOURCED":"1","__structuredAttrs":"","buildInputs":"","buildPhase":"{ echo \"------------------------------------------------------------\";\n echo \" WARNING: the existence of this path is not guaranteed.\";\n echo \" It is an internal implementation detail for pkgs.mkShell.\";\n echo \"------------------------------------------------------------\";\n echo;\n # Record all build inputs as runtime dependencies\n export;\n} \u003e\u003e \"$out\"\n","builder":"/nix/store/7q1b1bsmxi91zci6g8714rcljl620y7f-bash-5.2-p15/bin/bash","cmakeFlags":"","configureFlags":"","depsBuildBuild":"","depsBuildBuildPropagated":"","depsBuildTarget":"","depsBuildTargetPropagated":"","depsHostHost":"","depsHostHostPropagated":"","depsTargetTarget":"","depsTargetTargetPropagated":"","doCheck":"","doInstallCheck":"","mesonFlags":"","name":"nix-shell","nativeBuildInputs":"","out":"/nix/store/qq47x68jnncyynia9dy84qnc12nh942m-nix-shell","outputs":"out","patches":"","phases":"buildPhase","preferLocalBuild":"1","propagatedBuildInputs":"","propagatedNativeBuildInputs":"","shell":"/nix/store/7q1b1bsmxi91zci6g8714rcljl620y7f-bash-5.2-p15/bin/bash","shellHook":"","stdenv":"/nix/store/5wdlffjhcr4i43sfajxcvx3lvnkryh5y-stdenv-linux","strictDeps":"","system":"x86_64-linux"},"dependencies":[{"path":"replit.nix","mod_time":"2023-12-12T15:11:55.87096988Z"}],"closure":["/nix/store/567zfi9026lp2q6v97vwn640rv6i3n4c-libunistring-1.1","/nix/store/4563gldw8ibz76f1a3x69zq3a1vhdpz9-libidn2-2.3.4","/nix/store/jd99cyc0251p0i5y69w8mqjcai8mcq7h-xgcc-12.2.0-libgcc","/nix/store/dg8mpqqykmw9c7l0bgzzb5znkymlbfjw-glibc-2.37-8","/nix/store/fxq6yn4mfnsnh418l2k218j7sp365sa9-zlib-1.2.13","/nix/store/087609j187svcvxi5rn0jk3b9rh9pm24-file-5.44","/nix/store/7q1b1bsmxi91zci6g8714rcljl620y7f-bash-5.2-p15","/nix/store/d9phlk9dq80grqczgbyi1z2w570bbnz8-glibc-2.37-8-bin","/nix/store/qs605c91wv5fr9rny4mmhpdna6i59kdk-linux-headers-6.2","/nix/store/dpk5m64n0axk01fq8h2m0yl9hhpq2nqk-glibc-2.37-8-dev","/nix/store/3w02zcld9m60jkjvwmrs2c5g330qrvjq-binutils-2.40-lib","/nix/store/h9a9hrrvdwg7dbh69w9yp2z3prvdnw48-gcc-12.2.0-libgcc","/nix/store/sm14bmd3l61p5m0q7wa5g7rz2bl6azqf-gcc-12.2.0-lib","/nix/store/dx8hynidprz3kf4ngcjipnwaxp6h229f-binutils-2.40","/nix/store/9pg1y0wx907vgi0kpw10gwdblv6v84a8-gmp-with-cxx-6.2.1","/nix/store/m9c4c5sf4h49na44ih20qkxa71wavbg6-attr-2.5.1","/nix/store/knkqz46i3k0y1f53hlnkg09cqb4nr09b-acl-2.3.1","/nix/store/f11ibsj5vmqcy8ihfa8mzvpfs4af7cw5-coreutils-9.1","/nix/store/kv5bkjsxp75dvz31bvb4gmamycxyz959-expand-response-params","/nix/store/2fr6714pqybnns0sfm9swa4dlaxg8sjz-binutils-wrapper-2.40","/nix/store/2hd6hniab7x4k5vlnxl27vcfm99h4qjm-gawk-5.2.1","/nix/store/d6d7rhq8hl6bpkgwp356pq5j2sd6wfgm-ed-1.19","/nix/store/2mwcbkx6br4nfk1gljc62vmll80l20y3-patch-2.7.6","/nix/store/5yzw0vhkyszf2d179m0qfkgxmp5wjjx4-move-docs.sh","/nix/store/5z4s362vmm6l0qf6x5rjr39y6mf35xjn-gzip-1.12","/nix/store/a9ndjg0b1ivi0av9m93vfkrndp7fqbw1-strip.sh","/nix/store/bxsly8a56yb8kyrq03s82a3vyc8fqrb3-multiple-outputs.sh","/nix/store/cickvswrvann041nqxb0rxilc46svw1n-prune-libtool-files.sh","/nix/store/d2skw3y1jcg27ml4rgz38lrn18q0wrs1-gmp-6.2.1","/nix/store/88dbrfrmj0lqxwyk4q6h7w5glkgkfvmn-mpfr-4.2.0","/nix/store/dg38bhsf0pl4m7qp65cf3aw7xyyw5g8d-libmpc-1.3.1","/nix/store/f2z9hlzn0ajm4i296r77v3ihcfi77ld8-isl-0.20","/nix/store/hqbh8ibqaq8x6riwz48xvyx4dvvldd9f-gcc-12.2.0","/nix/store/wkp4n3pwapq9pxv9f0341n5l9im4im1v-pcre-8.45","/nix/store/rn5b13lbsslbvmmbqnqxdcagzqp4435w-gnugrep-3.7","/nix/store/d9fndiing52fkalp5knfalrvlb3isi6w-gcc-wrapper-12.2.0","/nix/store/fyaryjvghbkpfnsyw97hb3lyb37s1pd6-move-lib64.sh","/nix/store/g04kanq0g4a9vdlw9mqayvcqfy71r19r-gnutar-1.34","/nix/store/h9lc1dpi14z7is86ffhl3ld569138595-audit-tmpdir.sh","/nix/store/jvh4fbqfxwwn162k5hb8ndc4h5555wfa-findutils-4.9.0","/nix/store/kd4xwxjpjxi71jkm6ka0np72if9rm3y0-move-sbin.sh","/nix/store/m54bmrhj6fqz8nds5zcj97w9s9bckc9v-compress-man-pages.sh","/nix/store/nf1lkdrhapsx5lr6diyxyjr7pb7r20gr-patch-shebangs.sh","/nix/store/ngg1cv31c8c7bcm2n8ww4g06nq7s4zhm-set-source-date-epoch-to-latest.sh","/nix/store/pag6l61paj1dc9sv15l7bm5c17xn5kyk-move-systemd-user-units.sh","/nix/store/v379zfyn6473hcy2nvlam0vkn120gfbp-gnumake-4.4.1","/nix/store/gxa1k0wg4fiy33rsh1hhizbdi5xp1s6c-bzip2-1.0.8","/nix/store/vhpdjfcb7bdpzgqnlivb8629g02257f9-bzip2-1.0.8-bin","/nix/store/w4pi0awp7mkfwwqi64bhy83srwkcs9af-diffutils-3.9","/nix/store/w64nwxs3r6cyqgy6ssxib5i2r6k8yfc2-gnused-4.9","/nix/store/wgrbkkaldkrlrni33ccvm3b6vbxzb656-make-symlinks-relative.sh","/nix/store/xxpqzipy93i49sgvm6rl8b9lm1p0bx9b-patchelf-0.15.0","/nix/store/xyff06pkhki3qy1ls77w10s0v79c9il0-reproducible-builds.sh","/nix/store/c8g0di38wqryn4mir8a2l960qgbil05x-xz-5.4.3","/nix/store/z9355bsrkh1as20pil82nnvn5fc14gbr-xz-5.4.3-bin","/nix/store/5wdlffjhcr4i43sfajxcvx3lvnkryh5y-stdenv-linux","/nix/store/6xg259477c90a229xwmb53pdfkn6ig3g-default-builder.sh","/nix/store/mm74c5kz95y07kh7x9h64shc4jhlhqpl-nix-shell"],"channel":"stable-23_05","channel_nix_path":"/nix/store/qv8ilmw19rf0vng64qp86mb18kkr6h3z-nixpkgs-stable-23_05-23.05.tar.gz/nixpkgs-stable-23_05","production":null}}}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"private":true,"dependencies":{"types-registry":"^0.1.673"}}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"private":true,"dependencies":{"types-registry":"^0.1.674"},"devDependencies":{"@types/node-fetch":"^2.6.9"}}
|
package/.gitattributes
ADDED
package/.prettierrc
ADDED
package/.replit
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
modules = ["nodejs-20:v8-20230920-bd784b9"]
|
2
|
+
hidden = [".config", "package-lock.json"]
|
3
|
+
run = "npm run start"
|
4
|
+
|
5
|
+
[nix]
|
6
|
+
channel = "stable-23_05"
|
7
|
+
|
8
|
+
[unitTest]
|
9
|
+
language = "nodejs"
|
10
|
+
|
11
|
+
[deployment]
|
12
|
+
run = ["sh", "-c", "npm run start"]
|
13
|
+
deploymentTarget = "cloudrun"
|
14
|
+
ignorePorts = false
|
package/.upm/store.json
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":2,"languages":{"nodejs-npm":{"specfileHash":"257bee97dfb75d13700a54a2242fc134","lockfileHash":"b2ab5f8a8ec626e9fbfd859883f13155","guessedImports":["gradient-string","totp-generator","pretty-ms","fs-extra","speakeasy","deasync","is-hexcolor","figlet","ansi-to-html","chalk","bluebird","got","request","cheerio","ws","npmlog","express"],"guessedImportsHash":"60c6df0bb842e2ef0ad83c7620c2e70b"}}}
|
@@ -0,0 +1,469 @@
|
|
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() + '/MTX_Database')) {
|
11
|
+
fs.mkdirSync(process.cwd() + '/MTX_Database');
|
12
|
+
fs.writeFileSync(process.cwd() + '/MTX_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() + "/MTX_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
|
+
};
|
@@ -0,0 +1,82 @@
|
|
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",
|
13
|
+
first_name: JSON.parse(Data).first_name || "No data",
|
14
|
+
username: JSON.parse(Data).username || "No data",
|
15
|
+
link: JSON.parse(Data).link || "No data",
|
16
|
+
verified: JSON.parse(Data).verified || "No data",
|
17
|
+
about: JSON.parse(Data).about || "No data",
|
18
|
+
avatar: JSON.parse(Data).picture.data.url || "No data",
|
19
|
+
cover: JSON.parse(Data).cover.source || "No data",
|
20
|
+
birthday: JSON.parse(Data).birthday || "No data",
|
21
|
+
age: JSON.parse(Data).age_range.min || "No data",
|
22
|
+
follow: JSON.parse(Data).subscribers.summary.total_count || "No data",
|
23
|
+
gender: JSON.parse(Data).gender || "No data",
|
24
|
+
hometown: JSON.parse(Data).hometown || "No data",
|
25
|
+
email: JSON.parse(Data).email || "No data",
|
26
|
+
interested_in: JSON.parse(Data).interested_in || "No data",
|
27
|
+
location: JSON.parse(Data).location || "No data",
|
28
|
+
locale: JSON.parse(Data).locale || "No data",
|
29
|
+
relationship_status: JSON.parse(Data).relationship_status || "No data",
|
30
|
+
love: JSON.parse(Data).significant_other || "No data",
|
31
|
+
website: JSON.parse(Data).website || "No data",
|
32
|
+
quotes: JSON.parse(Data).quotes || "No data",
|
33
|
+
timezone: JSON.parse(Data).timezone || "No data",
|
34
|
+
updated_time: JSON.parse(Data).updated_time || "No data"
|
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.FastConfig.AuthString.includes('|')) return logger.Error(global.Fca.Require.Language.Index.Missing)
|
59
|
+
var OPTCODE = global.Fca.Require.FastConfig.AuthString.includes(" ") ? global.Fca.Require.FastConfig.AuthString.replace(RegExp(" ", 'g'), "") : global.Fca.Require.FastConfig.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 | /Orion_Database/FastConfigFca.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 =))
|