puknulvnos

Untitled

Aug 19th, 2019
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.89 KB | None | 0 0
  1. const Blowfish = require('javascript-blowfish');
  2. const key = "phonk_s_r_m";
  3. const bf = new Blowfish(key);
  4.  
  5. const bot_token = ''
  6. const reports__token = ''
  7. const moderators__token = ''
  8.  
  9. const {Core} = require('vk-bot-core')
  10. const reports = new Core(reports__token)
  11. const moderators = new Core(moderators__token)
  12.  
  13. const reports__group_id = -114915716
  14. const reports__topic_id = 34689231
  15. const send__chat_id = '11'
  16.  
  17. var TMs = [
  18. '105385870',
  19. '82660578',
  20. '150686144',
  21. '158880373'
  22. ]
  23. var messages = [
  24. 'ВИДИТ-БОТ обнаружил новое сообщение в Жалобах!',
  25. 'Одинокая девушка ищет спутника в Жалобах.',
  26. 'Не мешайте, я смотрю! Жалоба!',
  27. 'Без лишних слов, новая жалоба!'
  28. ]
  29. var randomMsg = Math.floor(Math.random() * messages.length)
  30.  
  31. reports.on('board_post_new', msg => () => {
  32. var randomID = Math.floor(Math.random() * 1000000)
  33. if (msg.topic_owner_id == reports__group_id & msg.topic_id == reports__topic_id & !msg.text.startsWith('[') & msg.text.length > 25) {
  34. console.log('[Жалобы] Пришло сообщение от https://vk.com/id' + msg.from_id)
  35.  
  36. reports.api.call('messages.send', {
  37. chat_id: send__chat_id,
  38. random_id: randomID,
  39. message: `[Жалобы] ${messages[randomMsg]}\nСсылка: https://vk.com/topic${msg.topic_owner_id}_${msg.topic_id}?post=${msg.id}\nОт: https://vk.com/id${msg.from_id}`,
  40. access_token: bot_token
  41. })
  42. }
  43. })
  44. reports.startAsLongPoll()
  45.  
  46. moderators.on('wall_post_new', msg => () => {
  47. console.log('[Овощебаза] Пришло сообщение от https://vk.com/id' + msg.from_id)
  48. var types = [
  49. 'варн',
  50. 'анварн',
  51. 'бан',
  52. 'мут',
  53. 'разбан',
  54. 'мут по IP',
  55. 'бан по IP',
  56. 'обход',
  57. 'хз'
  58. ]
  59. var currenttype
  60.  
  61. if (msg.text.includes('/warn') || msg.text.includes('варн'))
  62. currenttype = types[types.length - 9]
  63. else if (msg.text.includes('/unwarn') || msg.text.includes('разварн') || msg.text.includes('анварн'))
  64. currenttype = types[types.length - 8]
  65. else if (msg.text.includes('/tempban') || msg.text.includes('забаньте') || msg.text.includes('бан'))
  66. currenttype = types[types.length - 7]
  67. else if (msg.text.includes('/tempmute') || msg.text.includes('замутьте') || msg.text.includes('мут') || msg.text.includes('/mute'))
  68. currenttype = types[types.length - 6]
  69. else if (msg.text.includes('/unban') || msg.text.includes('разбан') || msg.text.includes('разбаньте'))
  70. currenttype = types[types.length - 5]
  71. else if (msg.text.includes('/ipmute'))
  72. currenttype = types[types.length - 4]
  73. else if (msg.text.includes('/ipban'))
  74. currenttype = types[types.length - 3]
  75. else if (msg.text.includes('обход') || msg.text.includes('2.12') || msg.text.includes('2.13') || msg.text.includes('/ban'))
  76. currenttype = types[types.length - 2]
  77. else
  78. currenttype = types[types.length - 1]
  79.  
  80. var randomIDD = Math.floor(Math.random() * 10000000)
  81. moderators.api.call('messages.send', {
  82. chat_id: send__chat_id,
  83. random_id: randomIDD,
  84. message: '[Овощебаза] Новая запись!\nСсылка: https://vk.com/wall' +
  85. msg.owner_id + '_' + msg.id + '\nТип: ' + currenttype,
  86. access_token: bot_token
  87. })
  88.  
  89. var randomI3D = Math.floor(Math.random() * 1000000)
  90.  
  91. if (currenttype == 'обход' || currenttype == 'разбан' || currenttype == 'мут по IP' || currenttype == 'бан по IP') {
  92. TMs.forEach(function(TM) {
  93. setTimeout(function() {
  94. moderators.api.call('messages.send', {
  95. user_id: TM,
  96. random_id: randomI3D,
  97. message: `[${currenttype}] Новая запись!\nСсылка: https://vk.com/wall${msg.owner_id}_${msg.id}`,
  98. access_token: bot_token
  99. })
  100. }, 3500);
  101. })
  102. }
  103. })
  104.  
  105. moderators.on('message_new', msg => () => {
  106. var randomID228 = Math.floor(Math.random() * 1000000)
  107. if (msg.text.startsWith('/проверка')) {
  108. var hash = msg.text
  109. var result = debugHash(hash)
  110.  
  111. var username = msg.__user.first_name + ' ' + msg.__user.last_name
  112.  
  113. console.log('\n' + username + ' проверил хэш: ' + hash)
  114. moderators.api.call('messages.send', {
  115. user_id: msg.__user.user_id,
  116. random_id: randomID228,
  117. message: result
  118. })
  119. } else if (msg.text.startsWith('/скибидивапа')) {
  120. var hash = msg.text
  121. var result = debugHash(hash)
  122. moderators.api.call('messages.send', {
  123. user_id: msg.__user.user_id,
  124. random_id: randomID228,
  125. message: result
  126. })
  127. }
  128. })
  129.  
  130. moderators.startAsLongPoll()
  131.  
  132.  
  133. function debugHash(text) {
  134. try {
  135. var hash = text
  136. var trash = [
  137. '\n',
  138. '/проверка ',
  139. '/скибидивапа ',
  140. 'vto.pe',
  141. 'vksteal',
  142. 'PROSTOCRAFT_bmljZXRyeWJyb18'
  143. ]
  144. trash.forEach(function(a) {
  145. hash = hash.replace(a, '')
  146. })
  147.  
  148. hash = bf.decrypt(bf.base64Decode(hash))
  149.  
  150. hash = hash.replace(/#1/g,'дата установки; может быть абсолютно любой версии')
  151. hash = hash.replace(/#2/g,'дата запуска; может быть абсолютно любой версии')
  152. hash = hash.replace(/#3/g,'дата запуска')
  153. hash = hash.replace('&','Читы')
  154. hash = hash.replace('~','Результат')
  155. hash = hash.replace('!','Список пользователей')
  156. hash = hash.replace('@','Время пользователя')
  157. hash = hash.replace('$','Дата запуска системы')
  158. hash = hash.replace('^','Затрачено времени')
  159. hash = hash.replace('^^','секунд')
  160.  
  161. return hash
  162.  
  163. } catch (e) {
  164. return 'Убедитесь, что вы ввели полный хэш\nЕсли уверены, что все сделали верно, но по-прежнему выводится ошибка - напишите Триггексу: https://vk.com/id252847438\n\nError - ' + e
  165. console.log('Error - ' + e)
  166. }
  167. }
Add Comment
Please, Sign In to add comment