Skype Bot

By armagidon on Mar 27, 2010

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("")
    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


Sign in to comment.
armagidon   -  Mar 27, 2010

thanks.. ;)

Hawkee   -  Mar 27, 2010

You saved this as an mIRC snippet, not Python.

Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.