• Home
  • About
  • Archives
  • Book
  • Contact me
  • Photos
  • Projects
  • Talks
Subscribe: Posts | Comments | E-mail
  • ArticlesArticles which I authored
  • GSOCGoogle Summer of code archives
  • HacksExperiments
  • LifeIn and around life
  • Open SourceFree and Open Source Software
  • PardusContributions with Pardus Project

Sarath Lakshman

Posts Tagged ‘free sms’


Posted on April 27, 2010 - by Sarath

SMSBuddy v0.1 release [zombie]

Hey all.

smsbuddy icon Here comes the Free SMS sender application with Qt frontend, python and Wat2SMS.com web backend. This is based on my recent free sms commandline script.

Try this out and comment. Look at the screenshots.

From life.blog
From life.blog
From life.blog
From life.blog
From life.blog
From life.blog

Once you install the SMSbuddy, you can execute it using the command, ‘smsbuddy’
During first run, it will ask for login username and password. You can issue you Way2SMS.com username and password. From the very next run, it will not prompt for authentication. Once if you need to change the account used by default, use File->Login to change the default account.
From File->Contacts option, you can add contacts of your friends with name and mobile number.
Once the SMSbuddy is started, it initiates login. You can see status message in the status bar. You can select the contacts you added using contacts dialog and send SMS.

Download it from here code removed

I wrote this being lazy at home today and having Hartal celebration :P So don’t expect any code quality.

Have fun :)

Looking forward to your comments.

UPDATE1:
SMSBuddy got a new icon. Thanks to Hiran for the icon. Please note that I have updated the download url. Please the URL above. Now the icon appears in Applications -> Accessories menu and in the desktop. Have fun.


UPDATE2:
I went through the “Terms and conditions” of way2sms.com.It says users are not possible to make derivative works or decompile based on this sms service. So it violates the license agreement and hence I will not be possible to continue with SMSBuddy. Hence I am removing the code and will not be distributing it anymore.


Posted on April 26, 2010 - by Sarath

Send free SMS from commandline

Disclaimer: My intention of writing this post and publishing the code that uses a proprietary service is not to provide a derivative work based on way2sms.com, but for educational purpose only. The code given below clearly illustrates how python like intuitive programming language can be used to create interesting interactive web based applications. Use the following code for educational purpose only.

Last few days I had negative balance on my phone and I was very lazy to go out for a recharge. I couldn’t send any sms due to underbalance. So I had to rely on Way2SMS.com for free sms. The web interface with lots of ads and stuff irritated me. I thought it would be great if I have some utility/command that can perform the sms sending task for me :D

So I wrote a python script for sending free sms from commandline. I am enjoying it.

Here it is. Have a try :)

Instructions:
1. Go to www.way2sms.com, Create an account
2. Create a text file ~/.smsconf and write following lines in it

username=your_mob_no_as_user
password=password_you_registered

3. Copy the following code to sms_send.py

$ chmod a+x sms_send.py
#!/usr/bin/env python
#Author: Sarath Lakshman ( sarathlakshman [at] slynux.com )

import urllib2,urllib,re,os

opener=urllib2.build_opener(urllib2.HTTPCookieProcessor())

customer_id=""
first_time=True
configs={}

config_handle = file(os.path.expanduser('~/.smsconf'),"r+")
config_lines = config_handle.readlines()
if len(config_lines) > 2:
    first_time=False

for line in config_lines:
    splits = line.strip().split('=')
    configs[splits[0]]=splits[1]


customer_id_regex = re.compile("custfrom[0-9]*")
success_re = re.compile("Message has been submitted successfully")

print "Logging in"

login=urllib.urlencode({'username':configs["username"], 'password':configs["password"],'login':'Login'})

opener.open("http://wwwo.way2sms.com//auth.cl", login)

if first_time:

    print "First run: Pulling customer identity..."
    handle=opener.open("http://wwwo.way2sms.com//jsp/InstantSMS.jsp?val=0")
    data=handle.read()
    customer_id=customer_id_regex.findall(data)[0]
    config_handle.write("custid=%s" %customer_id)

   
else:
    customer_id=configs["custid"]

config_handle.close()

print
mobno=raw_input("Enter mobile no: ")
message=raw_input("Enter message: ")
print

print "Sending.."


send_msg=urllib.urlencode({'HiddenAction':'instantsms', 'Action':customer_id,'MobNo':mobno,'textArea':message})
handle=opener.open("http://wwwo.way2sms.com//FirstServletsms?custid=",send_msg)


if len(success_re.findall(handle.read())) == 1:
    print "Message has been submitted successfully"
else:
    print "Could not complete your request"
print

4. Try it out.

$ ./sms_send.py
Logging in

Enter mobile no: xxxxxxxxxx
Enter message: cool

Sending..
Message has been submitted successfully

Looking forward to your comments :)

TODO: Here is your task. Write a GTK/Qt frontend for this.



  • About

    Sarath Lakshman is a Hactivist of Free and Open Source Software from Kerala.
    Read more about him.
  • My Book

    Solve real-world shell scripting problems with over 110 simple but incredibly effective recipes.



  • Follow

  • Random Photos

  • Tweets

    • Preparing for your first-job interviews:
      http://t.co/SBdRl4At
      2011/11/30 23:31
    • is down. Having some issues with hosting account. I will update when it is back.
      http://t.co/Hj3u1qm1
      2011/11/29 11:59
    • Blog post: Preparing for your first-job interviews:
      http://t.co/SBdRl4At
      2011/11/29 09:47
    • Packt Publishers interviewed me.
      http://t.co/CMrvOPh
      2011/09/08 00:21
  • Calendar

    May 2012
    M T W T F S S
    « Nov    
     123456
    78910111213
    14151617181920
    21222324252627
    28293031  
  • Archives

  • Blogroll

    • FOSS.IN
    • GNU Vision Blog
    • Hiran Effects
    • J5′s blog
    • Pardus planet
    • Praveen Arimbrathodiyil’s blog
    • Santhosh Thottingal
    • SLYNUX GNU Operating System
    • St Josephs HSS, Thalassery – Alumni
    • Swaroop CH
    • TT’s Jottings-Blog of VU2SWX
  • Tags

    algorithm automation bangalore bash bash scripting bug code college contribution define development facebook fedora foss fossmeet freedom free sms freesoftware Friends fun gnome gnu google google summer of code hack hacking hacks internet interview joy kde 4.1.2 kochi Life linux mec microsoft new year night nitc pardus pitivi python script summer of code video editor
Copyright © 2005 - 2010 Sarath Lakshman
Powered by Wordpress 3.04