摘要: import pexpect pexpect.run("ls /tmp", withexitstatus=1) chk = pexpect.spawn("ls -l /tmp/") chk = pexpect.spawn("ls", ['-l', '/tmp/']) ssh_k = pexpect. 阅读全文
posted @ 2020-04-14 10:58 我爱敲代码 阅读(334) 评论(0) 推荐(0)
摘要: import nmap nm = nmap.PortScanner() nm.scan(hosts="192.168.1.1/24", arguments="-n -sP -PE") nm.all_hosts() import telnetlib tm = telnetlib.Telnet(host 阅读全文
posted @ 2020-04-14 10:12 我爱敲代码 阅读(454) 评论(0) 推荐(0)
摘要: vim /etc/sysconfig/iptables *filter :INPUT ACCEPT [0:0] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [0:0] -A INPUT -m state --state RELATED,ESTABLISHED -j AC 阅读全文
posted @ 2020-04-09 13:00 我爱敲代码 阅读(1010) 评论(0) 推荐(0)
摘要: #安装源 curl -o /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo #安装工具 yum install wget net-tools telnet tree nmap sysstat lrzsz dos 阅读全文
posted @ 2020-03-26 13:02 我爱敲代码 阅读(304) 评论(0) 推荐(0)
摘要: systemd-analyze set-log-level notice 阅读全文
posted @ 2020-02-16 14:58 我爱敲代码 阅读(185) 评论(0) 推荐(0)
摘要: nmcli con add con-name team0 type team ifname team0 config '{ "runner": {"name": "activebackup"} } ' 高可用 nmcli con add con-name team0 type team ifname team0 config '{ "runner": {"name": "loadbalan... 阅读全文
posted @ 2019-07-04 16:00 我爱敲代码 阅读(187) 评论(0) 推荐(0)
摘要: 参考https://blog.csdn.net/weixin_40907382/article/details/80824167 阅读全文
posted @ 2019-05-15 09:10 我爱敲代码 阅读(98) 评论(0) 推荐(0)
摘要: CentOS 中无法使用make,make install 命令 提示错误:make: command not found make是gcc的编译器,一定要安装 1、安装: yum -y install gcc automake autoconf libtool make 2、安装g++: yum install gcc gcc-c++ 阅读全文
posted @ 2019-04-28 19:08 我爱敲代码 阅读(13532) 评论(0) 推荐(1)
摘要: CentOS7 配置163 yum源 1)下载repo文件 wget http://mirrors.163.com/.help/CentOS7-Base-163.repo 2)备份并替换系统的repo文件 cp CentOS7-Base-163.repo /etc/yum.repos.d/ cd /etc/yum.repos.d/ mv CentOS-Base.repo CentO... 阅读全文
posted @ 2019-04-03 14:58 我爱敲代码 阅读(1157) 评论(0) 推荐(0)
摘要: 1.将第121行的dfdk替换为cdp12345 sed -i '121s#dfdk#cdp12345#' YunTai/YunTai/settings.py2.删除包含某些字符的行sed -i '/wsgi_module/'d /etc/httpd/conf/httpd.conf 阅读全文
posted @ 2019-04-02 16:09 我爱敲代码 阅读(131) 评论(0) 推荐(0)