import socket
def ip_check():
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.connect(('8.8.8.8', 80))
ip = s.getsockname()[0]
s.close()
ip_list=['192.168.1.101','192.168.1.102']
print(ip in ip_list)
if ip in ip_list:
yhls_search()
else:
pywebio.output.put_text('对不起您没有授权,请联系...')
本文来自博客园,作者:o0o0o9,转载请注明原文链接:https://www.cnblogs.com/o0o0o9/p/17214622.html