#!/data/data/com.termux/files/usr/bin/python3 from subprocess import Popen, DEVNULL, PIPE from json import loads as read_json from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer as http4_server_do_not_use from urllib.parse import quote, unquote from socket import AF_INET6 from threading import Thread from time import sleep from cgi import FieldStorage from os import kill, getpid sms_list_program = '/data/data/com.termux/files/usr/bin/termux-sms-list' sms_send_program = '/data/data/com.termux/files/usr/bin/termux-sms-send' contacts_list_program = '/data/data/com.termux/files/usr/bin/termux-contact-list' class HTTPServer (http4_server_do_not_use): ''' This block is just to have a IPv6 web server This is not IPv6 only, the server also accepts IPv4 clients ''' address_family = AF_INET6 def html_header (title = 'No title'): return ('\n\n\t' + title + '\n' + '''\t''' + '\n') def html_title (text): return ('\n\t

' + text + '

') def html_iframe (src, height = '150', width = '300', name = None, style = 'border:none;'): r = '