This modem is also sold as a MegaFon M150-2 USB dongle
Install the needed packages via opkg tool
opkg update
| /* tlsprox - minimal tls MITM transparent proxy... in go! | |
| * by @tam7t | |
| * | |
| * Usage: | |
| * If we want to MITM https://example.com first get example.com's ip address | |
| * then add localhost to /etc/hosts: | |
| * | |
| * 127.0.0.1 example.com | |
| * | |
| * > go build tlsprox.go |
| // Exemplo de requisição GET | |
| var ajax = new XMLHttpRequest(); | |
| // Seta tipo de requisição e URL com os parâmetros | |
| ajax.open("GET", "minha-url-api.com/?name=Henry&lastname=Ford", true); | |
| // Envia a requisição | |
| ajax.send(); | |
| // Cria um evento para receber o retorno. |
| package main | |
| import ( | |
| agwd "github.com/sclevine/agouti" | |
| tbwd "github.com/tebeka/selenium" | |
| "log" | |
| sgwd "sourcegraph.com/sourcegraph/go-selenium" | |
| ) | |
| // Helper for sourcegraph/go-selenium |
| package main | |
| import ( | |
| "context" | |
| "flag" | |
| "fmt" | |
| "io" | |
| "net" | |
| "net/http" | |
| "os" |
| <!-- | |
| How to use Google JS Visualization Api offline, step by step | |
| this approach might work with other libraries loaded with google.load, after all it's still JavaScript!!! | |
| --> | |
| <!DOCTYPE html> | |
| <html> |
| import asyncio | |
| import base64 | |
| import hashlib | |
| from japronto.app import Application | |
| class NaiveWsBaseProtocol(asyncio.Protocol): | |
| @staticmethod | |
| def accept(key): |
| import time | |
| import tornado | |
| from tornado.concurrent import run_on_executor | |
| from concurrent.futures import ThreadPoolExecutor # `pip install futures` for python2 | |
| from tornado.httpserver import HTTPServer | |
| from tornado.ioloop import IOLoop | |
| from tornado.web import Application, RequestHandler | |
| from tornado import gen |
| # vim: fileencoding=utf-8 | |
| import time, signal | |
| from tornado import web, ioloop, options, httpserver | |
| _SHUTDOWN_TIMEOUT = 30 | |
| def make_safely_shutdown(server): | |
| io_loop = server.io_loop or ioloop.IOLoop.instance() | |
| def stop_handler(*args, **keywords): | |
| def shutdown(): |
| ''' | |
| Application to demonstrate testing tornado websockets. | |
| Try it wiith: python -m tornado.testing discover | |
| ''' | |
| from tornado import testing, httpserver, gen, websocket | |
| from ws import APP |