koja-uptime-fca 12.9.6

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of koja-uptime-fca might be problematic. Click here for more details.

Files changed (90) hide show
  1. package/.cache/replit/__replit_disk_meta.json +1 -0
  2. package/.cache/replit/modules.stamp +0 -0
  3. package/.cache/replit/nix/env.json +1 -0
  4. package/.gitattributes +2 -0
  5. package/.travis.yml +6 -0
  6. package/CHANGELOG.md +4 -0
  7. package/DOCS.md +1738 -0
  8. package/Extra/ExtraAddons.js +78 -0
  9. package/Extra/ExtraFindUID.js +60 -0
  10. package/Extra/ExtraGetThread.js +118 -0
  11. package/Extra/ExtraTranslate.js +62 -0
  12. package/Extra/Src/Last-Run.js +65 -0
  13. package/GetThreadInfo.js +118 -0
  14. package/LICENSE-MIT +21 -0
  15. package/Readme.md +87 -0
  16. package/StateCrypt.js +28 -0
  17. package/base/Data-Vegito.js +358 -0
  18. package/base/test.js +3 -0
  19. package/broadcast.js +1 -0
  20. package/index.js +687 -0
  21. package/languages/languages.json +123 -0
  22. package/logger.js +1 -0
  23. package/package.json +122 -0
  24. package/src/ReportV1.js +55 -0
  25. package/src/addExternalModule.js +16 -0
  26. package/src/addUserToGroup.js +78 -0
  27. package/src/changeAdminStatus.js +79 -0
  28. package/src/changeArchivedStatus.js +41 -0
  29. package/src/changeAvt.js +86 -0
  30. package/src/changeBio.js +65 -0
  31. package/src/changeBlockedStatus.js +36 -0
  32. package/src/changeGroupImage.js +106 -0
  33. package/src/changeNickname.js +45 -0
  34. package/src/changeThreadColor.js +62 -0
  35. package/src/changeThreadEmoji.js +42 -0
  36. package/src/createNewGroup.js +70 -0
  37. package/src/createPoll.js +60 -0
  38. package/src/data/getThreadInfo.json +1 -0
  39. package/src/deleteMessage.js +45 -0
  40. package/src/deleteThread.js +43 -0
  41. package/src/forwardAttachment.js +48 -0
  42. package/src/forwardMessage.js +0 -0
  43. package/src/getAccessToken.js +33 -0
  44. package/src/getCurrentUserID.js +7 -0
  45. package/src/getEmojiUrl.js +27 -0
  46. package/src/getFriendsList.js +73 -0
  47. package/src/getMessage.js +79 -0
  48. package/src/getThreadHistory.js +537 -0
  49. package/src/getThreadHistoryDeprecated.js +71 -0
  50. package/src/getThreadInfo.js +206 -0
  51. package/src/getThreadInfoDeprecated.js +56 -0
  52. package/src/getThreadList.js +213 -0
  53. package/src/getThreadListDeprecated.js +46 -0
  54. package/src/getThreadMain.js +219 -0
  55. package/src/getThreadPictures.js +59 -0
  56. package/src/getUserID.js +62 -0
  57. package/src/getUserInfo.js +66 -0
  58. package/src/getUserInfoMain.js +65 -0
  59. package/src/getUserInfoV2.js +35 -0
  60. package/src/getUserInfoV3.js +63 -0
  61. package/src/getUserInfoV4.js +55 -0
  62. package/src/getUserInfoV5.js +61 -0
  63. package/src/handleFriendRequest.js +46 -0
  64. package/src/handleMessageRequest.js +49 -0
  65. package/src/httpGet.js +49 -0
  66. package/src/httpPost.js +48 -0
  67. package/src/httpPostFormData.js +41 -0
  68. package/src/listen.js +553 -0
  69. package/src/listenMqtt.js +629 -0
  70. package/src/logout.js +68 -0
  71. package/src/markAsDelivered.js +48 -0
  72. package/src/markAsRead.js +70 -0
  73. package/src/markAsReadAll.js +43 -0
  74. package/src/markAsSeen.js +51 -0
  75. package/src/muteThread.js +47 -0
  76. package/src/removeUserFromGroup.js +49 -0
  77. package/src/resolvePhotoUrl.js +37 -0
  78. package/src/searchForThread.js +43 -0
  79. package/src/sendMessage.js +381 -0
  80. package/src/sendTypingIndicator.js +80 -0
  81. package/src/setMessageReaction.js +109 -0
  82. package/src/setPostReaction.js +102 -0
  83. package/src/setTitle.js +74 -0
  84. package/src/threadColors.js +39 -0
  85. package/src/unfriend.js +43 -0
  86. package/src/unsendMessage.js +40 -0
  87. package/test/example-config.json +18 -0
  88. package/test/test-page.js +140 -0
  89. package/test/test.js +385 -0
  90. package/utils.js +2476 -0
@@ -0,0 +1,123 @@
1
+
2
+ {
3
+ "vi": {
4
+ "index": {
5
+ "uptime": "Đã Hoàn Thành Kết Nối Đến Server Uptime Cho Url: ",
6
+ "erroUptime": "Server Uptime Gặp sự Cố, Không Thể Bật Uptime Cho Bạn!",
7
+ "errorLogin": "Appstate - Cookie Của Bạn Đã Bị Lỗi, Hãy Thay Cái Mới, Hoặc Vô Trình Duyệt Ẩn Danh Rồi Đăng Nhập Và Thử Lại !",
8
+ "checkpoint": "Phát Hiện CheckPoint - Không Đăng Nhập Được, Hãy Thử Logout Rồi Login Và Lấy Lại Appstate - Cookie !",
9
+ "loginSu": "Đăng Nhập Thành Công Tại UID: ",
10
+ "region": "Vùng Của Tài Khoản Là: ",
11
+ "login": "Đang Đăng Nhập...",
12
+ "loginError": "Sai Mật Khẩu Hoặc Tài Khoản !",
13
+ "errorFa": "Bạn Đang Sử Dụng 2 Bảo Mật !",
14
+ "okweb": "Xác Nhận Từ Trình Duyệt, Tiến Hành Các Quá Trình Đăng Nhập...",
15
+ "errorEnv": "Tạo Tệp ENV Thất Bại !",
16
+ "env": "Tạo Thành Công Tệp ENV !",
17
+ "errorPassRandom": "Đã Có Lỗi Khi Đang Try Tạo Mật Khẩu Ngẫu Nhiên",
18
+ "appstateDec": "Chưa Sẵn Sàng Để Giải Mã Appstate !",
19
+ "appstate": "Giải Mã Appstate Thành Công !",
20
+ "appstateError": "Appstate Đã Bị Lỗi ! Vui Lòng Thay Mới",
21
+ "oklogin": "Hoàn Thành Quá Trình Đăng Nhập !",
22
+ "newVersion": "Phiên Bản Mới Đã Được Publish: ",
23
+ "autoUpdate": "Tiến Hành Tự Động Cập Nhật Lên Phiên Bản Mới Nhất !",
24
+ "okUpdate": "Nâng Cấp Phiên Bản Thành Công!",
25
+ "restart": "Đang Khởi Động Lại...",
26
+ "errorUpdate": "Đã Xảy Ra Lỗi",
27
+ "checkVersion": "Bạn Hiện Đang Sử Dụng Phiên Bản: ",
28
+ "chucAdmin": "Chúc Các Admin Một Ngày Tốt Lành",
29
+ "errorUid": "Không Thể Lấy UID Hãy Thử Lại !",
30
+ "encAppstate": "Mã Hoá AppState Thành Công !"
31
+ }
32
+ },
33
+ "en": {
34
+ "index": {
35
+ "uptime": "Completed Connection To Server Uptime For Url: ",
36
+ "erroUptime": "Uptime Server Has Problems, Can't Turn On Uptime For You!\n\n MADE BY KOJA BABU",
37
+ "errorLogin": "Appstate - Your Cookie Is Wrong, Please Replace It, Or Go To Incognito Browser Then Login And Try Again!\n\n MADE BY KOJA BABU",
38
+ "checkpoint": "Detected CheckPoint - Can't Login, Try Logout Then Login And Get Appstate - Cookie !\n\n MADE BY KOJA BABU",
39
+ "loginSu": "Successfully Login At UID: ",
40
+ "region": "Account's Region Is:",
41
+ "login": "Logging in...",
42
+ "loginError": "Wrong Password Or Account !",
43
+ "errorFa": "You're Using 2 Security !",
44
+ "okweb": "Confirm From Browser, Proceed to Login Process...",
45
+ "errorEnv": "Create ENV File Failed!",
46
+ "env": "Successfully Created ENV File!",
47
+ "errorPassRandom": "An error occurred while trying to generate a Random Password",
48
+ "appstateDec": "Not Ready To Decode Appstate !",
49
+ "appstate": "Decrypting Appstate Successfully!\n\n MADE BY KOJA BABU",
50
+ "appstateError": "Appstate Error ! Please Replace\n\n MADE BY KOJA BABU",
51
+ "oklogin": "Complete Login Process!\n\n MADE BY KOJA BABU",
52
+ "newVersion": "New Version Published: \n\n MADE BY KOJA BABU",
53
+ "autoUpdate": "Proceed to Automatically Update to the Latest Version!",
54
+ "okUpdate": "Version Upgrade Successful!",
55
+ "restart": "Rebooting...\n\n MADE BY KOJA BABU",
56
+ "errorUpdate": "An error has occurred",
57
+ "checkVersion": "You Are Currently Using Version: ",
58
+ "chucAdmin": "Have a nice day Admin",
59
+ "errorUid": "Unable to Get UID Try Again !",
60
+ "encAppstate": "AppState Encryption Successful !\n\n MADE BY KOJA BABU"
61
+ }
62
+ },
63
+ "th": {
64
+ "index": {
65
+ "uptime": "เสร็จสิ้นการเชื่อมต่อกับ Server Uptime สำหรับ URL: ",
66
+ "erroUptime": "เซิร์ฟเวอร์เวลาทำงานมีปัญหา ไม่สามารถเปิดเวลาทำงานให้คุณ!",
67
+ "errorLogin": "Appstate - คุกกี้ของคุณไม่ถูกต้อง โปรดแทนที่ด้วยอันใหม่ หรือไปที่เบราว์เซอร์ที่ไม่ระบุตัวตน จากนั้นลงชื่อเข้าใช้แล้วลองอีกครั้ง!",
68
+ "checkpoint": "ตรวจพบจุดตรวจสอบ - ไม่สามารถเข้าสู่ระบบ ลองออกจากระบบ จากนั้นเข้าสู่ระบบและรับ Appstate - Cookie !",
69
+ "loginSu": "เข้าสู่ระบบสำเร็จที่ UID: ",
70
+ "region": "ภูมิภาคของบัญชีคือ:",
71
+ "login": "กำลังเข้าสู่ระบบ...",
72
+ "loginError": "รหัสผ่านหรือบัญชีไม่ถูกต้อง!",
73
+ "errorFa": "คุณกำลังใช้ 2 Security !",
74
+ "okweb": "ยืนยันจากเบราว์เซอร์ ดำเนินการเข้าสู่ระบบ...",
75
+ "errorEnv": "สร้างไฟล์ ENV ล้มเหลว!",
76
+ "env": "สร้างไฟล์ ENV สำเร็จ!",
77
+ "errorPassRandom": "เกิดข้อผิดพลาดขณะพยายามสร้างรหัสผ่านแบบสุ่ม",
78
+ "appstateDec": "ไม่พร้อมที่จะถอดรหัส Appstate !",
79
+ "appstate": "ถอดรหัส Appstate สำเร็จ!",
80
+ "appstateError": "ข้อผิดพลาดของ Appstate โปรดแทนที่",
81
+ "oklogin": "เสร็จสิ้นขั้นตอนการเข้าสู่ระบบ!",
82
+ "newVersion": "เผยแพร่เวอร์ชันใหม่: ",
83
+ "autoUpdate": "ดำเนินการอัปเดตอัตโนมัติเป็นเวอร์ชันล่าสุด!",
84
+ "okUpdate": "อัปเกรดเวอร์ชันสำเร็จ!",
85
+ "restart": "กำลังรีบูต...",
86
+ "errorUpdate": "เกิดข้อผิดพลาด",
87
+ "checkVersion": "คุณกำลังใช้เวอร์ชัน: ",
88
+ "chucAdmin": "ขอให้มีวันที่ดีผู้ดูแลระบบ",
89
+ "errorUid": "ไม่สามารถรับ UID ลองอีกครั้ง !",
90
+ "encAppstate": "การเข้ารหัส AppState สำเร็จ !"
91
+ }
92
+ },
93
+ "jp": {
94
+ "index": {
95
+ "uptime": "URL のサーバー稼働時間への接続が完了しました: ",
96
+ "erroUptime": "稼働時間サーバーに問題があり、稼働時間をオンにできません!",
97
+ "errorLogin": "Appstate - あなたの Cookie が間違っています。新しい Cookie に置き換えるか、シークレット ブラウザに移動してからサインインしてから、もう一度お試しください!",
98
+ "checkpoint": "検出された CheckPoint - ログインできません。ログアウトしてからログインして Appstate を取得してください - Cookie !",
99
+ "loginSu": "UID でログインに成功しました: ",
100
+ "region": "アカウントの地域:",
101
+ "login": "ログインしています...",
102
+ "loginError": "パスワードまたはアカウントが間違っています!",
103
+ "errorFa": "2 つのセキュリティを使用しています!",
104
+ "okweb": "ブラウザから確認し、ログインプロセスに進みます...",
105
+ "errorEnv": "ENV ファイルの作成に失敗しました!",
106
+ "env": "ENV ファイルの作成に成功しました!",
107
+ "errorPassRandom": "ランダム パスワードの生成中にエラーが発生しました",
108
+ "appstateDec": "Appstate をデコードする準備ができていません!",
109
+ "appstate": "Appstate の復号に成功しました!",
110
+ "appstateError": "Appstate エラーです! 置き換えてください",
111
+ "oklogin": "ログインプロセスを完了してください!",
112
+ "newVersion": "公開された新しいバージョン: ",
113
+ "autoUpdate": "最新バージョンへの自動更新に進みます!",
114
+ "okUpdate": "バージョンアップ成功!",
115
+ "restart": "再起動しています...",
116
+ "errorUpdate": "エラーが発生しました",
117
+ "checkVersion": "現在使用しているバージョン: ",
118
+ "chucAdmin": "良い一日を管理者に",
119
+ "errorUid": "UID を取得できません。再試行してください!",
120
+ "encAppstate": "AppState の暗号化に成功しました!"
121
+ }
122
+ }
123
+ }
package/logger.js ADDED
@@ -0,0 +1 @@
1
+ const _0x370df6=_0x5e1f;function _0x5e1f(_0x164a29,_0x1f55ce){const _0x21bddb=_0x21bd();return _0x5e1f=function(_0x5e1f38,_0x6aade9){_0x5e1f38=_0x5e1f38-0x130;let _0x274390=_0x21bddb[_0x5e1f38];return _0x274390;},_0x5e1f(_0x164a29,_0x1f55ce);}(function(_0x1147ee,_0x323dca){const _0x3f0baf=_0x5e1f,_0x4ee144=_0x1147ee();while(!![]){try{const _0xf8a7db=-parseInt(_0x3f0baf(0x137))/0x1+-parseInt(_0x3f0baf(0x14e))/0x2*(parseInt(_0x3f0baf(0x13e))/0x3)+parseInt(_0x3f0baf(0x130))/0x4+-parseInt(_0x3f0baf(0x147))/0x5*(-parseInt(_0x3f0baf(0x140))/0x6)+-parseInt(_0x3f0baf(0x138))/0x7*(-parseInt(_0x3f0baf(0x155))/0x8)+-parseInt(_0x3f0baf(0x14b))/0x9+-parseInt(_0x3f0baf(0x151))/0xa*(-parseInt(_0x3f0baf(0x133))/0xb);if(_0xf8a7db===_0x323dca)break;else _0x4ee144['push'](_0x4ee144['shift']());}catch(_0x140433){_0x4ee144['push'](_0x4ee144['shift']());}}}(_0x21bd,0xbbc3f));const chalk=require(_0x370df6(0x144)),Monitor=require(_0x370df6(0x154));function _0x21bd(){const _0x538668=['209400yDRGbk','Vegito','[\x20STOP\x20]\x20❯\x20','ping-monitor','247272cJwugz','bold','log','ObjFcaConfig','3810008oEuPMo','mainColor','#00FF00','33tiKSTb','[\x20ERROR\x20]\x20❯\x20','statusMessage','indexOf','983616nDsgkr','329iPUWNw','[\x20DOWN\x20]\x20❯\x20','\x20>\x20','onLogger','down','#00FFFF','27AyOyqc','website','24GpuNgF','fca','mainName','replace','chalk','env','https://','873725miZhcY','[\x20KOJA-PROJECT\x20]','.repl.co','stop','1917180wIYxUQ','hex','#FF0000','266956xXxWlO','REPL_OWNER','exports'];_0x21bd=function(){return _0x538668;};return _0x21bd();}module[_0x370df6(0x150)]=(_0x3fa8e1,_0x177cde)=>{const _0xe1f138=_0x370df6;console['log'](chalk[_0xe1f138(0x14c)](global[_0xe1f138(0x141)]?.[_0xe1f138(0x158)]?.['mainColor']??_0xe1f138(0x13d))['bold']((global[_0xe1f138(0x141)]?.[_0xe1f138(0x158)]?.[_0xe1f138(0x142)]??_0xe1f138(0x148))+_0xe1f138(0x13a))+_0x3fa8e1);},module[_0x370df6(0x150)][_0x370df6(0x13b)]=(_0x17210c,_0x29339d,_0xdc6609)=>{const _0x918463=_0x370df6;var _0x43d653=_0xdc6609[_0x918463(0x143)]('#','');if(_0xdc6609[_0x918463(0x136)]('#')!==-0x1)console[_0x918463(0x157)](chalk[_0x918463(0x14c)](global[_0x918463(0x141)]?.[_0x918463(0x158)]?.[_0x918463(0x131)]??_0x918463(0x13d))[_0x918463(0x156)]((global[_0x918463(0x141)]?.[_0x918463(0x158)]?.[_0x918463(0x142)]??_0x918463(0x148))+_0x918463(0x13a))+_0x17210c);else!isNaN(_0x43d653)?console[_0x918463(0x157)](chalk['hex'](_0xdc6609)[_0x918463(0x156)]((global[_0x918463(0x141)]?.[_0x918463(0x158)]?.['mainName']??_0x918463(0x148))+_0x918463(0x13a))+_0x17210c):console[_0x918463(0x157)](chalk[_0x918463(0x14c)](global[_0x918463(0x141)]?.[_0x918463(0x158)]?.['mainColor']??_0x918463(0x13d))['bold']((global[_0x918463(0x141)]?.[_0x918463(0x158)]?.['mainName']??_0x918463(0x148))+_0x918463(0x13a))+_0x17210c);};const uptimelink=[_0x370df6(0x146)+process[_0x370df6(0x145)]['REPL_SLUG']+'.'+process[_0x370df6(0x145)][_0x370df6(0x14f)]+_0x370df6(0x149)];for(const now of uptimelink){const monitor=new Monitor({'website':now,'title':_0x370df6(0x152),'interval':0x3,'config':{'intervalUnits':'seconds'}});monitor['on']('up',_0x782ecb=>{const _0x3ae9ac=_0x370df6;console[_0x3ae9ac(0x157)](chalk[_0x3ae9ac(0x156)][_0x3ae9ac(0x14c)](_0x3ae9ac(0x132))('[\x20UP\x20]\x20❯\x20')+chalk[_0x3ae9ac(0x14c)](_0x3ae9ac(0x132))(''+_0x782ecb['website']));}),monitor['on'](_0x370df6(0x13c),_0x16a144=>{const _0x18702e=_0x370df6;console[_0x18702e(0x157)](chalk['bold'][_0x18702e(0x14c)](_0x18702e(0x14d))(_0x18702e(0x139))+chalk['hex'](_0x18702e(0x14d))(_0x16a144[_0x18702e(0x13f)]+'\x20'+_0x16a144[_0x18702e(0x135)]));}),monitor['on'](_0x370df6(0x14a),_0x2cffcb=>{const _0x39d298=_0x370df6;console['log'](chalk[_0x39d298(0x156)][_0x39d298(0x14c)](_0x39d298(0x14d))(_0x39d298(0x153))+chalk['hex'](_0x39d298(0x14d))(''+_0x2cffcb));}),monitor['on']('error',_0x2d6af2=>{const _0x2493a5=_0x370df6;console[_0x2493a5(0x157)](chalk['bold'][_0x2493a5(0x14c)]('#FF0000')(_0x2493a5(0x134))+chalk[_0x2493a5(0x14c)](_0x2493a5(0x14d))(''+_0x2d6af2));});}
package/package.json ADDED
@@ -0,0 +1,122 @@
1
+ {
2
+ "_from": "koja-uptime-fca@latest",
3
+ "_id": "koja-uptime-fca@12.9.6",
4
+ "_inBundle": false,
5
+ "_integrity": "sha512-x5phZ2b7Jbj9nT5vrVrVc9kpX3Lu7UCb++TdxVL+CCxf81BW+oIJZStzFMpITXQXZa2iDEG9Td5kTb9AayGrjg==",
6
+ "_location": "/koja-uptime-fca",
7
+ "_phantomChildren": {
8
+ "ansi": "0.3.1",
9
+ "are-we-there-yet": "1.0.6",
10
+ "asynckit": "0.4.0",
11
+ "bindings": "1.5.0",
12
+ "combined-stream": "1.0.8",
13
+ "fetch-blob": "3.2.0",
14
+ "formdata-polyfill": "4.0.10",
15
+ "gauge": "1.2.7",
16
+ "graceful-fs": "4.2.6",
17
+ "jsonfile": "6.1.0",
18
+ "lru-cache": "6.0.0",
19
+ "mime-types": "2.1.35",
20
+ "prebuild-install": "7.1.0",
21
+ "proxy-from-env": "1.1.0",
22
+ "universalify": "2.0.0"
23
+ },
24
+ "_requested": {
25
+ "type": "tag",
26
+ "registry": true,
27
+ "raw": "koja-uptime-fca@latest",
28
+ "name": "koja-uptime-fca",
29
+ "escapedName": "koja-uptime-fca",
30
+ "rawSpec": "latest",
31
+ "saveSpec": null,
32
+ "fetchSpec": "latest"
33
+ },
34
+ "_requiredBy": [
35
+ "#USER",
36
+ "/"
37
+ ],
38
+ "_resolved": "https://registry.npmjs.org/koja-uptime-fca/-/koja-uptime-fca-12.9.6.tgz",
39
+ "_shasum": "6c9ca3a2974476bcff29849afd18de95b46617e1",
40
+ "_spec": "koja-uptime-fca@latest",
41
+ "_where": "/home/runner/Kyouko",
42
+ "author": {
43
+ "name": "Avery, David, Maude, Benjamin, KanzuWakazaki"
44
+ },
45
+ "bugs": {
46
+ "url": "https://github.com/K0J4/kojab0t/issues"
47
+ },
48
+ "bundleDependencies": false,
49
+ "dependencies": {
50
+ "aes-js": "^3.1.2",
51
+ "axios": "^1.2.1",
52
+ "better-sqlite3": "^8.2.0",
53
+ "bluebird": "^2.11.0",
54
+ "cheerio": "^1.0.0-rc.10",
55
+ "dotenv": "^16.0.3",
56
+ "fs-extra": "^11.1.0",
57
+ "https-proxy-agent": "^4.0.0",
58
+ "mqtt": "^4.2.8",
59
+ "node-fetch": "^3.3.1",
60
+ "npmlog": "^1.2.0",
61
+ "ping-monitor": "^0.7.0",
62
+ "request": "^2.53.0",
63
+ "semver": "",
64
+ "websocket-stream": "^5.5.0"
65
+ },
66
+ "deprecated": false,
67
+ "description": "labyou",
68
+ "devDependencies": {
69
+ "eslint": "latest",
70
+ "mocha": "latest",
71
+ "prettier": "latest"
72
+ },
73
+ "engines": {
74
+ "node": ">=14.x <16.x"
75
+ },
76
+ "eslintConfig": {
77
+ "env": {
78
+ "es6": true,
79
+ "node": true
80
+ },
81
+ "extends": "eslint:recommended",
82
+ "parserOptions": {
83
+ "sourceType": "module"
84
+ },
85
+ "rules": {
86
+ "linebreak-style": [
87
+ "error",
88
+ "unix"
89
+ ],
90
+ "semi": [
91
+ "error",
92
+ "always"
93
+ ],
94
+ "no-unused-vars": [
95
+ 1,
96
+ {
97
+ "argsIgnorePattern": "^_"
98
+ }
99
+ ]
100
+ }
101
+ },
102
+ "homepage": "https://github.com/K0J4/kojab0t#readme",
103
+ "keywords": [
104
+ "uptime fca",
105
+ "koja-uptime-fca",
106
+ "koja",
107
+ "Ali Koja"
108
+ ],
109
+ "license": "MIT",
110
+ "main": "index.js",
111
+ "name": "koja-uptime-fca",
112
+ "repository": {
113
+ "type": "git",
114
+ "url": "git+https://github.com/K0J4/kojab0t.git"
115
+ },
116
+ "scripts": {
117
+ "lint": "eslint **.js",
118
+ "prettier": "prettier utils.js src/* --write",
119
+ "test": "mocha"
120
+ },
121
+ "version": "12.9.6"
122
+ }
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+
3
+ var utils = require("../utils");
4
+ var log = require("npmlog");
5
+
6
+ module.exports = function (defaultFuncs, api, ctx) {
7
+ return function ReportV1(args,callback) {
8
+ if (!args.Link && !args.RealName && !args.Content && !args.Gmail) throw new Error("Link,RealName,Content,Gmail are required");
9
+ if (!args.Link) throw new Error("Điền args.Link vào, api.Premium.ReportV1(Link,RealName,Content,Gmail,Time,callback)");
10
+ if (!args.RealName) throw new Error("Điền RealName vào, api.Premium.ReportV1(Link,RealName,Content,Time,Gmail,callback)");
11
+ if (!args.Gmail) throw new Error("Điền Gmail vào, api.Premium.ReportV1(Link,RealName,Content,Gmail,Time,callback)");
12
+ var resolveFunc = function () { };
13
+ var rejectFunc = function () { };
14
+ var returnPromise = new Promise(function (resolve, reject) {
15
+ resolveFunc = resolve;
16
+ rejectFunc = reject;
17
+ });
18
+
19
+ if (!callback) {
20
+ callback = function (err, data) {
21
+ if (err) return rejectFunc(err);
22
+ resolveFunc(data);
23
+ };
24
+ }
25
+ let RealForm;
26
+ utils.get('https://www.facebook.com/help/contact/209046679279097?locale2=en_US', ctx.jar, null, ctx.globalOptions)
27
+ .then(function(data) {
28
+ RealForm = {
29
+ crt_url: args.Link,
30
+ crt_name: args.RealName,
31
+ cf_age: "9 years",
32
+ Field255260417881843: args.Content ? utils.getType(args.Content)=="String"? args.Content : "This timeline is impersonating me and my friends. It harass people on Facebook. I think this is a time line of baby, parents are not allowed. Please let Facebook account deactivated for Facebook is increasingly safer. Thank you!" : "This timeline is impersonating me and my friends. It harass people on Facebook. I think this is a time line of baby, parents are not allowed. Please let Facebook account deactivated for Facebook is increasingly safer. Thank you!",
33
+ Field166040066844792: args.Gmail,
34
+ source: '',
35
+ support_form_id: 209046679279097,
36
+ support_form_hidden_fields: JSON.stringify({}),
37
+ support_form_fact_false_fields: [],
38
+ lsd: utils.getFrom(data.body, "[\"LSD\",[],{\"token\":\"", "\"}")
39
+ };
40
+ }).then(function() {
41
+ defaultFuncs.postFormData('https://www.facebook.com/ajax/help/contact/submit/page', ctx.jar, RealForm, {})
42
+ .then(utils.parseAndCheckLogin(ctx, defaultFuncs))
43
+ .then(async function(dt) {
44
+ if (dt.__ar == 1) {
45
+ callback(null, "Thành Công");
46
+ }
47
+ else {
48
+ callback(null, "Thất Bại");
49
+ }
50
+ });
51
+ })
52
+ return returnPromise;
53
+ }
54
+ };
55
+ //HORIZON
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+
3
+ const utils = require("../utils");
4
+
5
+ module.exports = function (defaultFuncs, api, ctx) {
6
+ return function addExternalModule(moduleObj) {
7
+ if (utils.getType(moduleObj) == "Object") {
8
+ for (let apiName in moduleObj) {
9
+ if (utils.getType(moduleObj[apiName]) == "Function") api[apiName] = moduleObj[apiName](defaultFuncs, api, ctx);
10
+ else throw new Error(`Item "${apiName}" in moduleObj must be a function, not ${utils.getType(moduleObj[apiName])}!`);
11
+
12
+ }
13
+ }
14
+ else throw new Error(`moduleObj must be an object, not ${utils.getType(moduleObj)}!`);
15
+ };
16
+ };
@@ -0,0 +1,78 @@
1
+ "use strict";
2
+
3
+ var utils = require("../utils");
4
+ var log = require("npmlog");
5
+
6
+ module.exports = function (defaultFuncs, api, ctx) {
7
+ return function addUserToGroup(userID, threadID, callback) {
8
+ var resolveFunc = function () { };
9
+ var rejectFunc = function () { };
10
+ var returnPromise = new Promise(function (resolve, reject) {
11
+ resolveFunc = resolve;
12
+ rejectFunc = reject;
13
+ });
14
+
15
+ if (!callback && (utils.getType(threadID) === "Function" || utils.getType(threadID) === "AsyncFunction")) throw { error: "please pass a threadID as a second argument." };
16
+
17
+ if (!callback) {
18
+ callback = function (err) {
19
+ if (err) return rejectFunc(err);
20
+ resolveFunc();
21
+ };
22
+ }
23
+
24
+ if (utils.getType(threadID) !== "Number" && utils.getType(threadID) !== "String") throw { error: "ThreadID should be of type Number or String and not " + utils.getType(threadID) + "." };
25
+
26
+ if (utils.getType(userID) !== "Array") userID = [userID];
27
+
28
+ var messageAndOTID = utils.generateOfflineThreadingID();
29
+ var form = {
30
+ client: "mercury",
31
+ action_type: "ma-type:log-message",
32
+ author: "fbid:" + ctx.userID,
33
+ thread_id: "",
34
+ timestamp: Date.now(),
35
+ timestamp_absolute: "Today",
36
+ timestamp_relative: utils.generateTimestampRelative(),
37
+ timestamp_time_passed: "0",
38
+ is_unread: false,
39
+ is_cleared: false,
40
+ is_forward: false,
41
+ is_filtered_content: false,
42
+ is_filtered_content_bh: false,
43
+ is_filtered_content_account: false,
44
+ is_spoof_warning: false,
45
+ source: "source:chat:web",
46
+ "source_tags[0]": "source:chat",
47
+ log_message_type: "log:subscribe",
48
+ status: "0",
49
+ offline_threading_id: messageAndOTID,
50
+ message_id: messageAndOTID,
51
+ threading_id: utils.generateThreadingID(ctx.clientID),
52
+ manual_retry_cnt: "0",
53
+ thread_fbid: threadID
54
+ };
55
+
56
+ for (var i = 0; i < userID.length; i++) {
57
+ if (utils.getType(userID[i]) !== "Number" && utils.getType(userID[i]) !== "String") throw { error: "Elements of userID should be of type Number or String and not " + utils.getType(userID[i]) + "." };
58
+ form["log_message_data[added_participants][" + i + "]"] = "fbid:" + userID[i];
59
+ }
60
+
61
+ defaultFuncs
62
+ .post("https://www.facebook.com/messaging/send/", ctx.jar, form)
63
+ .then(utils.parseAndCheckLogin(ctx, defaultFuncs))
64
+ .then(function (resData) {
65
+ if (!resData) throw { error: "Add to group failed." };
66
+ if (resData.error) throw resData;
67
+
68
+
69
+ return callback();
70
+ })
71
+ .catch(function (err) {
72
+ log.error("addUserToGroup", err);
73
+ return callback(err);
74
+ });
75
+
76
+ return returnPromise;
77
+ };
78
+ };
@@ -0,0 +1,79 @@
1
+ "use strict";
2
+
3
+ const utils = require("../utils");
4
+ const log = require("npmlog");
5
+
6
+ module.exports = function(defaultFuncs, api, ctx) {
7
+ return function changeAdminStatus(threadID, adminIDs, adminStatus, callback) {
8
+ if (utils.getType(threadID) !== "String") {
9
+ throw {error: "changeAdminStatus: threadID must be a string"};
10
+ }
11
+
12
+ if (utils.getType(adminIDs) === "String") {
13
+ adminIDs = [adminIDs];
14
+ }
15
+
16
+ if (utils.getType(adminIDs) !== "Array") {
17
+ throw {error: "changeAdminStatus: adminIDs must be an array or string"};
18
+ }
19
+
20
+ if (utils.getType(adminStatus) !== "Boolean") {
21
+ throw {error: "changeAdminStatus: adminStatus must be a string"};
22
+ }
23
+
24
+ var resolveFunc = function(){};
25
+ var rejectFunc = function(){};
26
+ var returnPromise = new Promise(function (resolve, reject) {
27
+ resolveFunc = resolve;
28
+ rejectFunc = reject;
29
+ });
30
+
31
+ if (!callback) {
32
+ callback = function (err) {
33
+ if (err) {
34
+ return rejectFunc(err);
35
+ }
36
+ resolveFunc();
37
+ };
38
+ }
39
+
40
+ if (utils.getType(callback) !== "Function" && utils.getType(callback) !== "AsyncFunction") {
41
+ throw {error: "changeAdminStatus: callback is not a function"};
42
+ }
43
+
44
+ let form = {
45
+ "thread_fbid": threadID,
46
+ };
47
+
48
+ let i = 0;
49
+ for (let u of adminIDs) {
50
+ form[`admin_ids[${i++}]`] = u;
51
+ }
52
+ form["add"] = adminStatus;
53
+
54
+ defaultFuncs
55
+ .post("https://www.facebook.com/messaging/save_admins/?dpr=1", ctx.jar, form)
56
+ .then(utils.parseAndCheckLogin(ctx, defaultFuncs))
57
+ .then(function(resData) {
58
+ if (resData.error) {
59
+ switch (resData.error) {
60
+ case 1976004:
61
+ throw { error: "Cannot alter admin status: you are not an admin.", rawResponse: resData };
62
+ case 1357031:
63
+ throw { error: "Cannot alter admin status: this thread is not a group chat.", rawResponse: resData };
64
+ default:
65
+ throw { error: "Cannot alter admin status: unknown error.", rawResponse: resData };
66
+ }
67
+ }
68
+
69
+ callback();
70
+ })
71
+ .catch(function(err) {
72
+ log.error("changeAdminStatus", err);
73
+ return callback(err);
74
+ });
75
+
76
+ return returnPromise;
77
+ };
78
+ };
79
+
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+
3
+ var utils = require("../utils");
4
+ var log = require("npmlog");
5
+
6
+ module.exports = function (defaultFuncs, api, ctx) {
7
+ return function changeArchivedStatus(threadOrThreads, archive, callback) {
8
+ var resolveFunc = function () { };
9
+ var rejectFunc = function () { };
10
+ var returnPromise = new Promise(function (resolve, reject) {
11
+ resolveFunc = resolve;
12
+ rejectFunc = reject;
13
+ });
14
+
15
+ if (!callback) {
16
+ callback = function (err) {
17
+ if (err) return rejectFunc(err);
18
+ resolveFunc();
19
+ };
20
+ }
21
+
22
+ var form = {};
23
+
24
+ if (utils.getType(threadOrThreads) === "Array") for (var i = 0; i < threadOrThreads.length; i++) form["ids[" + threadOrThreads[i] + "]"] = archive;
25
+ else form["ids[" + threadOrThreads + "]"] = archive;
26
+
27
+ defaultFuncs
28
+ .post("https://www.facebook.com/ajax/mercury/change_archived_status.php", ctx.jar, form)
29
+ .then(utils.parseAndCheckLogin(ctx, defaultFuncs))
30
+ .then(function (resData) {
31
+ if (resData.error) throw resData;
32
+ return callback();
33
+ })
34
+ .catch(function (err) {
35
+ log.error("changeArchivedStatus", err);
36
+ return callback(err);
37
+ });
38
+
39
+ return returnPromise;
40
+ };
41
+ };
@@ -0,0 +1,86 @@
1
+ "use strict";
2
+
3
+ var utils = require("../utils");
4
+ var log = require("npmlog");
5
+ /**
6
+ * It posts an image to a Facebook profile
7
+ * @param Api - The API object
8
+ * @param BotID - The ID of the bot you want to post the image to.
9
+ * @param form - The form data that you want to send.
10
+ * @returns The JSON.parse(Data.split("for (;;);")[1]); is returning the following:
11
+ * {"__ar":1,"payload":null,"jsmods":{"require":[["ImageUploader","uploadPhoto",[{"__m":"__elem_0"},{"__m":"__elem_1"},{"__m":"__elem_2"},{"__m":"__
12
+ */
13
+ async function postImage(Api,BotID,form) {
14
+ var Data = await Api.httpPostFormData(`https://www.facebook.com/profile/picture/upload/?profile_id=${BotID}&photo_source=57&av=${BotID}`, form);
15
+ return JSON.parse(Data.split("for (;;);")[1]);
16
+ }
17
+
18
+ module.exports = function(defaultFuncs, api, ctx) {
19
+ /* Changing the profile picture of the bot. */
20
+ return function changeAvt(link, caption, callback) {
21
+ var resolveFunc = function() {};
22
+ var rejectFunc = function() {};
23
+ var returnPromise = new Promise(function(resolve, reject) {
24
+ resolveFunc = resolve;
25
+ rejectFunc = reject;
26
+ });
27
+
28
+ if (!callback) {
29
+ callback = function(err, data) {
30
+ if (err) return rejectFunc(err);
31
+ resolveFunc(data);
32
+ };
33
+ }
34
+ try {
35
+ var Fetch = require('axios')
36
+ Fetch.get(link, { responseType: "stream" }).then(data => {
37
+ postImage(api, ctx.userID, { file: data.data }).then(data => {
38
+ if (data.error) throw new Error({ error: data.error, des: data.error.errorDescription });
39
+ var form = {
40
+ av: ctx.userID,
41
+ fb_api_req_friendly_name: "ProfileCometProfilePictureSetMutation",
42
+ fb_api_caller_class: "RelayModern",
43
+ doc_id: "5066134240065849",
44
+ variables: JSON.stringify({
45
+ input: {
46
+ caption: (caption || ""),
47
+ existing_photo_id: data.payload.fbid,
48
+ expiration_time: null,
49
+ profile_id: ctx.userID,
50
+ profile_pic_method: "EXISTING",
51
+ profile_pic_source: "TIMELINE",
52
+ scaled_crop_rect: {
53
+ height: 1,
54
+ width: 1,
55
+ x: 0,
56
+ y: 0
57
+ },
58
+ skip_cropping: true,
59
+ actor_id: ctx.userID,
60
+ client_mutation_id: Math.round(Math.random() * 19).toString()
61
+ },
62
+ isPage: false,
63
+ isProfile: true,
64
+ scale: 3,
65
+ })
66
+ };
67
+ defaultFuncs
68
+ .post("https://www.facebook.com/api/graphql/", ctx.jar, form)
69
+ .then(utils.parseAndCheckLogin(ctx, defaultFuncs))
70
+ .then(function(resData) {
71
+ if (resData.error) throw resData;
72
+ else return callback(null,true)
73
+ })
74
+ .catch(function(err) {
75
+ return callback(err);
76
+ });
77
+ })
78
+ })
79
+ }
80
+ catch (e) {
81
+ throw e;
82
+ }
83
+ return returnPromise;
84
+ };
85
+ };
86
+ //HORIZON