2015年6月

2015年6月28日扫描可用双拼域名

前几天分享了跑未被注册双拼域名的代码,这个我自己跑了大概三天左右跑出了结果,也一起分享出来吧。

到现在还没有被注册的双拼域名果然都不太能用,不过这些里面能创造出一个有意义的也说不定。

changnue.com
chaochuai.com
chengchuai.com
chengzhuai.com
chongchuai.com
chuaiceng.com
chuaichan.com
chuaichui.com
chuaien.com
chuaiga.com
chuaiken.com
chuailun.com
chuaimie.com
chuaisen.com
chuaiyo.com
chuanchuai.com
chuanzhuai.com
chuangnue.com
chuinue.com
chuipie.com
chunzhuai.com
chuoshuan.com
couchuai.com
cuanbin.com
cuannue.com
cuanpie.com
cuanqia.com
cunzhuai.com
danchuai.com
danzhuai.com
diaochuai.com
dienue.com
dingnue.com
diuchuai.com
diunue.com
diuzhuai.com
dongchuai.com
douchuai.com
duanchuai.com
duanzhuai.com
dunnue.com
dunzhuai.com
fochuai.com
founue.com
gacuan.com
gazhuai.com
gannue.com
gangchuai.com
gaochuai.com
genchuai.com
gengchuai.com
gengnue.com
gongchuai.com
guachuai.com
guaichuai.com
guainue.com
guanchuai.com
guannue.com
guangchuai.com
guangnue.com
guangzhuai.com
guichuai.com
gunchuai.com
gunnue.com
gunzhuai.com
hangchuai.com
hangnue.com
hangzhuai.com
heichuai.com
hengchuai.com
hengzhuai.com
hongzhuai.com
houchuai.com
huainue.com
huaipie.com
huanchuai.com
huanzhuai.com
huanglia.com
huangnue.com
huangpie.com
huangzhuai.com
hunzhuai.com
huozhuai.com
jianchuai.com
jianzhuai.com
jiangnue.com
jiangpie.com
jiaonue.com
jingnue.com
jingzhuai.com
jiongchuai.com
jiongnue.com
jiongpie.com
jiongreng.com
jiongshuan.com
jiongzhuai.com
juannue.com
juanzhuai.com
juechuai.com
junchuai.com
junnue.com
kachuai.com
kangzhuai.com
kenchuai.com
kennue.com
kenzhuai.com
kengchuai.com
kengnue.com
kengreng.com
kengshuan.com
kongchuai.com
konglia.com
kouchuai.com
kouzhuai.com
kuachuai.com
kuanue.com
kuanchuai.com
kuannue.com
kuanshuan.com
kuanzhuai.com
kuichuai.com
kuilia.com
kuinue.com
kuizhuai.com
kunchuai.com
kuochuai.com
kuolia.com
kuonue.com
kuozhuai.com
leichuai.com
lengchuai.com
lenglia.com
liachuai.com
liadiao.com
liahuai.com
lialeng.com
lianue.com
liazhuai.com
lianchuai.com
liangchuai.com
liaochuai.com
liaonue.com
liaozhuai.com
liechuai.com
liezhuai.com
liuchuai.com
luanchuai.com
luanlia.com
luechuai.com
lunchuai.com
lunzhuai.com
luozhuai.com
mangchuai.com
mangnue.com
mangzhuai.com
mechuai.com
mecuan.com
mezhuai.com
menchuai.com
mianzhuai.com
miechuai.com
mieshuan.com
miezhuai.com
minchuai.com
miuchuai.com
miushuai.com
miuzhuai.com
mouchuai.com
mouzhuai.com
naichuai.com
nanzhuai.com
nangdiu.com
nangheng.com
nanghuang.com
nanglia.com
nangniang.com
nangnin.com
nangnuan.com
nangreng.com
nangshua.com
nangshuai.com
nangshuan.com
nangshun.com
nangweng.com
nangza.com
nangzhua.com
nangzhuai.com
nangzhun.com
naochuai.com
naozhuai.com
nechuai.com
necuan.com
neichuai.com
neinue.com
nenchuai.com
nenzhuai.com
nengchuai.com
nengzhuai.com
nianchuai.com
niannue.com
nianzhuai.com
niangcuan.com
niangdiu.com
niangmie.com
niangnue.com
niangpie.com
niangran.com
niangreng.com
niangzhuai.com
niaochuai.com
niaonue.com
niechuai.com
nienue.com
nieshuan.com
ninchuai.com
nincuan.com
ningchuai.com
ningcuan.com
ningzhuai.com
nongchuai.com
nongnue.com
nongzhuai.com
nuanchuai.com
nuanzhuai.com
nuebeng.com
nuebiao.com
nuebin.com
nuecang.com
nueceng.com
nuechai.com
nuechao.com
nuechen.com
nuechuai.com
nuechuan.com
nuechuang.com
nuechui.com
nuecong.com
nuecuan.com
nuecui.com
nuecuo.com
nuedang.com
nuedeng.com
nuedie.com
nueding.com
nuediu.com
nuedong.com
nueduan.com
nuedui.com
nuedun.com
nuegai.com
nuegeng.com
nueguan.com
nueguang.com
nuegun.com
nuehang.com
nueheng.com
nuehong.com
nuejiang.com
nuejiong.com
nuejun.com
nuekong.com
nuekuai.com
nuekuo.com
nuelai.com
nueliang.com
nueliu.com
nuelou.com
nuemang.com
nuemian.com
nuemiao.com
nuemie.com
nuemou.com
nuenang.com
nuenei.com
nueneng.com
nueniang.com
nuenin.com
nuening.com
nuenong.com
nuepang.com
nuepen.com
nuepeng.com
nuepie.com
nueqia.com
nueqiang.com
nueqiao.com
nueqiong.com
nueran.com
nuerang.com
nuerao.com
nuereng.com
nueruan.com
nuerui.com
nuerun.com
nueruo.com
nuesang.com
nueseng.com
nueshai.com
nueshan.com
nueshao.com
nuesheng.com
nueshua.com
nueshuai.com
nueshuan.com
nueshun.com
nueshuo.com
nuesong.com
nuesuan.com
nuetang.com
nuetiao.com
nuetie.com
nuetuo.com
nueweng.com
nuexuan.com
nueyong.com
nuezeng.com
nuezhong.com
nuezhua.com
nuezhuai.com
nuezhuan.com
nuezhun.com
nuezhuo.com
nuezuan.com
nuochuai.com
nuozhuai.com
pangchuai.com
pangcuan.com
paochuai.com
peichuai.com
penchuai.com
pencuan.com
pengchuai.com
pengnue.com
pengzhuai.com
pianchuai.com
pianreng.com
pianzhuai.com
piaonue.com
pieceng.com
piechuai.com
pienue.com
pierao.com
piezhua.com
piezhuai.com
pingchuai.com
qiangchuai.com
qiaochuai.com
qiaonue.com
qiaozhuai.com
qienue.com
qingchuai.com
qiongchuai.com
qiongnue.com
quanchuai.com
quechuai.com
quezhuai.com
rangchuai.com
rangnang.com
rangnue.com
rangshuan.com
rangzhuai.com
raochuai.com
renchuai.com
rengchuai.com
rengcuan.com
rengnue.com
rouchuai.com
ruanchuai.com
ruannue.com
ruanpie.com
ruanzhuai.com
ruichuai.com
ruinue.com
ruizhuai.com
runzhuai.com
ruochuai.com
ruonue.com
sachuai.com
sanchuai.com
sanzhuai.com
sangchuai.com
sanglia.com
sangnue.com
sangshuan.com
sangzhuai.com
saochuai.com
senchuai.com
senzhuai.com
sengchuai.com
sengcuan.com
sengcuo.com
senglia.com
sengnue.com
sengqiong.com
sengreng.com
sengshuai.com
sengshuan.com
sengtun.com
sengzei.com
sengzhua.com
sengzhuai.com
shachuai.com
shazhuai.com
shaichuai.com
shainue.com
shaipie.com
shaiseng.com
shanchuai.com
shanzhuai.com
shaochuai.com
shaonue.com
shengchuai.com
shuanue.com
shuapie.com
shuaichuai.com
shuainang.com
shuainue.com
shuaireng.com
shuanceng.com
shuancuan.com
shuanken.com
shuankuang.com
shuanleng.com
shuanmie.com
shuanmou.com
shuannang.com
shuannue.com
shuanrang.com
shuanreng.com
shuansuan.com
shuansun.com
shuantun.com
shuanweng.com
shuanzen.com
shuanzhang.com
shuanzhua.com
shuanzhuai.com
shuangzen.com
shuangzhuai.com
shuichuai.com
shuinue.com
shunchuai.com
shunnue.com
songzhuai.com
suanchuai.com
suannue.com
suanzhuai.com
suichuai.com
suinue.com
suizhuai.com
sunchuai.com
sunzhuai.com
suochuai.com
tanchuai.com
tanzhuai.com
tangchuai.com
tangnue.com
tangzhuai.com
tengchuai.com
tengnue.com
tengzhuai.com
tiaochuai.com
tiaonue.com
tiaozhuai.com
tiechuai.com
tiezhuai.com
tingnue.com
tongnue.com
tuinue.com
tunchuai.com
tunnue.com
tunzhuai.com
tuochuai.com
wengchuai.com
wenglia.com
wengnue.com
wengpie.com
wengzhuai.com
xingchuai.com
xingzhuai.com
xiongnue.com
xuannue.com
yanchuai.com
yanzhuai.com
yozhuai.com
yongzhuai.com
zachuai.com
zaichuai.com
zanchuai.com
zangzhuai.com
zeichuai.com
zeinin.com
zenchuai.com
zenzhuai.com
zengchuai.com
zengnue.com
zengshuan.com
zengzhuai.com
zhachuai.com
zhazhuai.com
zhainue.com
zhanzhuai.com
zhangchuai.com
zhangcuan.com
zhangpie.com
zhangzhuai.com
zhechuai.com
zhengnue.com
zhouchuai.com
zhouzhuai.com
zhuachuai.com
zhuanue.com
zhuaiang.com
zhuaiben.com
zhuaibeng.com
zhuaibie.com
zhuaibin.com
zhuaiceng.com
zhuaichai.com
zhuaichan.com
zhuaichen.com
zhuaichui.com
zhuaichun.com
zhuaicong.com
zhuaicou.com
zhuaicuan.com
zhuaicuo.com
zhuaiduan.com
zhuaien.com
zhuaiga.com
zhuaigan.com
zhuaijiong.com
zhuaiken.com
zhuaikeng.com
zhuaikui.com
zhuaikun.com
zhuaileng.com
zhuailia.com
zhuailuan.com
zhuailue.com
zhuailun.com
zhuaimie.com
zhuaimiu.com
zhuaimou.com
zhuainang.com
zhuainei.com
zhuainen.com
zhuaineng.com
zhuainie.com
zhuainin.com
zhuaining.com
zhuainuan.com
zhuaipei.com
zhuaipie.com
zhuaiqiao.com
zhuaiqin.com
zhuaiqiong.com
zhuairan.com
zhuairang.com
zhuairao.com
zhuaireng.com
zhuairuo.com
zhuaisang.com
zhuaisen.com
zhuaishai.com
zhuaishuan.com
zhuaishuang.com
zhuaishun.com
zhuaiteng.com
zhuaiwai.com
zhuaizang.com
zhuaizao.com
zhuaizei.com
zhuaizen.com
zhuaizeng.com
zhuaizha.com
zhuaizheng.com
zhuaizhong.com
zhuaizhou.com
zhuaizhua.com
zhuaizhui.com
zhuaizhun.com
zhuanchuai.com
zhuangchuai.com
zhuangnue.com
zhuichuai.com
zhuicuan.com
zhunchuai.com
zhunnue.com
zhuochuai.com
zhuozhuai.com
zongchuai.com
zongzhuai.com
zouzhuai.com
zuanchuai.com
zuanzhuai.com
zunchuai.com
zuochuai.com

遍历二字汉字组合拼音域名是否可注册

在知乎上搜索域名相关问题的时候发现“街旁”这个名字便是遍历所有双字拼音可注册的域名后被赋予其意义的。我觉得这是个很靠谱的找域名的方法于是自己写了段代码来实现该功能。

<?php
set_time_limit(0);

$interval = 1; //轮询时休息秒数,频率太快会被封

$pinyin = ["a","ai","an","ang","ao","ba","bai","ban","bang","bao","bei","ben","beng","bi","bian","biao","bie","bin","bing","bo","bu","ca","cai","can","cang","cao","ce","ceng","cha","chai","chan","chang","chao","che","chen","cheng","chi","chong","chou","chu","chuai","chuan","chuang","chui","chun","chuo","ci","cong","cou","cu","cuan","cui","cun","cuo","da","dai","dan","dang","dao","de","deng","di","dian","diao","die","ding","diu","dong","dou","du","duan","dui","dun","duo","e","en","er","fa","fan","fang","fei","fen","feng","fo","fou","fu","ga","gai","gan","gang","gao","ge","gei","gen","geng","gong","gou","gu","gua","guai","guan","guang","gui","gun","guo","ha","hai","han","hang","hao","he","hei","hen","heng","hong","hou","hu","hua","huai","huan","huang","hui","hun","huo","ji","jia","jian","jiang","jiao","jie","jin","jing","jiong","jiu","ju","juan","jue","jun","ka","kai","kan","kang","kao","ke","ken","keng","kong","kou","ku","kua","kuai","kuan","kuang","kui","kun","kuo","la","lai","lan","lang","lao","le","lei","leng","li","lia","lian","liang","liao","lie","lin","ling","liu","long","lou","lu","lv","luan","lue","lun","luo","ma","mai","man","mang","mao","me","mei","men","meng","mi","mian","miao","mie","min","ming","miu","mo","mou","mu","na","nai","nan","nang","nao","ne","nei","nen","neng","ni","nian","niang","niao","nie","nin","ning","niu","nong","nu","nv","nuan","nue","nuo","o","ou","pa","pai","pan","pang","pao","pei","pen","peng","pi","pian","piao","pie","pin","ping","po","pu","qi","qia","qian","qiang","qiao","qie","qin","qing","qiong","qiu","qu","quan","que","qun","ran","rang","rao","re","ren","reng","ri","rong","rou","ru","ruan","rui","run","ruo","sa","sai","san","sang","sao","se","sen","seng","sha","shai","shan","shang","shao","she","shen","sheng","shi","shou","shu","shua","shuai","shuan","shuang","shui","shun","shuo","si","song","sou","su","suan","sui","sun","suo","ta","tai","tan","tang","tao","te","teng","ti","tian","tiao","tie","ting","tong","tou","tu","tuan","tui","tun","tuo","wa","wai","wan","wang","wei","wen","weng","wo","wu","xi","xia","xian","xiang","xiao","xie","xin","xing","xiong","xiu","xu","xuan","xue","xun","ya","yan","yang","yao","ye","yi","yin","ying","yo","yong","you","yu","yuan","yue","yun","za","zai","zan","zang","zao","ze","zei","zen","zeng","zha","zhai","zhan","zhang","zhao","zhe","zhen","zheng","zhi","zhong","zhou","zhu","zhua","zhuai","zhuan","zhuang","zhui","zhun","zhuo","zi","zong","zou","zu","zuan","zui","zun","zuo"];

$suffix = ['com', 'me', 'cn', 'net', 'org', 'io', 'cc', 'co', 'xyz'];

$avail = [];
foreach ($pinyin as $one) {
    foreach ($pinyin as $two) {
        $domain = $one . $two . '.com';
        if (isAvail($domain, 'cnz')) {
            echo PHP_EOL . $domain . PHP_EOL;
            $avail[] = $domain;
        } else {
            echo 'x';
        }
        sleep($interval);
    }
}

function isAvail($domain, $type = 'net') {
    if ($type == 'net') {
        return isAvailNet($domain);
    } elseif ($type = 'cnz') {
        return isAvailCnz($domain);
    }
}

//通过万网接口查询是否可用
function isAvailNet($domain) {
    $api = 'http://panda.www.net.cn/cgi-bin/check.cgi?area_domain=';
    $url = $api . $domain;
    $res = simplexml_load_string(file_get_contents($url));
    $code = substr((string) $res->original, 0, 3);
    if ($code == '210') {
        return true;
    } else {
        return false;
    }
}

//通过cnz接口查询是否可用
function isAvailCnz($domain) {
    $api = 'http://www.cnz.co/domain-registration/domain.php?action=caajax&domain_name=';
    $url = $api . $domain;
    $res = json_decode(file_get_contents($url));
    if ($res->status == 'available') {
        return true;
    } else {
        return false;
    }
}

file_put_contents('E:\domain.json', json_encode($avail));

经过一些修改后,我把代码改成了可以跑任意自定义字符组合,任意字符出现次数的域名是否被注册:

<?php
set_time_limit(0);

$pinyin = ["a","ai","an","ang","ao","ba","bai","ban","bang","bao","bei","ben","beng","bi","bian","biao","bie","bin","bing","bo","bu","ca","cai","can","cang","cao","ce","ceng","cha","chai","chan","chang","chao","che","chen","cheng","chi","chong","chou","chu","chuai","chuan","chuang","chui","chun","chuo","ci","cong","cou","cu","cuan","cui","cun","cuo","da","dai","dan","dang","dao","de","deng","di","dian","diao","die","ding","diu","dong","dou","du","duan","dui","dun","duo","e","en","er","fa","fan","fang","fei","fen","feng","fo","fou","fu","ga","gai","gan","gang","gao","ge","gei","gen","geng","gong","gou","gu","gua","guai","guan","guang","gui","gun","guo","ha","hai","han","hang","hao","he","hei","hen","heng","hong","hou","hu","hua","huai","huan","huang","hui","hun","huo","ji","jia","jian","jiang","jiao","jie","jin","jing","jiong","jiu","ju","juan","jue","jun","ka","kai","kan","kang","kao","ke","ken","keng","kong","kou","ku","kua","kuai","kuan","kuang","kui","kun","kuo","la","lai","lan","lang","lao","le","lei","leng","li","lia","lian","liang","liao","lie","lin","ling","liu","long","lou","lu","lv","luan","lue","lun","luo","ma","mai","man","mang","mao","me","mei","men","meng","mi","mian","miao","mie","min","ming","miu","mo","mou","mu","na","nai","nan","nang","nao","ne","nei","nen","neng","ni","nian","niang","niao","nie","nin","ning","niu","nong","nu","nv","nuan","nue","nuo","o","ou","pa","pai","pan","pang","pao","pei","pen","peng","pi","pian","piao","pie","pin","ping","po","pu","qi","qia","qian","qiang","qiao","qie","qin","qing","qiong","qiu","qu","quan","que","qun","ran","rang","rao","re","ren","reng","ri","rong","rou","ru","ruan","rui","run","ruo","sa","sai","san","sang","sao","se","sen","seng","sha","shai","shan","shang","shao","she","shen","sheng","shi","shou","shu","shua","shuai","shuan","shuang","shui","shun","shuo","si","song","sou","su","suan","sui","sun","suo","ta","tai","tan","tang","tao","te","teng","ti","tian","tiao","tie","ting","tong","tou","tu","tuan","tui","tun","tuo","wa","wai","wan","wang","wei","wen","weng","wo","wu","xi","xia","xian","xiang","xiao","xie","xin","xing","xiong","xiu","xu","xuan","xue","xun","ya","yan","yang","yao","ye","yi","yin","ying","yo","yong","you","yu","yuan","yue","yun","za","zai","zan","zang","zao","ze","zei","zen","zeng","zha","zhai","zhan","zhang","zhao","zhe","zhen","zheng","zhi","zhong","zhou","zhu","zhua","zhuai","zhuan","zhuang","zhui","zhun","zhuo","zi","zong","zou","zu","zuan","zui","zun","zuo"];
$number = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'];
$char = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'];

$interval = 100000; //轮询时休息微秒数,频率太快会被封,1000000为1秒
$suffix = '.in';
$api = 'dcp';
$elem = array_merge($char, $number);
$repeat = 3;
$avail = [];

$avail = findDomain($elem, $repeat, $suffix, $avail, $api, $interval);
$time = time();
file_put_contents("domain{$time}.json", json_encode($avail));

function findDomain($elem, $repeat = 2, $suffix = '.com', &$avail = [], $api = 'net', $interval = 1) {
    $repeat--;

    foreach ($elem as $e) {
        $domain = $e . $suffix;
        if ($repeat === 0) {
            if (isAvail($domain, $api)) {
                echo PHP_EOL . $domain . PHP_EOL;
                $avail[] = $domain;
            } else {
                echo 'x';
            }
        } else {
            findDomain($elem, $repeat, $domain, $avail, $api, $interval);
        }

        usleep($interval);
    }

    return $avail;
}

function isAvail($domain, $api = 'net') {
    if ($api == 'net') {
        return isAvailNet($domain);
    } else if ($api == 'cnz') {
        return isAvailCnz($domain);
    } else if ($api == 'dcp') {
    return isAvailDcp($domain);
  }
}

//通过万网接口查询是否可用
function isAvailNet($domain) {
    $api = 'http://panda.www.net.cn/cgi-bin/check.cgi?area_domain=';
    $url = $api . $domain;
    $res = simplexml_load_string(file_get_contents($url));
    $code = substr((string) $res->original, 0, 3);
    if ($code == '210') {
        return true;
    } else {
        return false;
    }
}

//通过cnz接口查询是否可用
function isAvailCnz($domain) {
    $api = 'http://www.cnz.co/domain-registration/domain.php?action=caajax&domain_name=';
    $url = $api . $domain;
    $res = json_decode(file_get_contents($url));
    if ($res->status == 'available') {
        return true;
    } else {
        return false;
    }
}

//通过domcomp接口查询是否可用
function isAvailDcp($domain) {
    $api = 'https://www.domcomp.com/research1?q=%s&tld=%s';
  list($q, $tld) = explode('.', $domain);
    $url = sprintf($api, $q, $tld);
    $res = json_decode(file_get_contents($url), true);
    if ($res['result']['registered'] == false) {
        return true;
    } else {
        return false;
    }
}

conoha vps部署shadowsocks

最近conoha改版了,支持中文界面、支付宝付款,感觉还不错就买了个玩玩,试用下来觉得速度和配置相当不错就想在上面部署一个vpn用用,这篇文章记录一下大致的摸索过程。通过 该链接注册后充值500日元以上可获1000日元优惠券。

我先是新建了一个centos7.1系统的服务器,按照 shadowsocks搭建教程: 【倾力原创】史上最详尽Shadowsocks从零开始一站式翻墙教程 (需翻墙) 这篇教程来进行部署的,但是全部部署好后,客户端也能够连接上,却无法上网,后来在其他教程中发现了可能原因,就是centos默认的iptables中可能有一条0.0.0.0的记录会与shadowsocks的配置产生冲突。

懒得折腾centos于是我就新建了一个ubuntu的服务器。

apt-get install python-pip
pip install shadowsocks

通过以上命令安装成功后,

ssserver -p 443 -k password -m aes-256-cfb

运行该命令进行测试,发现这回能正常科学上网了,接下来就是配置开机启动了。

mkdir /etc/shadowsocks
vim /etc/shadowsocks/config.json

在config.json中复制入以下配置:

{
    "server":"0.0.0.0",
    "server_port":8388,
    "local_address": "127.0.0.1",
    "local_port":1080,
    "password":"yourpassword",
    "timeout":300,
    "method":"aes-256-cfb"
}

其中端口和密码可按需进行修改。运行一下命令进行测试:

ssserver -c /etc/shadowsocks/config.json

接下来安装supervisor:

apt-get install -y supervisor

编辑配置文件:

vim /etc/supervisor/conf.d/shadowsocks.conf

输入以下内容:

[program:shadowsocks]
command=ssserver -c /etc/shadowsocks/config.json
autostart=true
autorestart=true
user=nobody

如果上面填写的服务器端口号小于 1024,第五行改为 user=root 。

重启 supervisor 使对配置文件的修改生效

service supervisor restart
supervisorctl status

最后输出

shadowsocks    RUNNING    pid XXXXX, uptime X:XX:XX

表示配置成功,可以正常使用了。