智能运维
-
golang执行linux
func copyAndCapture(w io.Writer, r io.Reader) ([]byte, error) { var out []byte buf := make([]byte, 1024, 1024) for { n, err := r.Read(buf[:]) if n > 0 { d := buf[:n] out = append(out, d...) os.Std…
-
golang执行shell命令
golang调用shell命令(实时输出, 终止等) 背景 是这样的,最近在研究一个定时任务系统的改造,可能有点像jenkins做到的那种吧。可以输入shell命令,也可以执行py脚本等等,相比之前来说,也要能够及时停止!但是…
-
shell 脚本
shell 脚本 目录 一、shell基础 一、shell基础 常用通配符 * 匹配0或多个任意字符 ? 匹配任意单个字符 匹配list中任意…
-
How To Fix The Three Buffer Overflow Vulnerabilities In Lenovo BIOS
Martin Smolár, a security researcher from ESET, has disclosed 3 buffer overflow vulnerabilities in Lenovo BIOS. The vulnerability is impacting multiple Lenovo Notebook devices including several Think…
-
powershell无法执行脚本
powershell无法执行脚本 PS C:/Users/zbf> cnpm -v cnpm : 无法加载文件 C:/Users/zbf/AppData/Roaming/npm/cnpm.ps1,因为在此系统上禁止运行脚本。有关详细信息,请参阅 https:/ go.microsoft.com/fwlink/?Lin…
-
使用 iptables 限制每个 IP 地址的最大连接数和每秒新连接数
iptables -A INPUT -p tcp --syn --dport 80 -m connlimit --connlimit-above 15 --connlimit-mask 32 -j REJECT --reject-with tcp-reset 这将拒绝来自一个源 IP 的 15 个以上的连接。 iptables -A INPUT -m state…
-
Linux-docker仓库-分布式Harbor
Harbor Harbor是一个用于存储和分发Docker镜像的企业级Registry 服务器,由VMware开源,其通过添加一些企业必须的功能特性,例如安全、标识和管理等,扩展了开源Docker Distribution。作为一个企业级私有Registry服…
-
Linux学习系列--vi、vim编辑器的使用命令
在Linux系统中,由于没有记事本软件,不能直接打开一些文本文件,需要借助一些辅助工具来打开,常用的就是vi、vim ,这其中vi是属于Linux中的基本文本编辑器,相当于在Windows中记事本一样的存在,vim则属于是vi的…
-
Nginx根据请求参数限流
根据业务方的需求,针对/user/login/api.php路径下,userid=(1234567890|1234567891|1234567892)的接口做IP请求限制。 ##黑名单 geo $remote_addr $deny_remote_addr { 172.25.8.0/16 1; 10.250.11.92 1; default 0…
-
centos7,iptables修改后无法保存
在centos7上,经常修改了iptables规则后,重启后规则就没了。有些地方使用使用 iptables-save,然而并无卵用;正确的保存操作是 service iptables save $ service iptables save The service command supports only…