From 38650b417599ee433890bfb6189954990db507cd Mon Sep 17 00:00:00 2001 From: Thomas Hood Date: Sun, 6 Dec 2015 07:48:59 +0000 Subject: [PATCH 1/2] Pizza Ordering script Important notes; I have no idea if this will work for all countries, I haven't tested it yet but in theory it should work. No idea how long it takes for the confirm message to come through. People in the media who've tried it before have said the service often fails so.. --- order-pizza.sh | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 order-pizza.sh diff --git a/order-pizza.sh b/order-pizza.sh new file mode 100644 index 00000000..6f4d0d50 --- /dev/null +++ b/order-pizza.sh @@ -0,0 +1,31 @@ +#!/bin/sh -e + +# So dominos.com recently added the ability to text an order.. as we all know pizza is no.1 most important hacker fuel for hacking +# Requires you to setup easy order on your country's dominos website + +# Phone numbers +MY_NUMBER='+xxx' +DOMINOS_NUMBER='+374992' + +MESSAGE="EASY ORDER" +CONFIRM="CONFIRM" + +# Send a text message +RESPONSE=`curl -fSs -u "$TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN" \ + -d "From=$MY_NUMBER" -d "To=$DOMINOS_NUMBER" -d "Body=$MESSAGE" \ + "https://api.twilio.com/2010-04-01/Accounts/$TWILIO_ACCOUNT_SID/Messages"` + + sleep 15 + +# Confirm message +RESPONSE2=`curl -fSs -u "$TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN" \ +-d "From=$MY_NUMBER" -d "To=$DOMINOS_NUMBER" -d "Body=$CONFIRM" \ +"https://api.twilio.com/2010-04-01/Accounts/$TWILIO_ACCOUNT_SID/Messages"` + + +# Log errors +if [ $? -gt 0 ]; then + echo "Failed to send SMS: $RESPONSE" + echo $RESPONSE2 + exit 1 +fi From 6a491c957bd8bb572cab77b6184bdaa93e87399c Mon Sep 17 00:00:00 2001 From: Thomas Hood Date: Sun, 6 Dec 2015 07:50:13 +0000 Subject: [PATCH 2/2] Update order-pizza.sh --- order-pizza.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/order-pizza.sh b/order-pizza.sh index 6f4d0d50..7bc416c5 100644 --- a/order-pizza.sh +++ b/order-pizza.sh @@ -22,7 +22,6 @@ RESPONSE2=`curl -fSs -u "$TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN" \ -d "From=$MY_NUMBER" -d "To=$DOMINOS_NUMBER" -d "Body=$CONFIRM" \ "https://api.twilio.com/2010-04-01/Accounts/$TWILIO_ACCOUNT_SID/Messages"` - # Log errors if [ $? -gt 0 ]; then echo "Failed to send SMS: $RESPONSE"