google hosts不解释,googlehosts解释,#!/usr/bin/p
文章由Byrx.net分享于2019-03-23 05:03:30
google hosts不解释,googlehosts解释,#!/usr/bin/p
#!/usr/bin/python3#coding=utf-8import osimport sysimport urllib.requestreq_hosts=urllib.request.urlopen("https://raw.githubusercontent.com/vokins/simpleu/master/hosts")content=req_hosts.read().decode("utf8")try: f_hosts=open("/etc/hosts","w") f_hosts.write(content)except PermissionError: args = [sys.executable] + sys.argv #os.execlp('su', 'su', '-c', ' '.join(args)) os.execlp('sudo', 'sudo', *args)f_hosts.close()print("Write hosts success!")
相关内容
- python生成字母验证图片,,fromPILimpor
- python实现发送邮件,python发送邮件,None
- python 学习,python,#!/usr/bin/e
- 列表的顺序访问与随机访问,列表顺序访问,class Tobj(
- python3调用百度翻译api的命令行翻译工具,python3api,#!
- python-pcap模块解析mac地址,python-pcap解析mac,import pcap
- python多线程ping和arpping扫描工具,pythonarpping,#/usr/bin/e
- 用PyQt实现透明桌面时钟小部件!,pyqt桌面时钟部件,#c
- python实现简单的soap客户端,pythonsoap客户端,# $Id: testq
- Python实现简单的web服务器,pythonweb服务器,本代码运行后
评论关闭