def home(): """ Main page :return: """ if my_wlan0_ip() not in request.url_root and my_eth0_ip( ) not in request.url_root: return redirect("http://" + my_wlan0_ip()) ip_address = request.remote_addr arp_address = read_arp_table()[ip_address] q = sessiondb.get_key(ip_address, arp_address) if not q: k = addrgen.gen_eckey() log.debug(k) if shortcuts["no_ssl"]: adds = ["abcdefg", "1234567"] else: adds = addrgen.get_addr(k) sessiondb.create_key(pub_key=adds[0], priv_key=adds[1], ip_address=ip_address, mac_address=arp_address) bitcoin_address = adds[0] else: logging.debug("Found an entry", q) bitcoin_address = q.pub_key payment_options = sessiondb.get_prices() return render_template('index.html', ip=ip_address, arp=arp_address, bitcoinaddress=bitcoin_address, paymentoptions=payment_options)
def home(): """ Main page :return: """ if my_wlan0_ip() not in request.url_root and my_eth0_ip() not in request.url_root: return redirect("http://" + my_wlan0_ip()) ip_address = request.remote_addr arp_address = read_arp_table()[ip_address] q = sessiondb.get_key(ip_address, arp_address) if not q: k = addrgen.gen_eckey() log.debug(k) if shortcuts["no_ssl"]: adds = ["abcdefg","1234567"] else: adds = addrgen.get_addr(k) sessiondb.create_key(pub_key=adds[0], priv_key=adds[1], ip_address=ip_address, mac_address=arp_address) bitcoin_address = adds[0] else: logging.debug("Found an entry", q) bitcoin_address = q.pub_key payment_options = sessiondb.get_prices() return render_template('index.html', ip=ip_address, arp=arp_address, bitcoinaddress=bitcoin_address, paymentoptions=payment_options)
def catch_all(path): return redirect("http://" + my_wlan0_ip() )
def catch_all(path): return redirect("http://" + my_wlan0_ip())