3xp10it / xcdn

Try to find out the real ip behind cdn
335 stars 114 forks source link

修改每次重新安装插件 #8

Closed Ran-Xing closed 3 years ago

Ran-Xing commented 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 路劲