海运的博客

根据IP段找下载测试文件

发布时间:March 14, 2018 // 分类: // No Comments

<?php
$list = array (
  '47.74.188.',
  '47.74.189.'
);
$pre = array(
  'test',
  '100mb',
  '100MB',
  '1000mb',
  '1000MB',
  '1GB',
  '1gb'
);
$ext = array('bin', 'test', 'zip', 'tar.gz');
$filename = array('test');
foreach ($pre as $p) {
  foreach ($ext as $e) {
    $filename[] = $p.'.'.$e;
  }
}
$header = array(
  'User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0',
  'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
  'Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2',
  //'Accept-Encoding: gzip, deflate, br',
  'Connection: keep-alive',
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 1);
curl_setopt($ch, CURLOPT_NOBODY, 1);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);

foreach ($list as $prefix) {
  for ($i = 1; $i < 255; $i++) {
    $ip = "http://{$prefix}{$i}/";
    curl_setopt($ch, CURLOPT_URL, $ip);
    $res = curl_exec($ch);
    if ($res) {
      foreach ($filename as $v) {
        $url = $ip.$v;
        curl_setopt($ch, CURLOPT_URL, $url);
        curl_exec($ch);
        $info = curl_getinfo($ch);
        if ($info['http_code'] == 200) {
          $size = $info["download_content_length"]/1024/1024;
          if ($size > 50) {
            echo $url.'------->'.$size.'MB'.PHP_EOL;
            file_put_contents('enoctus.log', $url.'------->'.$size.'MB'."\n", FILE_APPEND);
          }
        } else {
          echo $url.'------->'.$info['http_code'].PHP_EOL;
        }
      }
    }
  }
}

使用dig测试ECDNS

发布时间:March 13, 2018 // 分类: // No Comments

编译安装最新版本的bind:

wget -O bind-9-12.tar.gz 'https://www.isc.org/downloads/file/bind-9-12-0/?version=tar-gz'
tar zxvf bind-9-12.tar.gz 
cd bind-9.12.0/
./configure --without-openssl
make

测试:

./bin/dig/dig  @8.8.8.8 google.com +subnet=116.206.101.0/24

美国和香港公共dns

发布时间:March 13, 2018 // 分类: // No Comments

非原生IP使用8.8.8.8公共dns因为EDNS(公共服务器向权威服务器解析时会转发客户端IP,然后权威服务器根据客户端的IP返回相应结果),可能会被解析到ip所在国家,使用其它公共dns,
香港:

nameserver 203.80.96.10
nameserver 202.45.84.58

美国:

nameserver 9.9.9.9
nameserver 74.82.42.42

此内容被密码保护

发布时间:March 7, 2018 // 分类: // No Comments

请输入密码访问

php使用qq域名邮箱smtp发送邮件

发布时间:February 20, 2018 // 分类: // No Comments

<?php
ini_set('date.timezone','Asia/Shanghai');
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
require 'PHPMailer/src/Exception.php';
require 'PHPMailer/src/PHPMailer.php';
require 'PHPMailer/src/SMTP.php';
$mail = new PHPMailer();
$mail->SMTPDebug = 1;
$mail->isSMTP();
$mail->SMTPAuth=true;
$mail->Host = 'smtp.qq.com';
$mail->SMTPSecure = 'ssl';
$mail->Port = 465;
$mail->Helo = 'Hello smtp.qq.com Server';
$mail->Hostname = 'haiyun.me';
$mail->CharSet = 'UTF-8';
$mail->Username ='admin@haiyun.me';
$mail->Password = 'password';
$mail->FromName = 'fromuser';
$mail->From = 'admin@haiyun.me';
$mail->isHTML(true); 
$mail->addAddress('touser@haiyun.me','touser');
$mail->Subject = "这是标题";
$mail->Body = "这是内容";
$status = $mail->send();
if($status) {
  echo '发送邮件成功'."\n";
}else{
  echo '发送邮件失败,错误信息:'.$mail->ErrorInfo."\n";
}
分类
最新文章
最近回复
  • opnfense: 谢谢博主!!!解决问题了!!!我之前一直以为内置的odhcp6就是唯一管理ipv6的方式
  • liyk: 这个方法获取的IPv6大概20分钟之后就会失效,默认路由先消失,然后Global IPV6再消失
  • 海运: 不好意思,没有。
  • zongboa: 您好,請問一下有immortalwrt設定guest Wi-Fi的GUI教學嗎?感謝您。
  • 海运: 恩山有很多。
  • swsend: 大佬可以分享一下固件吗,谢谢。
  • Jimmy: 方法一 nghtp3步骤需要改成如下才能编译成功: git clone https://git...
  • 海运: 地址格式和udpxy一样,udpxy和msd_lite能用这个就能用。
  • 1: 怎么用 编译后的程序在家里路由器内任意一台设备上运行就可以吗?比如笔记本电脑 m参数是笔记本的...
  • 孤狼: ups_status_set: seems that UPS [BK650M2-CH] is ...
归档