This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# TODO: subscribe SMS_RECEIVED_ACTION instead of polling | |
import androidhelper | |
import sys | |
from time import sleep | |
FORWARD_TO = '+79218887766' | |
LIMIT = 3 | |
counter = 0 | |
droid = androidhelper.Android() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
#-*- coding: utf-8 -*- | |
import sys | |
from datetime import datetime | |
import ssl | |
import urllib | |
import urllib2 | |
import json | |
import re |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- sqlite >= 3.3.8 required due to 'create ... if not exists ...' | |
CREATE TRIGGER IF NOT EXISTS update_messages AFTER UPDATE ON Messages | |
BEGIN | |
INSERT INTO Messages | |
SELECT (SELECT CAST(max(id) AS INTEGER) from Messages)+1, | |
new.is_permanent, | |
new.convo_id, | |
new.chatname, | |
new.author, | |
new.from_dispname, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# -*- coding: UTF-8 -*- | |
import re, urllib, urllib2 | |
from cookielib import CookieJar, DefaultCookiePolicy | |
class WebPage: | |
DEFAULT_HEADERS = { | |
"Content-type": "application/x-www-form-urlencoded", | |
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", | |
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.1.13) Gecko/20100914 Firefox/3.5.13", |