firewalld防火牆

firewall-cmd --add-service={http,https,smtp,imap,smtps,imaps,ssh,wireguard} --permanent --zone=public

vim /etc/firewalld/firewalld.conf
有個InvividualCalls=no 把它改成InvividualCalls=yes
儲存離開
sudo systemctl restart firewalld

搭建在线ssh的demo

首先 添加 centos 7的普通用户:
cp /bin/bash /bin/rbash
adduser -s /bin/rbash onlinessh
其中onlinessh是用户名
默认情况其gid与uid都是1000,具体可以 cat /etc/passwd查看。

第二步,cd /home/onlinessh/.local/bin ,如果目录不存在,手动mkdir以上目录路径。
执行 ln -s /bin/ssh .
vi init.ssh
文件内容如下: 继续阅读“搭建在线ssh的demo”

php抖音去水印源码

<?php
//by 勤勤学长
//使用方法 域名/dyapi.php?url=https://v.douyin.com/TudRFh/

$url = $_GET[‘url’];
$res = qqxz_http_get($url);
preg_match(‘/href=”(.*?)”>Found/’, $res, $matches);
$Xurl = str_replace(‘&’, ‘&’, $matches[1]);
$res = qqxz_http_get($Xurl);
preg_match(‘/itemId: “(.*?)”,/’, $res, $matches);
$itemId = $matches[1];
$url = ‘https://www.iesdouyin.com/web/api/v2/aweme/iteminfo/?item_ids=’ . $itemId;
$res = qqxz_http_get($url);
$arr = json_decode($res, true);//作品信息获取
$play_addr_url = $arr[‘item_list’][0][“video”][“play_addr”][“url_list”][0];
$res = qqxz_http_get($play_addr_url);
preg_match(‘/href=”(.*?)”>Found/’, $res, $matches);
$videoUrl = str_replace(‘&’, ‘&’, $matches[1]);
$douyin = [‘code’ => 1, ‘url’ => $videoUrl];
echo json_encode($douyin);

function qqxz_http_get($url){
$Header=array( “User-Agent:Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1”);
$con=curl_init((string)$url);
curl_setopt($con,CURLOPT_HEADER,False);
curl_setopt($con,CURLOPT_SSL_VERIFYPEER,False);
curl_setopt($con,CURLOPT_RETURNTRANSFER,true);
curl_setopt($con,CURLOPT_HTTPHEADER,$Header);
curl_setopt($con,CURLOPT_TIMEOUT,5000);
$result = curl_exec($con);
return $result;
}

?>