Skip to content

Instantly share code, notes, and snippets.

@M-ZubairAhmed
Last active June 11, 2023 10:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save M-ZubairAhmed/d3e09bd0e9e91bfd34a87eaadf915f05 to your computer and use it in GitHub Desktop.
Save M-ZubairAhmed/d3e09bd0e9e91bfd34a87eaadf915f05 to your computer and use it in GitHub Desktop.
Spam a Mattermost channels with continuous posts
#!/bin/bash
SLEEP_TIME=1
NUM_OF_MESSAGES=100
PACK=$RANDOM
echo "Sending continous messages with wait time of ${SLEEP_TIME} seconds between each message"
for (( i=1; i<=$NUM_OF_MESSAGES; i++ ))
do
mmctl post create ad-1:spamc --message "${PACK}--${i} ${RANDOM} lorem ipsum dolar sit ${RANDOM}"
sleep ${SLEEP_TIME}
done
echo "Posted ${NUM_OF_MESSAGES} messages"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment