Skip to content

Instantly share code, notes, and snippets.

@tatocaster
Last active April 22, 2016 12:36
Show Gist options
  • Save tatocaster/8529513 to your computer and use it in GitHub Desktop.
Save tatocaster/8529513 to your computer and use it in GitHub Desktop.
magtifun sender from terminal (python)
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)
@tatocaster
Copy link
Author

არის უკვე https://github.com/tatocaster/magtifun ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment