Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.38 KB | None | 0 0
  1. from flask import Flask, request, json
  2.  
  3.  
  4.  
  5. import vk_api
  6.  
  7. import random
  8.  
  9.  
  10.  
  11. vk = vk_api.VkApi(token="fe5e99d94cc3ea80ac8a55b2cb512d34da27f697734ca713f7a498d2b5e9c2b516841c50c5c6c0721e404")
  12.  
  13.  
  14.  
  15. app = Flask(__name__)
  16.  
  17.  
  18.  
  19. @app.route('/', methods = ["POST"])
  20.  
  21. def main():
  22.  
  23.     data = json.loads(request.data)
  24.  
  25.     if data["type"] == "confirmation":
  26.  
  27.         return "51f703cf"
  28.  
  29.     elif data["type"] == "message_new":
  30.  
  31.         object = data["object"]
  32.  
  33.         id = object["peer_id"]
  34.  
  35.         body = object["text"]
  36.  
  37.         if body.lower() == "*public176330780 ":
  38.  
  39.                 vk.method("messages.send", {"peer_id": id, "message": "22222222222", "random_id": random.randint(1, 2147483647)})
  40.  
  41.         elif body.lower() == "я ":
  42.  
  43.                 vk.method("messages.send", {"peer_id": id, "message": "Казнить грешника!", "random_id": random.randint(1, 2147483647)})
  44.  
  45.         else:
  46.  
  47.          for message in range(250):
  48.  
  49.             vk.method("messages.send", {"peer_id": id, "message": "̩̺̦̻̤ ̴̜̰͉̟͇̟̦̯̔ͨͤ̆̅̌ͮͤͦ̅ͭ͆ͯ͆̅̒͗ͯ̀̚͢͞͞ ̜̤̟̦͍̰͔̯̗̄̔̾̽͗̒̉̓͋͌̽̂̄͂̔̔̂͐̿͡͡͡͝͠ ̧̀͒ͫ̄͛͐̆͠҉̝̞̖͎͎̲̮͖̫̰̦̖́ ̵̫̲̙̥̦̩̫ͫ̅ͥͧͬ̊̍ͭ̔͐̂ͩͭ̀̚͢ ̡̳̮͓̘͚̟͚̼̲̪͉̟̘̫͓̞̌͂́̽͋͋̒͛̈̎͞ ͎̺̼̫͎̒̏ͦ̍̾ ͛̾ͧ͛ͪ͟҉̮̻͙̼͖̤̗̞̗͓̙͙̳̻̩̞̥ͅ ̸̨̨̢̡̲̯̭̟̬̏͊̄͑̐ͪ̿ͭͤ̄ͮ͆̾̃ͩ̑ ̡̘̬̣͉͇̬͚͖̭̲ͧ͂̄̆̏ͫ̑͡ ̺̦̳͕͇̪́͒ͪͮͯͫ͆͒̊̈̃̀͢͝ ̢̣̩̣̟͕͑́̌͒́͌̑͑́̐̾ͣ͂̀͟͟ ͈̬̥̟̮̥͓̝ͭ̍͌̅͒̂͐̓̇̌̈́̚͘͠͡ ̵̴̢̩͎̼̻̫̘͙͈̗̐̇̂ͪ̄ͫ̐̾̈̎͋ͨ͢ ̭̭͈̥͓̘̯̠̘̠̤̩̟̬̼̤̗̖̃̊ͦͩ͝ ̴̵̡͚̻̟͈̫̫͍̺̱̹̬̼̳͇͚̠̺̓̿̇̆̿̇̄͗̍͞ ̩̺̦̻̤͌̑ͨͯͭ ̴̜̰͉̟͇̟̦̯̔ͨͤ̆̅̌ͮͤͦ̅ͭ͆ͯ͆̅̒͗ͯ̀̚͢͞͞ ̜̤̟̦͍̰͔̯̗̄̔̾̽͗̒̉̓͋͌̽̂̄͂̔̔̂͐̿͡͡͡͝͠ ̧̀͒ͫ̄͛͐̆͠҉̝̞̖͎͎̲̮͖̫̰̦̖́ ̵̫̲̙̥̦̩̫ͫ̅ͥͧͬ̊̍ͭ̔͐̂ͩͭ̀̚͢ ̡̳̮͓̘͚̟͚̼̲̪͉̟̘̫͓̞̌͂́̽͋͋̒͛̈̎͞ ͎̺̼̫͎̒̏ͦ̍̾ ͛̾ͧ͛ͪ͟҉̮̻͙̼͖̤̗̞̗͓̙͙̳̻̩̞̥ͅ ̸̨̨̢̡̲̯̭̟̬̏͊̄͑̐ͪ̿ͭͤ̄ͮ͆̾̃ͩ̑ ̡̘̬̣͉͇̬͚͖̭̲ͧ͂̄̆̏ͫ̑͡ ̺̦̳͕͇̪́͒ͪͮͯͫ͆͒̊̈̃̀͢͝ ̢̣̩̣̟͕͑́̌͒́͌̑͑́̐̾ͣ͂̀͟͟ ͈̬̥̟̮̥͓̝ͭ̍͌̅͒̂͐̓̇̌̈́̚͘͠͡ ̵̴̢̩͎̼̻̫̘͙͈̗̐̇̂ͪ̄ͫ̐̾̈̎͋ͨ͢ ̭̭͈̥͓̘̯̠̘̠̤̩̟̬̼̤̗̖̃̊ͦͩ͝ ̴̵̡͚̻̟͈̫̫͍̺̱̹̬̼̳͇͚̠̺̓̿̇̆̿̇̄͗̍͞ ̩̺̦̻̤͌̑ͨͯͭ ̴̜̰͉̟͇̟̦̯̔ͨͤ̆̅̌ͮͤͦ̅ͭ͆ͯ͆̅̒͗ͯ̀̚͢͞͞ ̜̤̟̦͍̰͔̯̗̄̔̾̽͗̒̉̓͋͌̽̂̄͂̔̔̂͐̿͡͡͡͝͠ ̧̀͒ͫ̄͛͐̆͠҉̝̞̖͎͎̲̮͖̫̰̦̖́ ̵̫̲̙̥̦̩̫ͫ̅ͥͧͬ̊̍ͭ̔͐̂ͩͭ̀̚͢ ̡̳̮͓̘͚̟͚̼̲̪͉̟̘̫͓̞̌͂́̽͋͋̒͛̈̎͞ ͎̺̼̫͎̒̏ͦ̍̾ ͛̾ͧ͛ͪ͟҉̮̻͙̼͖̤̗̞̗͓̙͙̳̻̩̞̥ͅ ̸̨̨̢̡̲̯̭̟̬̏͊̄͑̐ͪ̿ͭͤ̄ͮ͆̾̃ͩ̑ ̡̘̬̣͉͇̬͚͖̭̲ͧ͂̄̆̏ͫ̑͡ ̺̦̳͕͇̪́͒ͪͮͯͫ͆͒̊̈̃̀͢͝ ̢̣̩̣̟͕͑́̌͒́͌̑͑́̐̾ͣ͂̀͟͟ ͈̬̥̟̮̥͓̝ͭ̍͌̅͒̂͐̓̇̌̈́̚͘͠͡ ̵̴̢̩͎̼̻̫̘͙͈̗̐̇̂ͪ̄ͫ̐̾̈̎͋ͨ͢ ̭̭͈̥͓̘̯̠̘̠̤̩̟̬̼̤̗̖̃̊ͦͩ͝ ̴̵̡͚̻̟͈̫̫͍̺̱̹̬̼̳͇͚̠̺̓̿̇̆̿̇̄͗̍͞", "random_id": random.randint(1, 2147483647)})
  50.  
  51.     return "ok"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement