File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change 1
- #!/usr/bin/python
2
-
3
1
import urllib2
4
2
import cookielib
5
3
from getpass import getpass
6
4
import sys
7
5
8
- username = raw_input ('Enter mobile number:' )
6
+ username = input ('Enter mobile number:' )
9
7
passwd = getpass ()
10
- message = raw_input ('Enter Message:' )
8
+ message = input ('Enter Message:' )
11
9
#Fill the list with Recipients
12
10
x = raw_input ('Enter Mobile numbers seperated with comma:' )
13
11
num = x .split (',' )
27
25
try :
28
26
usock = opener .open (url , data )
29
27
except IOError :
30
- print "Error while logging in."
28
+ print ( "Error while logging in." )
31
29
sys .exit (1 )
32
30
33
31
41
39
send_sms_data = 'ssaction=ss&Token=' + jession_id + '&mobile=' + number + '&message=' + message + '&msgLen=136'
42
40
sms_sent_page = opener .open (send_sms_url ,send_sms_data )
43
41
except IOError :
44
- print "Error while sending message"
42
+ print ( "Error while sending message" )
45
43
46
44
sys .exit (1 )
47
45
print "SMS has been sent."
You can’t perform that action at this time.
0 commit comments