Created
May 24, 2012 18:34
-
-
Save RobSpectre/2783355 to your computer and use it in GitHub Desktop.
$50 SMS poll winner
This file contains hidden or 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
# A SMS Ballot Stuffer | |
# Warning: this code will cost you fifty dollars. | |
from twilio.rest import TwilioRestClient | |
client = TwilioRestClient("ACxxxxxxxxxxx", "yyyyyyyyyyyyyy") | |
target_number = "+15558675309" | |
confirm = raw_input("Are you seriously going to pay $50 to win a SMS poll? [y/n]") | |
if confirm == "y": | |
print "Arright dude. Whatever you say..." | |
for i in range(50): | |
number = client.phone_numbers.purchase(area_code="415") | |
client.sms.messages.create(from_=number.phone_number, to=target_number, body="1") | |
print "%i votes: cast from %s..." % (i, number.phone_number) | |
else: | |
print "Good thing." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment