1.开启插件 (ctrl+shif+x)
2.鼠标移动到一个标题上方
3.按 shift 键,提取xpath
4.删除xpath尾部[方括号]
/a 链接文件 /a/@href 链接地址
/html/body[@class='home pace-done']/section[@class='container']/div[@class='content-wrap']/div[@class='content']/article[@class='excerpt']/header/h2/a/@href
grep -oE '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | sort | uniq -c| sort -nrk 1
# 应用: 统计自己电信服务商IP动态变化
cat /var/log/udp2raw.log \
| grep -oE '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | sort | uniq -c| sort -nrk 1
# 统计哪些IP在扫描你的vps
cat /var/log/auth.log \
| grep -oE '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | sort | uniq -c| sort -nrk 1
# 查询IP信息
https://www.ipip.net/ipquery.html
systemctl | grep running
systemctl disable google-accounts-daemon.service
systemctl disable google-clock-skew-daemon.service
systemctl disable google-network-daemon.service
systemctl disable google-osconfig-agent.service
systemctl disable unattended-upgrades.service
systemctl disable fail2ban
systemctl disable rsyslog
systemctl disable cron
systemctl disable getty@tty2.service
systemctl disable console-getty.service
# WALinuxAgent (waagent) 卸载
systemctl disable walinuxagent
# Swap 交换空间
fallocate -l 1G /swapfile
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
echo "/swapfile swap swap defaults 0 0" >> /etc/fstab
# 其他优化设定
vim /etc/sysctl.conf
vm.min_free_kbytes = 18600
vm.swappiness = 5
sysctl -p
网上找了文章 《Azure 乞丐版 B1ls 的正确使用姿势 压榨极致性能》
先凑合着用吧,反正是备用机,续签的 99刀应该可以用一年
----------------
## crontab -l
1 * */7 * * reboot
59 * * * * wget -qO- git.io/fxxlb | bash
8 */8 * * * docker run --rm hostloc 用户 密码
1) apt install sl
sl
2) factor "Any Number"
3) apt install fish
fish
4) apt install figlet
figlet "Any Text"
5) apt install cmatrix
cmatrix
6) apt install fortune
fortune
7) apt install toilet
toilet "Any Text"
toilet -f mono12 -F gay "Any Text"
8) apt install w3m
w3m "any websites"
example:- w3m google.com
9) ifconfig
10) apt install cowsay
cowsay "Any Text"
#!/usr/bin/env sh
# https://github.com/Neilpang/acme.sh/wiki/说明
# 安装ssl依赖 和 acme.sh工具
apt-get install socat netcat -y
curl https://get.acme.sh | sh
# 设置域名
DOMAIN=ssl.srgb888.ga
# 生成域名ssl证书
~/.acme.sh/acme.sh --issue -d ${DOMAIN} --webroot /var/www/html --standalone -k ec-256 --force
~/.acme.sh/acme.sh --issue -d ssl.srgb888.ga --nginx --standalone -k ec-256 --force
#!/bin/bash
# socks5tohttp.sh
brook socks5tohttp -s 127.0.0.1:1080 -l 0.0.0.0:8010 &
ps aux | grep -E brook
export http_proxy="http://127.0.0.1:8010"
export https_proxy="http://127.0.0.1:8010"
:: Brook 开启 socks5 再转http
start /b brook socks5 -l :1080 -i 0.0.0.0
sleep 1
start /b brook socks5tohttp -s 127.0.0.1:1080 -l 0.0.0.0:8010
$ curl -L https://github.com/txthinking/brook/releases/download/v20200909/brook_linux_amd64 -o /usr/bin/brook
$ chmod +x /usr/bin/brook
# 32位系统安装
$ curl -L https://github.com/txthinking/brook/releases/download/v20200909/brook_linux_386 -o /usr/bin/brook
$ brook socks5tohttp -s 127.0.0.1:1080 -l 127.0.0.1:8010
$ brook relay -f :9999 -t 1.2.3.4:9999
$ brook socks5 -l :1080 -i 0.0.0.0
1.修改server端的etc/ssh/sshd_config
ClientAliveInterval 60 #server每隔60秒发送一次请求给client,然后client响应,从而保持连接
ClientAliveCountMax 3 #server发出请求后,客户端没有响应得次数达到3,就自动断开连接,正常情况下,client不会不响应
systemctl reload sshd
2.修改client端的etc/ssh/ssh_config添加以下:(在没有权限改server配置的情形下)
ServerAliveInterval 60 #client每隔60秒发送一次请求给server,然后server响应,从而保持连接
ServerAliveCountMax 3 #client发出请求后,服务器端没有响应得次数达到3,就自动断开连接,正常情况下,server不会不响应
3.在命令参数里ssh -o ServerAliveInterval=60 这样子只会在需要的连接中保持持久连接, 毕竟不是所有连接都要保持持久的