Team BlueWater Game Online Tutorial's
Bine ati venit la Team-BlueWater!!Tutorial's 4 all Games!

[Sursa] Python Skype Bot

Go down

[Sursa] Python Skype Bot

Post  Karma on Sun Jul 31, 2011 7:44 am

// Skype Bot :)) need a Skype4Py API and python 2.6

import Skype4Py, datetime, re, httplib
from urllib import urlencode

skype = Skype4Py.Skype()

def smsbox(number, text):
    sendname = 'Secret'
    params = urlencode({'action': 'send','numTo': int(number), 'text': str(text), 'numFrom': str(sendname), 'numFromNr': str(number)})
    headers = {"Content-type": "application/x-www-form-urlencoded","Accept": "text/plain"}
    conns = httplib.HTTPConnection("")
    conns.request("POST", "/smsbox.sender.proces?action=send", params, headers)

def md5search(md5):
    conn = httplib.HTTPConnection("[You must be registered and logged in to see this link.]
    conn.request("GET", "?q="+ md5)
    response = conn.getresponse()
    data =
    result = re.findall('<div id="result" >(.+?)</div>', data)

    return result

def message(msg, status):
    print 'msg: '+ msg.Body+':'+status
    print 'user: '+ msg.FromHandle
    if status == 'SENDING' or status == 'READ':

        if'.date', msg.Body):
            print '>> find date!'
            today =
            skype.SendMessage(msg.FromHandle, 'Today is '+str(today))

        elif'.md5', msg.Body):
            md5s = msg.Body.split('md5')
            md5 = md5s[1].strip()
            result = md5search(md5)
            skype.SendMessage(msg.FromHandle, 'MD5: '+str(result[0]))

        elif'.send', msg.Body):
            send = msg.Body.strip('.send')
            number = send.split(' ')[1]
            text = send.split(' ')[2:-1]
            smsbox(number, text)

skype.OnMessageStatus = message

while(True): pass

Mesaje : 1092
Data de inscriere : 2011-04-22
Varsta : 27
Localizare : Craiova

View user profile

Back to top Go down

Back to top

- Similar topics

Permissions in this forum:
You cannot reply to topics in this forum