效果如图: 代码如下: 1 #!/bin/bash 2 #Author:GaoHongYu 3 #QQ:1061767621 4 #Time:2019-12-24 22:54:36 5 #Name:dm.sh 6 #Version:V1.0 7 8 stu=(刘一 陈二 张三 李四 王五 赵六 孙七 ...
分类:
系统相关 时间:
2019-12-27 09:17:21
阅读次数:
168
分享几个shell程序,便于linux期末复习 1.判断用户输入的数是否为回文数 1 #!/bin/bash 2 read in 3 res=`echo $in|rev` 4 if [ $res -eq $in ] 5 then 6 echo "$in is a huiwenshu!" 7 elif ...
分类:
系统相关 时间:
2019-12-27 00:14:58
阅读次数:
134
什么是Python?Python为什么会变得如此受欢迎呢?Python对于初学者非常友好,同时具备功能强大、容易上手的优势,应用领域广泛,让大家对它越来越关注了,今天就为大家详细的介绍一下Python受欢迎的原因。
分类:
编程语言 时间:
2019-12-27 00:12:43
阅读次数:
97
题目: shell编程题(六) 打印当前sshd的端口和进程id 例如:处理结果: sshd Port&&pid: 22 5412 答案: netstat -nltp | grep ssh |awk -F: '{print $2}'| grep -v "^$"|awk '{print "ssh:"$ ...
分类:
系统相关 时间:
2019-12-26 19:25:26
阅读次数:
77
#!/usr/bin/expect spawn ssh remotehost expect "*some key word*" send "kinit -f\r" expect "*assword*" send "password\r" send "cmd1\r" send "cmd2\r" sen... ...
分类:
其他好文 时间:
2019-12-26 19:22:36
阅读次数:
85
容器要运行X桌面环境可通过ssh,xdmcp远程方式,此时容器是XClient,容器是无需安装XServer.上篇(https://blog.51cto.com/13752418/2440496)容器中以本地方式运行X是在宿主的虚拟终端(如vt09)上运行容器X.本文是续篇,同样容器中以本地方式运行XServer,介绍的内容是容器运行X在宿主的桌面窗口之上,容器以本地方式登录桌面环境,即界面上类似
分类:
其他好文 时间:
2019-12-26 14:42:49
阅读次数:
85
参考 https://stackoverflow.com/questions/4929827/shell-exec-php-with-nohup 红色部分为关键点。 nohup /usr/bin/php /mytask/task1.php >/mytask/nohup/task1.log 2>&1 ...
分类:
Web程序 时间:
2019-12-26 13:11:43
阅读次数:
100
shell脚本mysql_backup_test_backup.sh #!/bin/bash # 设置mysql的登录用户名和密码(根据实际情况填写) mysql_user="***" mysql_password="****" mysql_host="localhost" mysql_port=" ...
分类:
数据库 时间:
2019-12-26 13:11:16
阅读次数:
61
# ShellSort希尔排序_Python实现 def shell_sort(li): n = len(li) # gap间隔为长度除2 gap = n // 2 while gap > 0: for i in range(gap, n): while i >= gap and li[i - ga ...
分类:
编程语言 时间:
2019-12-26 09:44:08
阅读次数:
99
[TOC] ssh软连接 添加用户 修改/etc/sudoers文件 suid后门 crontab反弹shell后门 ssh免密登录 ssh wrapper后门 inetd strace后门 协议后门 icmp 使用情况:主机从内到外的服务也被仅用了很多,但是icmp没有被禁用(一般很少禁用ping ...
分类:
系统相关 时间:
2019-12-26 00:09:17
阅读次数:
163