@neoxr/wb 1.45.65

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.
@@ -0,0 +1,31 @@
1
+ require('dotenv').config()
2
+ const { Baileys, Scandir, InvCloud } = require('./baileys')
3
+ const Converter = new (require('../system/converter'))
4
+ const Function = new (require('../system/functions'))
5
+ const Scraper = new (require('../system/scraper'))
6
+ const MongoDB = /mongo/.test(process.env.DATABASE_URL) && process.env.DATABASE_URL ? new (require('../system/mongo')) : false
7
+ const PostgreSQL = /postgres/.test(process.env.DATABASE_URL) && process.env.DATABASE_URL ? new (require('../system/pg')) : false
8
+ const Dataset = process.env.DATABASE_URL ? new (require('../system/multidb')) : false
9
+ const Logs = require('../system/logs')
10
+ const NeoxrCommands = new (require('../system/neoxr'))
11
+ const NeoxrApi = require('@neoxr/api')
12
+ const Queue = require('../system/queue')
13
+ const Cooldown = require('../system/cooldown')
14
+ const Spam = require('../system/spamDetector')
15
+ module.exports = class Component {
16
+ Baileys = Baileys
17
+ Converter = Converter
18
+ Function = Function
19
+ Scraper = Scraper
20
+ MongoDB = MongoDB
21
+ PostgreSQL = PostgreSQL
22
+ Dataset = Dataset
23
+ Scandir = Scandir
24
+ InvCloud = InvCloud
25
+ Logs = Logs
26
+ NeoxrCommands = NeoxrCommands
27
+ NeoxrApi = NeoxrApi
28
+ Queue = Queue
29
+ Cooldown = Cooldown
30
+ Spam = Spam
31
+ }
package/index.js ADDED
@@ -0,0 +1,31 @@
1
+ require('dotenv').config()
2
+ const { Baileys, Scandir, InvCloud } = require('./system/baileys')
3
+ const Converter = new (require('./system/converter'))
4
+ const Function = new (require('./system/functions'))
5
+ const Scraper = new (require('./system/scraper'))
6
+ const MongoDB = /mongo/.test(process.env.DATABASE_URL) && process.env.DATABASE_URL ? new (require('./system/mongo')) : false
7
+ const PostgreSQL = /postgres/.test(process.env.DATABASE_URL) && process.env.DATABASE_URL ? new (require('./system/pg')) : false
8
+ const Dataset = process.env.DATABASE_URL ? new (require('./system/multidb')) : false
9
+ const Logs = require('./system/logs')
10
+ const NeoxrCommands = new (require('./system/neoxr'))
11
+ const NeoxrApi = require('@neoxr/api')
12
+ const Cooldown = require('./system/cooldown')
13
+ const Queue = require('./system/queue')
14
+ const Spam = require('./system/spamDetector')
15
+ module.exports = class Component {
16
+ Baileys = Baileys
17
+ Converter = Converter
18
+ Function = Function
19
+ Scraper = Scraper
20
+ MongoDB = MongoDB
21
+ PostgreSQL = PostgreSQL
22
+ Dataset = Dataset
23
+ Scandir = Scandir
24
+ InvCloud = InvCloud
25
+ Logs = Logs
26
+ NeoxrCommands = NeoxrCommands
27
+ NeoxrApi = NeoxrApi
28
+ Cooldown = Cooldown
29
+ Queue = Queue
30
+ Spam = Spam
31
+ }
package/package.json ADDED
@@ -0,0 +1,67 @@
1
+ {
2
+ "name":"@neoxr/wb",
3
+ "version":"1.45.65",
4
+ "description":"Simplicity WhatsApp Bot (Baileys)",
5
+ "main":"index.js",
6
+ "scripts":{
7
+ "test":"echo \"Error: no test specified\" && exit 1"
8
+ },
9
+ "repository":{
10
+ "type":"git",
11
+ "url":"git+https://github.com/neoxr/neoxr-bot.git"
12
+ },
13
+ "keywords":[
14
+ "whattapp-bot",
15
+ "whatsapp-api",
16
+ "bot",
17
+ "whatsapp",
18
+ "wabot"
19
+ ],
20
+ "author":"Wildan Izzudin",
21
+ "license":"ISC",
22
+ "bugs":{
23
+ "url":"https://github.com/neoxr/neoxr-bot/issues"
24
+ },
25
+ "homepage":"https://github.com/neoxr/neoxr-bot#readme",
26
+ "dependencies":{
27
+ "@neoxr/api": "^1.5.3",
28
+ "@neoxr/helper": "^1.2.1",
29
+ "@neoxr/ytdl-core":"^4.11.5",
30
+ "awesome-phonenumber":"~2.59.0",
31
+ "axios":"~0.24.0",
32
+ "chalk":"4.1.0",
33
+ "cheerio":"~1.0.0-rc.5",
34
+ "child_process":"~1.0.2",
35
+ "cloudscraper": "4.6.0",
36
+ "colors":"1.4.0",
37
+ "crypto":"1.0.1",
38
+ "dotenv": "^16.0.1",
39
+ "fs":"0.0.1-security",
40
+ "file-type":"~16.5.2",
41
+ "fluent-ffmpeg":"npm:@neoxr/fluent-ffmpeg",
42
+ "form-data":"~4.0.0",
43
+ "html-entities":"~2.3.2",
44
+ "jimp":"^0.16.1",
45
+ "mime-types":"~2.1.32",
46
+ "miniget": "^4.2.3",
47
+ "mongodb":"npm:@neoxr/mongodb",
48
+ "mongoose":"5.10.8",
49
+ "moment-timezone":"~0.5.34",
50
+ "node-cache":"^5.1.2",
51
+ "node-fetch":"2.6.1",
52
+ "node-id3":"^0.2.3",
53
+ "node-webpmux":"^3.1.0",
54
+ "os":"^0.1.2",
55
+ "path":"~0.12.7",
56
+ "pg":"8.7.3",
57
+ "qrcode-terminal":"^0.12.0",
58
+ "request": "^2.88.2",
59
+ "rootpath":"^0.1.2",
60
+ "spinnies": "0.5.1",
61
+ "stream": "^0.0.2",
62
+ "syntax-error":"~1.4.0",
63
+ "translate-google-api": "1.0.4",
64
+ "util":"~0.12.4",
65
+ "yt-search": "^2.10.3"
66
+ }
67
+ }
@@ -0,0 +1 @@
1
+ var _0x20944f=_0x4b57;function _0x5701(){var _0x27802d=['502078ViDCrR','fromCharCode','4418505gWCJrW','search','split','replace','\x5cw+','104038nJafOu','2FLJxkS','_0x95dceb|_0xa32891|_0x494ee9|function|return|x20|_0x5a04a6|const||parseInt|||||||||0x2|_0x5cab0c|gray|_0x5829|_0x1e00f1|_0x47cbe8|_0xa3badc|_0x16f6ca|0x15|||0x2f|Func|0x12|0x2c|0x36|0x27|0x1f1|0x212|_0x3da6c1|0x1|0x1a|_0x5ec9|green|moment||_0x2a511d|0x1ec|0x6|0x22d|0x46|0x3f|0x43|0x1ea|0x21|0x3|0x7|0x13|0x232|if|else|redBright|require|wYmhz|0xb|0x18|0x206|0x2d|0x5a|0x47|0x213|0x236|0x4b|0x70|0x17|_0x2617e7|0x210|0x209|Buffer|0x10|0x221|0x71|0x1d|0xe|0x1e7|0x1f8|0x44|0x2b|0x21a|_0x463875|_0x418b89|x0a|try|0x255|0x5|0x240|catch|yellow|blueBright|fs|text|HODjF|jPBkQ|xESEj|BwLYv|bold|ztZqx|0x1f4|0x38|0x205|0x33|0x32|0x1f|0x31|0x52|0x30|0x73|0x6b|0x4|0x211|0x238|0x1b|0x1f5|0x217|0x219|0x24|0x1f2|_0x5eaf7f|_0x11a420|0x202|0x222|_0x296873|0x1f9|_0x3f838f|0x29|0x34|0x215|0x218|0x1fe|0x58|0x53|0x20f|_0x4f5e1f|_0x127d5f|0x3d|0x1fd|_0x4c9282|0x5b|var|0x57|0x56|0x60|console|0x1fb|0x224|_0x3bce73|0x289|0x24e|0x261|0x235|0x68|push|shift|0x177|0x1b0|_0xf91d69|includes|groupsFetc|OWwUi|KPrgo|bgYellow|isSpam|chat|LEniE|split|xQIdE|UiTBj|mtype|ZeHxZ|bIDDp|sender|eMmSG|ENKUP|MfeBV|dXQLF|utf|WJKjt|muPpQ|BBGWm|GXwno|YRAoJ|yIMAQ|format|from|x20MSG|command|UIPfF|0x1c0|id|0x1b2|_0x57ae72|_0x3db6eb|async|0x3c6|0x1f6|0x258|0x227|0x231|0x204|0x16|EOXYI|0x11|0x9|0x22c|0x239|0x49|0x45|0x40|0x22|0x4a|aUnxP|0x22a|0x25a|0x234|0x246|0xa|0x20e|0x20b|0x22f|0xc|0x21e|Object|0x78|0x1e2|0x1db|0x22e|0x19|0x233|0x1ed|0x1e4|0x3e|0x6c|0x5d|0x66|0x201|0x225|0x23|0x37|0x208|0x5f|0xf|0x1c|0x220|0x88|_0x123fa1|_0x352ba0|0x14|await|_0x332d86|0x54|0x20c|0x3c|0x253|0x1e8|0x1c5|in|0x7b|0x23c|0x237|0x1f0|_0x5b1f58|0x3c2|0x370|while|0x4c2|0x4c5|0x4fd|0x4d5|0xebb|0xadc|0x3de|0x46f|0x490|0x479|0x48b|0x102f|0x119|0x1147|0x498|0x46e|0x4be|0x499|0x151|0x2036|0x1c40|0x4a0|0x47b|0x4a7|0x49c|0x25d7|0xf7f|0x6d5|0x480|0x47d|0x4b4|0x487|0x157|0x25|0xb8|0x186|0x2ba|0x2a2|0x29c|0x105|0x251c|0x527|0x26a|0x270|0x25b|0x257|0x2385|0x2f3f|0x26b|0x24c|0x981|0xd8c|0x137|0xd9|0x1273|0x85|0x273|0x278|0x276|0x24f|0x12d5|0x1056|0x2a5|0x2a7|0x2c2|0x2bb|0xdf|0xb7a|break|_0x55bd1e|0xda878|0xb48b2|0xeddbb|0xc4|cyanBright|0x16b|0x196|0x3e1|0x3be|0x3fb|0x3d1|0x1a0|0x1b7|0x1a3|0x1d0|102129xdtxVM|dependenci|messageTim|toString|find|DD|MM|YY|x20H|endsWith|String|mm|ss|package|setDefault|235YHUsIb|V2lsZGFuIE|constructo|35792BUydnJ|493295QLrGMk|parse|pating|readFileSy|msg|YXV0aG9y|chalk|formatSize|replace|No|x20Name|129DjBDMA|entries|base64|3424360pTwSaU|bgRed|json|color|locale|pushName|x20CMD|exports|Self|startsWith|54942KdLiiV|bgGreen|log|all|test|ezone|x20Reloaded|commands|24980SpOdQz|x20SPM|fromMe|groupFetch|x20Timed|Out|40SCMjoj|1331260DhBpkq|fileLength|env|tim|values|4149DjIaOw|eHIvd2I|0x2d5|tz|0x1ce|process|0x3e0|0x3f0|0x3c3|0x3d3|TZ|0x3b4|0x3a5|0x392|0x3cb|new|0x1b3|0x19d|0x19e|0x14ee|0x138|0x12b|let|module|0x1a6|0x1a8|0x19a|0x1dd|0x226|0x25f|0x3b|0x1e|0x50|0x59|0x5e|0x61|0x399|0xca|JSON|nc|0x51|0x214|0x20|0x203|l6enVkaW4|0x1ee|0x21c|0x1d7|es|some|0x21b|0x229|0x228|0x1c9|0x21d|0x252|0x1c8|estamp|0x1e0|0x1d4|0x55|show|0x6e|0x1ff|0x3a|0x230|0x81|0x1cc|0x1f7|0x21f|0x7d|0x1e6|document|audio|sticker|image|video|0x28|0x39|0x265|0x259|0x1da|0B|name|0x1df|0x1d6|0x25d|_|isGroup|0x1d9|0x42|0x69|0x67|subject|0xd|AllPartici|0x244|slice|0x850|0x171|map|0x24e9|0x5db|0x7a|0x23e|0x1de|0x1fc0|0x1f9e|0x223|0x1c3|0x1b4|0x1bc|0x62|0x97|0x7dc|0x143f|0x207|0x4c|0x8|0x5c|0x17b2|0xa0a|0x216|0x23f|0x241|0x1fc|0x22b|0x3f3|0x15ed|0x245|0x1e9|0x1cb|0x2e','constructor','2646470LuPPsJ','184koWoLP','(3(e,f){3\x20p(a,b,c,d){4\x20l(d-4l,c)}3\x20m(a,b,c,d){4\x20l(a-\x20-4m,c)}7\x20B=e();4n(!![]){1s{7\x202t=-9(p(4o,4p,4q,4r))/(4s+-4t+-4u)+-9(p(4v,4w,4x,4y))/(-i*-4z+i*4A+4B*-i)*(9(p(4C,4D,4E,4F))/(-R*4G+4H+-4I))+9(p(4J,4K,4L,4M))/(4N+-i*4O+-4P)+9(p(4Q,4R,4S,4T))/(-q*-4U+-4V*4W+-4X)*(9(m(-2u,-4Y,-4Z,-50))/(C*-51+52+S*-53))+-9(m(-54,-55,-1t,-56))/(-57*1u+-58+59)*(9(m(-5a,-5b,-1v,-2v))/(-5c+-5d+-5e*-T))+9(m(-2w,-1t,-U,-2x))/(S*-5f+-5g*C+t*5h)*(9(m(-5i,-5j,-5k,-5l))/(2u+-5m+5n))+9(m(-5o,-5p,-5q,-5r))/(-C*5s+-D*2y+5t);V(2t===f)5u;W\x20B[\x272z\x27](B[\x272A\x27]())}1w(5v){B[\x272z\x27](B[\x272A\x27]())}}}(E,5w+5x+C*-5y));3\x20n(a,b,c,d){4\x20l(b-5z,a)}7{1x,k,F,1y,5A,X}=Y(n(5B,5C,2B,2C)),1z=Y(\x271z\x27),G=Y(I(5D,5E,5F,5G)+n(5H,5I,5J,5K));3\x20E(){7\x202D=[\x275L\x27,\x275M\x27,\x275N\x27,\x275O\x27,\x272E\x27,\x272F\x27,\x272G\x27,\x272H\x27,\x272I\x27,\x275P\x27,\x275Q/5R/5S\x5c5T\x27,\x272J\x27,\x272K\x27,\x275U\x27,\x275V\x27,\x27H:5W:5X\x27,\x271A\x27,\x272L\x27,\x27./5Y.\x27,\x272M\x27,\x272N\x27,\x275Z\x27,\x2760\x27,\x272O\x27,\x2761\x27,\x2762\x27,\x2763\x27,\x272P\x27,\x2764\x27,\x2765\x27,\x2766\x27,\x2767\x27,\x2768\x27,\x272Q\x27,\x2769\x27,\x276a\x27,\x276b\x27,\x271B\x27,\x276c\x27,\x276d\x5c6e\x27,\x276f\x27,\x276g\x27,\x276h\x27,\x276i\x27,\x276j\x27,\x276k\x27,\x271C\x27,\x276l\x27,\x276m\x27,\x276n\x27,\x271D\x27,\x27[\x5c6o\x5c5]\x27,\x272R\x27,\x276p\x27,\x276q\x27,\x276r\x27,\x276s\x27,\x276t\x27,\x271E\x27,\x272S\x27,\x276u\x27,\x27F\x27,\x272T\x27,\x27./3\x27,\x276v\x27,\x271F\x27,\x276w\x27,\x272U\x27,\x276x\x27,\x272V\x27,\x27\x5c6y\x5c5\x27,\x272W\x27,\x272X-8\x27,\x276z\x27,\x272Y\x27,\x272Z\x27,\x2730\x27,\x2731\x27,\x276A\x27,\x271G\x27,\x27[\x5c6B\x5c5]\x27,\x276C\x27,\x276D\x27,\x2732\x27,\x2733\x27,\x27\x5c6E-6F\x27,\x276G\x27,\x276H\x27,\x27Z\x27,\x2734\x27,\x276I\x27,\x2735\x27,\x276J\x27,\x27G-6K\x27,\x276L\x27,\x27[\x5c36\x5c5]\x27,\x276M\x27,\x2737\x27,\x276N=\x27,\x2738\x27];E=3(){4\x202D};4\x20E()}3\x20I(a,b,c,d){4\x20l(a-6O,d)}G[\x276P\x27][n(39,J,6Q,1H)](6R[I(6S,6T,6U,6V)][\x276W\x27])[I(6X,6Y,6Z,70)](\x273a\x27);7\x20u=71(Y(n(72,3b,73,74)+\x27s\x27))();3\x20l(c,d){7\x203c=E();4\x20l=3(a,b){a=a-(75+K*-76+10*-77);78\x203d=3c[a];4\x203d},l(c,d)}79[n(7a,7b,7c,2B)]=3e(o,6,j)=>{3\x201(a,b,c,d){4\x20n(d,a-\x20-3f,c-11,d-1I)}7\x202={\x272R\x27:1(-7d,-1J,-12,-3g)+1(-7e,-1H,-3h,-3i),\x272V\x27:1(-3j,-L,-3k,-7f),\x271D\x27:0(q,3l,-10,13),\x271E\x27:0(1K,t,14,15),\x273m\x27:0(v,3n,-K,3o),\x2732\x27:3(a,b){4\x20a===b},\x2733\x27:1(-16,-17,-3p,-3q),\x272Z\x27:0(7g,T,1L,3r),\x271G\x27:0(7h,3s,7i,1M),\x272U\x27:\x27[\x5c36\x5c5]\x27,\x27Z\x27:3(a,b){4\x20a+b},\x272W\x27:3(a){4\x20a()},\x272L\x27:0(1N,D,1O,t),\x272Y\x27:0(3t,3s,18,3u)+\x27\x5c5\x27,\x272O\x27:3(a,b){4\x20a(b)},\x272Q\x27:0(7j,1P,19,3v)+0(7k,7l,1Q,1N),\x272N\x27:\x27F\x27,\x271C\x27:0(M,q,11,1R),\x271B\x27:3(a,b){4\x20a+b},\x272H\x27:3(a,b){4\x20a+b},\x273w\x27:3(a,b){4\x20a+b},\x2731\x27:3(a,b){4\x20a+b},\x272T\x27:3(a,b){4\x20a*b},\x2738\x27:3(a,b){4\x20a+b},\x272G\x27:3(a,b){4\x20a+b},\x2730\x27:3(a,b){4\x20a(b)}};3\x200(a,b,c,d){4\x20I(a-\x20-7m,b-7n,c-1a,d)}7\x201b=7o[1(-17,-3x,-3y,-1c)](1z[1(-3z,-1t,-3A,-1d)+\x277p\x27](2[0(1M,C,3B,1S)],0(1K,v,1L,N)));V(1b[1e[0(M,t,14,O)](2[1(-3C,-3p,-1T,-3g)],2[\x271D\x27])[0(1O,w,7q,19)](1(-3D,-7r,-1U,-U))]&&1b[1e[0(M,1Q,x,1R)](2[0(1P,1f,1V,10)],2[1(-1g,-1W,-1g,-1X)])[0(1O,7s,1I,2y)](2[1(-1Y,-3E,-7t,-1T)])]===1e[0(M,18,1h,y)](0(R,-1Z,y,3F)+\x277u=\x27,2[0(1i,1u,t,-T)])[1(-J,-1J,-z,-3G)](2[\x271E\x27])&&!3H[0(3r,3I,y,13)](1b[1(-7v,-7w,-7x,-20)+\x277y\x27])[\x277z\x27](21=>21[0(3u,-1u,1j,-3B)](\x27@\x27)&&21[1(-3J,-1d,-2C,-3K)](1e[\x2735\x27](1(-z,-P,-7A,-1k),1(-7B,-7C,-3q,-3L))[1(-J,-J,-7D,-7E)](\x272X-8\x27))))1s{7\x2022=6[1(-23,-1W,-1l,-z)]?0(Q,3M,v,-3o):6[1(-24,-1v,-3N,-7F)]||2[\x273m\x27],25=6[1(-3O,-P,-23,-7G)+\x277H\x27];o[\x272F\x27+\x27h\x27]=o[1(-P,-A,-26,-12)+\x27h\x27]?o[1(-P,-7I,-3P,-7J)+\x27h\x27]:[];7\x2027=2[0(3Q,3R,v,7K)](j[\x277L\x27],2[0(N,N,1j,3S)])?j[0(14,28,18,7M)]?X[1(-A,-1g,-24,-3P)](2[0(x,3T,1K,Q)]):j[0(29,3M,1a,1m)][\x272E\x27](j[\x2737\x27])?1x[1(-A,-2a,-3U,-7N)](2[0(7O,Q,1i,3R)]):1y[1(-A,-17,-7P,-2b)](2[1(-1c,-2c,-3V,-1v)]):j[0(29,3W,2d,w)][0(2e,1n,7Q,1n)](j[1(-20,-7R,-1o,-7S)])?j[\x272J\x27]?X[0(w,3X,v,1m)](2[1(-3Y,-12,-7T,-2f)]):1x[\x271F\x27](2[\x271G\x27]):j[0(14,7U,N,x)]?X[1(-A,-20,-1l,-3G)](2[0(x,10,2d,1n)]):1y[\x271F\x27](1(-1H,-z,-16,-7V)),2g=/(7W|7X|7Y|7Z|80)/[0(13,x,i,3Z)](6[0(K,T,3l,-81)])?u[0(40,K,82,-41)](6[1(-3N,-83,-84,-3y)][1(-26,-2a,-1d,-85)]):\x2786\x27,2h=1p=>1p[\x271A\x27]&&1p[\x271A\x27][0(1S,1N,y,1L)+\x27r\x27][\x2787\x27]===0(3S,3Q,2i,13)?1p[1(-88,-2j,-89,-3b)][1(-L,-3h,-2c,-23)](/\x5c\x5c\x5c`/g,\x27\x27)[1(-L,-1c,-8a,-42)](/\x5c*/g,\x27\x27)[1(-L,-2b,-3U,-1o)](/\x5c8b/g,\x27\x27):\x27—\x27;V(6[\x278c\x27]){1s{7\x202k=o[1(-P,-39,-8d,-1T)+\x27h\x27][0(2d,43,29,8e)](44=>44[\x273a\x27]===6[0(2l,43,8f,3I)]);V(2k)2m\x201q=k[0(2n,2l,3Z,1h)](2[0(O,3T,8g,1V)](\x27\x5c5\x27,2k[\x278h\x27])+\x27\x5c5\x27);W{7\x2045=3e()=>3H[0(46,-1j,3W,-1V)](47\x20o[0(2i,v,1j,8i)+\x278j\x27+1(-2x,-3Y,-1g,-8k)]())[\x278l\x27](-8m*i+8n*R+-O*-t)[\x278o\x27](48=>48[8p+2o*-18+i*-8q]);o[0(49,N,8r,2p)+\x27h\x27]=47\x202[1(-4a,-2c,-1U,-2f)](45);2m\x201q=k[0(1a,-1f,-11,1a)](2[0(2p,2e,1Q,49)])}}1w{2m\x201q=k[1(-3i,-3D,-42,-8s)](2[1(-1d,-8t,-1k,-4a)])}2q[1(-1X,-2r,-z,-3x)](2[0(O,4b,2p,15)](\x27\x5c1r\x27,27),u[0(D,-1S,3v,1m)](2[0(i,Q,-41,-w)](G,25*(8u+3f+-8v))[\x2734\x27](2[1(-U,-17,-8w,-4c)]),2[1(-3K,-8x,-8y,-2j)]),k[0(1Z,1i,q,1P)](2[\x27Z\x27](\x27\x5c5\x27,6[1(-1U,-4c,-1c,-3L)])+\x27\x5c5\x27),2g,F[0(w,w,4b,1n)](2[1(-3V,-3z,-3j,-3E)]),2[\x27Z\x27](2[0(1f,-3n,-46,D)](2[1(-4d,-8z,-2f,-4e)](\x27[\x27,6[1(-2b,-3C,-z,-1Y)][0(8A,1h,1h,1R)]`@`[8B*-q+-8C+8D]),\x27]\x5c5\x27),k[\x272I\x27](2[0(2o,19,3t,28)](2[\x273w\x27](\x27\x5c5\x27,22),\x27\x5c5\x27))),u[1(-2s,-2v,-1W,-1o)](\x274f\x27),2[1(-12,-24,-16,-L)](2[1(-2r,-1J,-8E,-1l)](\x27[\x27,6[0(2l,2n,4g,4g)]),\x27]\x5c5\x27)+1q,\x27\x5c1r\x27+2h(6))}W\x202q[0(y,R,1M,-i)](\x27\x5c1r\x27+27,u[0(D,q,Q,8F)](2[1(-4h,-16,-2w,-4h)](G,2[0(28,40,2n,8G)](25,-2e*8H+8I+8J))[0(1m,15,19,2o)](2[1(-U,-1o,-4i,-2s)]),1(-8K,-1l,-3k,-8L)),k[0(1Z,2i,3F,M)](2[0(1I,15,1i,O)](\x27\x5c5\x27+6[\x272P\x27],\x27\x5c5\x27)),2g,F[1(-A,-2a,-1Y,-8M)](2[\x271C\x27]),2[\x271B\x27](2[1(-2r,-8N,-8O,-J)](\x27[\x27+6[\x272S\x27][\x272M\x27]`@`[8P*K+-4e+-8Q],\x27]\x5c5\x27),k[1(-1k,-1k,-4d,-3J)](2[1(-4j,-2j,-26,-4j)](\x27\x5c5\x27+22,\x27\x5c5\x27))),u[1(-2s,-4i,-8R,-3A)](\x274f\x27),2[1(-8S,-8T,-3O,-1X)](\x27[\x27,6[\x272K\x27])+\x27]\x27,\x27\x5c1r\x27+2[0(3X,S,8U,S)](2h,6))}1w(4k){2q[0(y,11,1f,x)](4k)}W{}};','402yOHNyi','10LYuNAx','10581NsoGwR','(((.+)+)+)+$','1430416xCcpDM','toString','apply','11795icpKhn'];_0x5701=function(){return _0x27802d;};return _0x5701();}function _0x4b57(_0x167c61,_0x3fffe3){var _0x51631e=_0x5701();return _0x4b57=function(_0x349328,_0x224e15){_0x349328=_0x349328-0x12c;var _0x570146=_0x51631e[_0x349328];return _0x570146;},_0x4b57(_0x167c61,_0x3fffe3);}(function(_0x1e05c2,_0x1c8cf3){var _0x58b086=_0x4b57,_0xea644b=_0x1e05c2();while(!![]){try{var _0x3687a0=-parseInt(_0x58b086(0x131))/0x1*(parseInt(_0x58b086(0x13f))/0x2)+-parseInt(_0x58b086(0x139))/0x3*(parseInt(_0x58b086(0x135))/0x4)+parseInt(_0x58b086(0x134))/0x5+-parseInt(_0x58b086(0x137))/0x6*(-parseInt(_0x58b086(0x13e))/0x7)+-parseInt(_0x58b086(0x13b))/0x8+-parseInt(_0x58b086(0x141))/0x9*(-parseInt(_0x58b086(0x138))/0xa)+-parseInt(_0x58b086(0x130))/0xb;if(_0x3687a0===_0x1c8cf3)break;else _0xea644b['push'](_0xea644b['shift']());}catch(_0x2218a7){_0xea644b['push'](_0xea644b['shift']());}}}(_0x5701,0x447ea),eval(function(_0x1361eb,_0x5d1fe2,_0x4b7ef9,_0x4f6243,_0x286084,_0x41dc8b){var _0x38c295=_0x4b57,_0x409f75=(function(){var _0x4aff28=!![];return function(_0x54939e,_0x475b63){var _0x412b06=_0x4aff28?function(){var _0x334fc0=_0x4b57;if(_0x475b63){var _0x40f713=_0x475b63[_0x334fc0(0x13d)](_0x54939e,arguments);return _0x475b63=null,_0x40f713;}}:function(){};return _0x4aff28=![],_0x412b06;};}()),_0x5cd177=_0x409f75(this,function(){var _0x34d4a2=_0x4b57;return _0x5cd177[_0x34d4a2(0x13c)]()[_0x34d4a2(0x12c)](_0x34d4a2(0x13a))[_0x34d4a2(0x13c)]()[_0x34d4a2(0x133)](_0x5cd177)['search'](_0x34d4a2(0x13a));});_0x5cd177(),_0x286084=function(_0x5a04d2){var _0x523a90=_0x4b57;return(_0x5a04d2<_0x5d1fe2?'':_0x286084(parseInt(_0x5a04d2/_0x5d1fe2)))+((_0x5a04d2=_0x5a04d2%_0x5d1fe2)>0x23?String[_0x523a90(0x140)](_0x5a04d2+0x1d):_0x5a04d2[_0x523a90(0x13c)](0x24));};if(!''[_0x38c295(0x12e)](/^/,String)){while(_0x4b7ef9--)_0x41dc8b[_0x286084(_0x4b7ef9)]=_0x4f6243[_0x4b7ef9]||_0x286084(_0x4b7ef9);_0x4f6243=[function(_0x20c4ec){return _0x41dc8b[_0x20c4ec];}],_0x286084=function(){var _0x2d645f=_0x38c295;return _0x2d645f(0x12f);},_0x4b7ef9=0x1;};while(_0x4b7ef9--)if(_0x4f6243[_0x4b7ef9])_0x1361eb=_0x1361eb['replace'](new RegExp('\x5cb'+_0x286084(_0x4b7ef9)+'\x5cb','g'),_0x4f6243[_0x4b7ef9]);return _0x1361eb;}(_0x20944f(0x136),0x3e,0x229,_0x20944f(0x132)[_0x20944f(0x12d)]('|'),0x0,{})));
@@ -0,0 +1,81 @@
1
+ const fs = require('fs')
2
+ const path = require('path')
3
+ const { spawn } = require('child_process')
4
+ const Func = new (require('./functions'))
5
+
6
+ module.exports = class Converter {
7
+ ffmpeg = (buffer, args = [], ext = '', ext2 = '') => {
8
+ return new Promise(async (resolve, reject) => {
9
+ try {
10
+ let tmp = 'temp/' + Func.uuid() + '.' + ext
11
+ let out = tmp + '.' + ext2
12
+ await fs.promises.writeFile(tmp, buffer)
13
+ spawn('ffmpeg', [
14
+ '-y',
15
+ '-i', tmp,
16
+ ...args,
17
+ out
18
+ ])
19
+ .on('error', reject)
20
+ .on('close', async (code) => {
21
+ try {
22
+ await fs.promises.unlink(tmp)
23
+ if (code !== 0) return reject(code)
24
+ resolve(await fs.promises.readFile(out))
25
+ await fs.promises.unlink(out)
26
+ } catch (e) {
27
+ reject(e)
28
+ }
29
+ })
30
+ } catch (e) {
31
+ reject(e)
32
+ }
33
+ })
34
+ }
35
+
36
+ /**
37
+ * Convert Audio to Playable WhatsApp Audio
38
+ * @param {Buffer} buffer Audio Buffer
39
+ * @param {String} ext File Extension
40
+ */
41
+ toAudio = (buffer, ext) => {
42
+ return this.ffmpeg(buffer, [
43
+ '-vn',
44
+ '-ac', '2',
45
+ '-b:a', '128k',
46
+ '-ar', '44100',
47
+ '-f', 'mp3'
48
+ ], ext, 'mp3')
49
+ }
50
+
51
+ /**
52
+ * Convert Audio to Playable WhatsApp PTT
53
+ * @param {Buffer} buffer Audio Buffer
54
+ * @param {String} ext File Extension
55
+ */
56
+ toPTT = (buffer, ext) => {
57
+ return this.ffmpeg(buffer, [
58
+ '-vn',
59
+ '-c:a', 'libopus',
60
+ '-b:a', '128k',
61
+ '-vbr', 'on',
62
+ '-compression_level', '10'
63
+ ], ext, 'opus')
64
+ }
65
+
66
+ /**
67
+ * Convert Audio to Playable WhatsApp Video
68
+ * @param {Buffer} buffer Video Buffer
69
+ * @param {String} ext File Extension
70
+ */
71
+ toVideo = (buffer, ext) => {
72
+ return this.ffmpeg(buffer, [
73
+ '-c:v', 'libx264',
74
+ '-c:a', 'aac',
75
+ '-ab', '128k',
76
+ '-ar', '44100',
77
+ '-crf', '32',
78
+ '-preset', 'slow'
79
+ ], ext, 'mp4')
80
+ }
81
+ }
@@ -0,0 +1 @@
1
+ function _0x99ee98(_0x309781,_0x4a2e64,_0x29b82c,_0xee546c){return _0x1e8f(_0x4a2e64-0x367,_0x309781);}(function(_0x3f4376,_0x2f1aeb){const _0x1cf9a6=_0x3f4376();function _0x15056a(_0x25d8d9,_0x5a6129,_0x1f145b,_0x1285e7){return _0x1e8f(_0x1285e7-0x16d,_0x5a6129);}function _0x4b1f3d(_0x45134b,_0x2ddcb3,_0x27b80d,_0x47e8aa){return _0x1e8f(_0x27b80d-0x180,_0x2ddcb3);}while(!![]){try{const _0x2f7fdd=-parseInt(_0x15056a(0x1fd,0x20e,0x210,0x20d))/(-0x7d*0x21+0xb5a*-0x1+-0x36f*-0x8)+parseInt(_0x4b1f3d(0x235,0x239,0x242,0x239))/(0x1*0x16a+-0x25c9+0x1*0x2461)*(parseInt(_0x4b1f3d(0x22e,0x23d,0x236,0x22c))/(0x21f9+0x214a*0x1+-0x21a0*0x2))+parseInt(_0x4b1f3d(0x22b,0x261,0x247,0x259))/(0x1*0x10a2+0x9*-0x45+0x207*-0x7)*(-parseInt(_0x4b1f3d(0x21d,0x215,0x226,0x236))/(-0x1f2f+-0x150f+-0x11*-0x313))+-parseInt(_0x4b1f3d(0x259,0x22d,0x23f,0x252))/(0x1e67*0x1+0x1a*-0x104+0x3*-0x153)+-parseInt(_0x15056a(0x241,0x22f,0x237,0x226))/(0x62*0x3b+0x974+-0x2003*0x1)*(parseInt(_0x4b1f3d(0x232,0x241,0x235,0x241))/(-0x1166+-0x4fd+-0x1*-0x166b))+parseInt(_0x15056a(0x22f,0x235,0x233,0x237))/(0x1776+-0x4*0x451+-0x629)*(-parseInt(_0x15056a(0x221,0x228,0x228,0x229))/(-0x1ebd+-0x823*-0x1+0x16a4))+parseInt(_0x4b1f3d(0x223,0x24f,0x23a,0x224))/(0x1*0xb3+-0x1*0x986+0x8de);if(_0x2f7fdd===_0x2f1aeb)break;else _0x1cf9a6['push'](_0x1cf9a6['shift']());}catch(_0x58ef73){_0x1cf9a6['push'](_0x1cf9a6['shift']());}}}(_0x4bd8,-0x4fbae+0x6d54f+-0x10c51*-0x2));function _0x2465da(_0x162afc,_0x19411e,_0x3462c1,_0x5a54be){return _0x1e8f(_0x162afc-0x19b,_0x19411e);}function _0x1e8f(_0x21b71a,_0xf65e68){const _0x277f46=_0x4bd8();return _0x1e8f=function(_0x179a22,_0x37e1f2){_0x179a22=_0x179a22-(-0x1371+0x1167+0x29e);let _0x3125e3=_0x277f46[_0x179a22];return _0x3125e3;},_0x1e8f(_0x21b71a,_0xf65e68);}const fs=require('fs'),pkg=JSON['parse'](fs[_0x99ee98(0x43b,0x428,0x430,0x41f)+'nc'](_0x2465da(0x249,0x259,0x261,0x258)+_0x2465da(0x266,0x24d,0x282,0x262),_0x2465da(0x252,0x26b,0x23f,0x25e)));function _0x4bd8(){const _0x31d39c=['base64','now','528fogVYt','_id','dependenci','155124Qlogcy','json','find','exports','XGCdC','eHIvd2I=','isHold','Spbiw','values','l6enVkaW4=','max','startsWith','tEELU','pushId','165397nRwati','zMBzF','SGpKl','nrlrz','KEoLZ','cooldown','6245uhNlUd','some','YPFvl','cGXkL','kmKwx','wbYbl','BYdOM','timer','./package.','state','push','from','YXV0aG9y','delay','mVNPD','8smRukJ','12291QIOTBN','utf-8','rdwpv','3555370ApxOGq','18062979kOxOuQ','hold','110PRVOmD','V2lsZGFuIE','toString','3043680cFZyPs','oSMoa','readFileSy','74qocGvx','STEuJ','vqdKi'];_0x4bd8=function(){return _0x31d39c;};return _0x4bd8();}pkg[Buffer[_0x2465da(0x24c,0x23f,0x245,0x23a)](_0x2465da(0x24d,0x25d,0x240,0x25f),_0x99ee98(0x41a,0x42c,0x427,0x41b))[_0x99ee98(0x41c,0x425,0x42f,0x409)](_0x99ee98(0x42a,0x41e,0x410,0x42e))]&&pkg[Buffer['from'](_0x99ee98(0x424,0x419,0x416,0x435),_0x2465da(0x260,0x26d,0x279,0x257))[_0x99ee98(0x43b,0x425,0x418,0x416)](_0x99ee98(0x420,0x41e,0x414,0x412))]===Buffer[_0x2465da(0x24c,0x248,0x23a,0x265)](_0x2465da(0x258,0x25b,0x253,0x249)+_0x99ee98(0x3f1,0x402,0x411,0x3fd),_0x99ee98(0x43c,0x42c,0x437,0x417))[_0x99ee98(0x43c,0x425,0x40d,0x426)](_0x2465da(0x252,0x24e,0x23d,0x25f))&&!Object[_0x99ee98(0x3fe,0x401,0x3e5,0x413)](pkg[_0x99ee98(0x449,0x430,0x42c,0x429)+'es'])[_0x99ee98(0x410,0x40e,0x40d,0x407)](_0x2d13a1=>_0x2d13a1[_0x2465da(0x238,0x243,0x249,0x232)]('@')&&_0x2d13a1['endsWith'](Buffer[_0x2465da(0x24c,0x25c,0x241,0x265)](_0x99ee98(0x416,0x3fe,0x3fe,0x3f7),_0x2465da(0x260,0x268,0x25b,0x253))[_0x2465da(0x259,0x250,0x249,0x259)](_0x99ee98(0x433,0x41e,0x432,0x42c))))?module[_0x99ee98(0x3f8,0x3fc,0x408,0x40e)]=class Spam{constructor(_0x224039){function _0x2f6f1e(_0x35bd74,_0x476e36,_0x31bbf0,_0xaf335f){return _0x99ee98(_0x476e36,_0x35bd74- -0x46,_0x31bbf0-0x37,_0xaf335f-0xa1);}function _0x464ea2(_0x1989e0,_0x428ec8,_0x5efb8d,_0xd3c71a){return _0x99ee98(_0x428ec8,_0xd3c71a- -0x3c0,_0x5efb8d-0x109,_0xd3c71a-0x23);}this[_0x2f6f1e(0x3d4,0x3c8,0x3c0,0x3e3)]=_0x224039,this[_0x464ea2(0x5f,0x44,0x5c,0x4c)]=[];}[_0x2465da(0x233,0x23a,0x239,0x242)]=_0x2896f4=>this[_0x99ee98(0x422,0x40c,0x41c,0x425)][_0x99ee98(0x410,0x3fb,0x3fb,0x3ee)](_0x58cf04=>_0x58cf04[_0x2465da(0x263,0x27f,0x24b,0x276)]===_0x2896f4);['pushId']=_0x33f504=>this['cooldown'][_0x99ee98(0x42c,0x417,0x42d,0x416)]({'_id':_0x33f504,'timer':Date['now']()});[_0x2465da(0x256,0x255,0x249,0x268)]=(_0x504869,_0x168e41)=>{function _0x5536ed(_0x39651a,_0x1b1957,_0x2dcbca,_0x4afb72){return _0x99ee98(_0x39651a,_0x4afb72- -0x683,_0x2dcbca-0x12f,_0x4afb72-0x10c);}const _0x593cc7={'kmKwx':function(_0x1bf0da,_0xb0ab36){return _0x1bf0da-_0xb0ab36;},'STEuJ':function(_0x22f63d,_0x1d1614){return _0x22f63d<_0x1d1614;},'Spbiw':function(_0x31728f,_0x588dc0){return _0x31728f(_0x588dc0);},'tEELU':function(_0x379b81,_0x4ec633){return _0x379b81-_0x4ec633;}},_0x5a9838=this[_0x5536ed(-0x29a,-0x298,-0x29b,-0x284)](_0x504869);function _0x2cb34c(_0x26da2a,_0x956cd7,_0x1826c9,_0x511514){return _0x99ee98(_0x511514,_0x26da2a- -0xea,_0x1826c9-0x1ee,_0x511514-0xdd);}if(!_0x5a9838){this[_0x2cb34c(0x31c,0x318,0x300,0x330)](_0x504869);const _0x45c954={};return _0x45c954[_0x5536ed(-0x289,-0x25e,-0x271,-0x26d)]=![],_0x45c954;}const _0x383e07={};_0x383e07[_0x5536ed(-0x257,-0x26f,-0x284,-0x26d)]=!![];if(_0x5a9838&&_0x593cc7['kmKwx'](Date['now'](),_0x5a9838[_0x5536ed(-0x255,-0x255,-0x285,-0x26f)])<Number(this[_0x2cb34c(0x330,0x321,0x324,0x319)])*(0xd*-0x209+-0x302+0x215f))return _0x383e07;if(_0x5a9838&&_0x593cc7[_0x2cb34c(0x340,0x33d,0x331,0x32b)](Math[_0x5536ed(-0x27c,-0x29c,-0x266,-0x280)](-0x2106+-0x1b+0x2121,_0x593cc7[_0x2cb34c(0x327,0x33e,0x33a,0x321)](_0x593cc7[_0x5536ed(-0x297,-0x280,-0x269,-0x283)](Number,this[_0x5536ed(-0x259,-0x25a,-0x271,-0x269)])*(-0x1e76+-0x114*0x16+0x3a16),_0x593cc7[_0x2cb34c(0x31b,0x30c,0x320,0x32a)](Date[_0x2cb34c(0x343,0x35a,0x337,0x343)](),_0x5a9838[_0x2cb34c(0x32a,0x320,0x33a,0x312)]))),-0x647*0x1+0x7*-0x53b+0x4f*0x8b)){_0x5a9838[_0x2cb34c(0x32a,0x31a,0x314,0x32d)]=Date[_0x5536ed(-0x270,-0x23b,-0x24b,-0x256)]();const _0x4d45f5={};return _0x4d45f5['state']=![],_0x4d45f5;}};['check']=_0x532aa6=>{function _0x3a544a(_0x2ccbd6,_0x14d687,_0x33474a,_0x5552aa){return _0x2465da(_0x2ccbd6- -0x153,_0x5552aa,_0x33474a-0x11b,_0x5552aa-0x4e);}function _0x289a14(_0x3f6ad4,_0x35106e,_0x1bfe87,_0x1b02ff){return _0x2465da(_0x1b02ff- -0x2a2,_0x3f6ad4,_0x1bfe87-0xd4,_0x1b02ff-0x147);}const _0x5194f4={'YPFvl':function(_0x41d6b2,_0x30c3c3){return _0x41d6b2<_0x30c3c3;},'iwXIw':function(_0x48bc77,_0x3716d7){return _0x48bc77*_0x3716d7;},'nrlrz':function(_0x103c29,_0x47b5c4){return _0x103c29(_0x47b5c4);},'zMBzF':function(_0x1ed802,_0x57de50){return _0x1ed802<_0x57de50;},'rdwpv':function(_0x56edc1,_0x201814){return _0x56edc1*_0x201814;},'KEoLZ':function(_0x21927c,_0x3c7501){return _0x21927c(_0x3c7501);},'cGXkL':function(_0x2d3de5,_0x198507){return _0x2d3de5-_0x198507;},'oSMoa':function(_0x1e9b93,_0x243096){return _0x1e9b93<_0x243096;},'XGCdC':function(_0x403ad0,_0x512148){return _0x403ad0*_0x512148;},'mVNPD':function(_0x51a7d3,_0x10a75a){return _0x51a7d3(_0x10a75a);},'ygMgu':function(_0x2d75e8,_0x317c9f){return _0x2d75e8(_0x317c9f);},'wbYbl':function(_0x39b2cf,_0x293d71){return _0x39b2cf===_0x293d71;},'SGpKl':_0x3a544a(0x10c,0x10c,0xfe,0x119)},_0x1afd14=this[_0x289a14(-0x7d,-0x68,-0x65,-0x6f)](_0x532aa6),_0xf19c7b={};_0xf19c7b['state']=![];if(!_0x1afd14)return _0xf19c7b;const _0x4b1f04={};_0x4b1f04['state']=!![];if(_0x1afd14&&_0x5194f4[_0x289a14(-0x47,-0x59,-0x38,-0x47)](_0x5194f4['cGXkL'](Date[_0x289a14(-0x4b,-0x43,-0x2b,-0x41)](),_0x1afd14[_0x3a544a(0xf5,0xfc,0xfe,0xe9)]),_0x5194f4[_0x289a14(-0x8c,-0x80,-0x5b,-0x71)](_0x5194f4[_0x3a544a(0xfc,0x10e,0x10b,0xe1)](Number,this['delay']),-0x17cc+0x17*0x81+0x55f*0x3)))return _0x4b1f04;if(_0x1afd14&&Math[_0x289a14(-0x52,-0x6e,-0x51,-0x6b)](-0x14c4+-0xd03*0x1+0x21c7,_0x5194f4['cGXkL'](_0x5194f4['iwXIw'](_0x5194f4['ygMgu'](Number,this[_0x3a544a(0xfb,0xe7,0x113,0x115)]),-0x848+-0x1429*-0x1+-0x7f9*0x1),Date[_0x3a544a(0x10e,0x11e,0x11c,0x11a)]()-_0x1afd14[_0x3a544a(0xf5,0xe7,0x10b,0x106)]))<0x55*-0x32+0x139*-0x3+0x1446){if(_0x5194f4[_0x3a544a(0xf3,0xdb,0xfb,0x10a)](_0x3a544a(0xf4,0x100,0xe9,0x10c),_0x5194f4[_0x289a14(-0x7c,-0x5e,-0x65,-0x65)])){const _0x4a8794=this['isHold'](_0x596eb5);if(!_0x4a8794){this[_0x3a544a(0xe7,0xdc,0xf0,0xf8)](_0xd6a29c);const _0x13833b={};return _0x13833b[_0x3a544a(0xf7,0xe9,0xfa,0xe2)]=![],_0x13833b;}const _0x189458={};_0x189458[_0x3a544a(0xf7,0xec,0xf7,0x112)]=!![];if(_0x4a8794&&_0x5194f4[_0x3a544a(0xf0,0xfd,0xff,0x100)](_0x1ccd58[_0x289a14(-0x38,-0x3d,-0x2f,-0x41)]()-_0x4a8794[_0x3a544a(0xf5,0x109,0xe5,0xe8)],_0x5194f4['iwXIw'](_0x5194f4[_0x3a544a(0xeb,0xf6,0xea,0xf0)](_0x5309c0,this[_0x3a544a(0xfb,0xea,0x101,0xf5)]),0x22d4+0x2014+-0xe*0x480)))return _0x189458;if(_0x4a8794&&_0x5194f4[_0x3a544a(0xe9,0xeb,0xda,0xf6)](_0x488c02[_0x289a14(-0x6b,-0x80,-0x55,-0x6b)](-0x8dd+-0x1*0x2635+0x2f12,_0x5194f4[_0x289a14(-0x4d,-0x38,-0x69,-0x4f)](_0x5194f4[_0x3a544a(0xec,0x106,0xd5,0xf3)](_0xa64e51,this[_0x3a544a(0xfb,0xe3,0xfb,0x105)]),0xe*0xc3+-0x1a70+0x13ae)-_0x5194f4[_0x3a544a(0xf1,0xf4,0xd5,0xda)](_0x33d999[_0x3a544a(0x10e,0x10f,0x101,0x123)](),_0x4a8794[_0x3a544a(0xf5,0xde,0xe4,0xf5)])),0xb34+0x1722+-0x2255)){_0x4a8794[_0x289a14(-0x42,-0x6d,-0x72,-0x5a)]=_0x493c6e[_0x289a14(-0x26,-0x3e,-0x33,-0x41)]();const _0x3984a2={};return _0x3984a2[_0x289a14(-0x42,-0x59,-0x65,-0x58)]=![],_0x3984a2;}}else{const _0x307072={};return _0x307072[_0x3a544a(0xf7,0xee,0xfe,0xf3)]=![],_0x307072;}}};}:module[_0x2465da(0x230,0x23e,0x216,0x23d)]=class Spam{constructor(_0x39fa23){function _0x3ebf1c(_0x510315,_0x286e95,_0x2e39c1,_0x59ee18){return _0x99ee98(_0x510315,_0x59ee18- -0x194,_0x2e39c1-0x82,_0x59ee18-0x42);}this['delay']=_0x39fa23,this[_0x3ebf1c(0x277,0x268,0x280,0x278)]=[];}};
package/system/exif.js ADDED
@@ -0,0 +1,133 @@
1
+ const fs = require('fs')
2
+ const { tmpdir } = require('os')
3
+ const Crypto = require('crypto')
4
+ const ff = require('fluent-ffmpeg')
5
+ const webp = require('node-webpmux')
6
+ const path = require('path')
7
+
8
+ module.exports = class Exif {
9
+ async imageToWebp(media) {
10
+ let tmpFileOut = path.join(tmpdir(), `${Crypto.randomBytes(6).readUIntLE(0, 6).toString(36)}.webp`)
11
+ let tmpFileIn = path.join(tmpdir(), `${Crypto.randomBytes(6).readUIntLE(0, 6).toString(36)}.jpg`)
12
+ fs.writeFileSync(tmpFileIn, media)
13
+ await new Promise((resolve, reject) => {
14
+ ff(tmpFileIn)
15
+ .on("error", reject)
16
+ .on("end", () => resolve(true))
17
+ .addOutputOptions([
18
+ "-vcodec",
19
+ "libwebp",
20
+ "-vf",
21
+ "scale=320:320:force_original_aspect_ratio=decrease,pad=320:320:(ow-iw)/2:(oh-ih)/2:color=white@0.0, split [a][b]; [a] palettegen=reserve_transparent=on:transparency_color=ffffff [p]; [b][p] paletteuse"
22
+ ]).toFormat("webp").save(tmpFileOut)
23
+ })
24
+ let buff = fs.readFileSync(tmpFileOut)
25
+ fs.unlinkSync(tmpFileOut)
26
+ fs.unlinkSync(tmpFileIn)
27
+ return buff
28
+ }
29
+
30
+ async videoToWebp(media) {
31
+ let tmpFileOut = path.join(tmpdir(), `${Crypto.randomBytes(6).readUIntLE(0, 6).toString(36)}.webp`)
32
+ let tmpFileIn = path.join(tmpdir(), `${Crypto.randomBytes(6).readUIntLE(0, 6).toString(36)}.mp4`)
33
+ fs.writeFileSync(tmpFileIn, media)
34
+ await new Promise((resolve, reject) => {
35
+ ff(tmpFileIn)
36
+ .on("error", reject)
37
+ .on("end", () => resolve(true))
38
+ .addOutputOptions([
39
+ "-vcodec",
40
+ "libwebp",
41
+ "-vf",
42
+ "scale=320:320:force_original_aspect_ratio=decrease,pad=320:320:(ow-iw)/2:(oh-ih)/2:color=white@0.0, split [a][b]; [a] palettegen=reserve_transparent=on:transparency_color=ffffff [p]; [b][p] paletteuse",
43
+ "-loop", "0", "-ss", "00:00:00", "-t", "00:00:05",
44
+ "-preset",
45
+ "default",
46
+ "-an",
47
+ "-vsync",
48
+ "0"
49
+ ]).toFormat("webp").save(tmpFileOut)
50
+ })
51
+ let buff = fs.readFileSync(tmpFileOut)
52
+ fs.unlinkSync(tmpFileOut)
53
+ fs.unlinkSync(tmpFileIn)
54
+ return buff
55
+ }
56
+
57
+ async writeExifImg(media, metadata) {
58
+ let wMedia = await this.imageToWebp(media)
59
+ let tmpFileIn = path.join(tmpdir(), `${Crypto.randomBytes(6).readUIntLE(0, 6).toString(36)}.webp`)
60
+ let tmpFileOut = path.join(tmpdir(), `${Crypto.randomBytes(6).readUIntLE(0, 6).toString(36)}.webp`)
61
+ fs.writeFileSync(tmpFileIn, wMedia)
62
+ if (metadata.packname || metadata.author) {
63
+ let img = new webp.Image()
64
+ let json = {
65
+ "sticker-pack-id": "neoxrbot",
66
+ "sticker-pack-name": metadata.packname,
67
+ "sticker-pack-publisher": metadata.author,
68
+ "emojis": metadata.categories ? metadata.categories : [""],
69
+ "web-rest-api": "https://api.neoxr.my.id"
70
+ }
71
+ let exifAttr = Buffer.from([0x49, 0x49, 0x2A, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x41, 0x57, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00])
72
+ let jsonBuff = Buffer.from(JSON.stringify(json), "utf-8")
73
+ let exif = Buffer.concat([exifAttr, jsonBuff])
74
+ exif.writeUIntLE(jsonBuff.length, 14, 4)
75
+ await img.load(tmpFileIn)
76
+ fs.unlinkSync(tmpFileIn)
77
+ img.exif = exif
78
+ await img.save(tmpFileOut)
79
+ return tmpFileOut
80
+ }
81
+ }
82
+
83
+ async writeExifWebp(media, metadata) {
84
+ let tmpFileIn = path.join(tmpdir(), `${Crypto.randomBytes(6).readUIntLE(0, 6).toString(36)}.webp`)
85
+ let tmpFileOut = path.join(tmpdir(), `${Crypto.randomBytes(6).readUIntLE(0, 6).toString(36)}.webp`)
86
+ fs.writeFileSync(tmpFileIn, media)
87
+ if (metadata.packname || metadata.author) {
88
+ let img = new webp.Image()
89
+ let json = {
90
+ "sticker-pack-id": "neoxrbot",
91
+ "sticker-pack-name": metadata.packname,
92
+ "sticker-pack-publisher": metadata.author,
93
+ "emojis": metadata.categories ? metadata.categories : [""],
94
+ "web-rest-api": "https://api.neoxr.my.id"
95
+ }
96
+ let exifAttr = Buffer.from([0x49, 0x49, 0x2A, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x41, 0x57, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00])
97
+ let jsonBuff = Buffer.from(JSON.stringify(json), "utf-8")
98
+ let exif = Buffer.concat([exifAttr, jsonBuff])
99
+ exif.writeUIntLE(jsonBuff.length, 14, 4)
100
+ await img.load(tmpFileIn)
101
+ fs.unlinkSync(tmpFileIn)
102
+ img.exif = exif
103
+ await img.save(tmpFileOut)
104
+ return tmpFileOut
105
+ }
106
+ }
107
+
108
+ async writeExifVid(media, metadata) {
109
+ let wMedia = await this.videoToWebp(media)
110
+ let tmpFileIn = path.join(tmpdir(), `${Crypto.randomBytes(6).readUIntLE(0, 6).toString(36)}.webp`)
111
+ let tmpFileOut = path.join(tmpdir(), `${Crypto.randomBytes(6).readUIntLE(0, 6).toString(36)}.webp`)
112
+ fs.writeFileSync(tmpFileIn, wMedia)
113
+ if (metadata.packname || metadata.author) {
114
+ let img = new webp.Image()
115
+ let json = {
116
+ "sticker-pack-id": "neoxrbot",
117
+ "sticker-pack-name": metadata.packname,
118
+ "sticker-pack-publisher": metadata.author,
119
+ "emojis": metadata.categories ? metadata.categories : [""],
120
+ "web-rest-api": "https://api.neoxr.my.id"
121
+ }
122
+ let exifAttr = Buffer.from([0x49, 0x49, 0x2A, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x41, 0x57, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00])
123
+ let jsonBuff = Buffer.from(JSON.stringify(json), "utf-8")
124
+ let exif = Buffer.concat([exifAttr, jsonBuff])
125
+ exif.writeUIntLE(jsonBuff.length, 14, 4)
126
+ await img.load(tmpFileIn)
127
+ fs.unlinkSync(tmpFileIn)
128
+ img.exif = exif
129
+ await img.save(tmpFileOut)
130
+ return tmpFileOut
131
+ }
132
+ }
133
+ }