Created
October 20, 2019 04:22
-
-
Save ahl/20cb5183098fb8d3231b87a13b77af39 to your computer and use it in GitHub Desktop.
Generate a Slack Workflow that spams the shit out of whoever runs it
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import uuid | |
import json | |
workflow = { | |
"source_id": "271537071011674362", | |
"version": "1", | |
"workflow": { | |
"name": "spam me please", | |
"blueprint": { | |
"version": "1", | |
"trigger": { | |
"type": "channel_action", | |
"id": "c8b878d2-026b-46e5-83f3-9a3e027da66d", | |
"config": { | |
"name": "spam me please", | |
"channels": [ | |
"ABCDEF" | |
], | |
"callback_id": "ebc779d1-919d-402d-bc75-a1131380e000", | |
"description": "spam me please" | |
} | |
}, | |
"steps": [] | |
} | |
} | |
} | |
for i in range(500): | |
workflow["workflow"]["blueprint"]["steps"].append({ | |
"type": "message", | |
"id": uuid.uuid1().urn.split(":")[2], | |
"config": { | |
"user": { | |
"ref": "c8b878d2-026b-46e5-83f3-9a3e027da66d==user" | |
}, | |
"has_button": False, | |
"message_text": "this is spam" | |
} | |
}) | |
print(json.dumps(workflow, indent=2)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment