summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordrebs <drebs@leap.se>2014-07-08 11:57:52 -0300
committerdrebs <drebs@leap.se>2014-07-08 12:53:49 -0300
commit50374367b9615b9a0a87153374d9bfd21fd237af (patch)
tree6355feddbb47f6536f755f18d9e209f0697362ca
parent69437764adcdfb47203ae76d76805fa0ed9fafff (diff)
Add spam script for profiling.
-rwxr-xr-xscripts/profiling/spam.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/scripts/profiling/spam.sh b/scripts/profiling/spam.sh
new file mode 100755
index 00000000..a4f2b8ef
--- /dev/null
+++ b/scripts/profiling/spam.sh
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+if [ $# -ne 2 ]; then
+ echo "Usage: ${0} <target_address> <number_of_messages>"
+ exit 1
+fi
+
+target_address=${1}
+missing=${2}
+echo "Will send ${missing} messages to ${target_address}..."
+
+while [[ ${success} -eq 0 && ${missing} -gt 0 ]]; do
+ echo " missing: ${missing}"
+ swaks -S \
+ -f ${target_address} \
+ -t ${target_address} \
+ -s chipmonk.cdev.bitmask.net \
+ -tlsc
+ if [ $? -eq 0 ]; then
+ missing=`expr ${missing} - 1`
+ else
+ echo " error, retrying..."
+ fi
+done