Closed Ran-Xing closed 3 years ago
command="sudo sed -ri 's/.*\s+%s//' /etc/hosts" % domainPattern
这句需要用到超级用户权限,如果无法确定是否使用超级权限不如改成提示用户注意hosts域名
#!/usr/bin/env python3 ############################################################# ### ### ▄▄▄▄ ▄▄▄ ▄▄▄▄ ▀ ▄ ### ▀ ▀█ ▄ ▄ ▄▄▄▄ █ ▄▀ ▀▄ ▄▄▄ ▄▄█▄▄ ### ▄▄▄▀ █▄█ █▀ ▀█ █ █ ▄ █ █ █ ### ▀█ ▄█▄ █ █ █ █ █ █ █ ### ▀▄▄▄█▀ ▄▀ ▀▄ ██▄█▀ ▄▄█▄▄ █▄▄█ ▄▄█▄▄ ▀▄▄ ### █ ### ▀ ### ### name: xcdn.py ### function: try to get the actual ip behind cdn ### date: 2016-11-05 ### author: quanyechavshuo ### blog: http://3xp10it.cc ############################################################# # usage:python3 xcdn.py www.baidu.com import time import os try: import exp10it except: os.system("pip3 install exp10it") # os.system("pip3 install exp10it -U --no-cache-dir") from exp10it import figlet2file try: figlet2file("3xp10it",0,True) except: pass time.sleep(1)
添加 #!/usr/bin/env python3 ,让系统自己找python3 路劲
这句需要用到超级用户权限,如果无法确定是否使用超级权限不如改成提示用户注意hosts域名
添加 #!/usr/bin/env python3 ,让系统自己找python3 路劲