Last active
April 22, 2016 12:36
-
-
Save tatocaster/8529513 to your computer and use it in GitHub Desktop.
magtifun sender from terminal (python)
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
import urllib,urllib2,cookielib | |
cookie_jar = cookielib.CookieJar() | |
opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cookie_jar)) | |
urllib2.install_opener(opener) | |
url_1 = 'http://www.magtifun.ge/index.php?page=11&lang=ge' | |
values = dict(password='Password', user='User', act='1') | |
data = urllib.urlencode(values) | |
req = urllib2.Request(url_1, data) | |
rsp = urllib2.urlopen(req) | |
url_2 = 'http://www.magtifun.ge/scripts/sms_send.php' | |
number = input('Type a number here: ') | |
number = int(number) | |
body = raw_input('message body: ') | |
values = dict(recipients=number, message_body=body) | |
data = urllib.urlencode(values) | |
req = urllib2.Request(url_2,data) | |
rsp = urllib2.urlopen(req) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Why not a repo?