![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
shell
沐风12138
这个人很懒,什么都没有留下哦~不过这个人很开心
展开
-
>/dev/null 2>&1
>/dev/null 2>&1转载 2022-11-22 09:34:09 · 230 阅读 · 1 评论 -
cmd 环境下载文件的几种方法
1.certutilcertutil -urlcache -split -f https://www.xxx.com/test.pycertutil -urlcache -split -f https://www.xxx.com/test.py ff.py #指定保存文件名2.bitsadminbitsadmin /transfer n https://xwis.net/Dl/Red-Alert-2-Multiplayer.exe D:\downloads\a.exe3.vbs.转载 2022-01-26 20:43:41 · 5606 阅读 · 2 评论 -
sublime去除特定字符
sublime中,打开替换ctrl+h一、包含“hello word”的行^.*hello word.*$二、以“hello word”开始的行^hello word.*$三、以“hello word”结尾的行.*hello word$linux下删除偶数行:%s/.∗$\n^.*$/\1/g删除奇数行:%s/^.*$\n.∗$/\1/g...原创 2021-07-06 11:50:54 · 1429 阅读 · 0 评论 -
cmd 环境下载文件的几种方法
cmd 环境下载文件的几种方法在渗透中通常会遇到只有cmd shell的情况,在这种情况下,通常需要下载文件来进行后续渗透。这里记录了几种在cmd下不需要其他三方程序就可以直接下载文件的方法。1.certutilcertutil -urlcache -split -f https://www.xxx.com/test.pycertutil -urlcache -split -f https://www.xxx.com/test.py ff.py #指定保存文件名2.bitsadminbitsad转载 2021-05-18 14:04:35 · 7404 阅读 · 0 评论 -
搜集的一些正则表达匹配文本
1、在文本文件里, 这个表达式可以匹配所有的英文:[ -~]2、这个表达式可以匹配所有的非英文(比如中文):[^ -~]3、删除奇数行Ctrl+F查找,开正则,查找^[^\n]*\n([^\n]*) 替换为\1^[^\n]*\n([^\n]*)...原创 2021-03-30 14:14:43 · 1383 阅读 · 0 评论 -
02.2 shell建立
vi name.sh编辑好后,加权限chmod +x name.sh执行:./name.sh./是在当前目录下寻找文件的意思,如果不加,会在默认路径下寻找,一般会报错。原创 2018-03-20 16:29:14 · 109 阅读 · 0 评论 -
02.2 shell输入输出重定向
引用https://www.cnblogs.com/emanlee/p/5375496.htmlshell中可能经常能看到:>/dev/null 2>&1eg:sudo kill -9 `ps -elf |grep -v grep|grep $1|awk '{print $4}'` 1>/dev/null 2>/dev/null命令的结果可以通过%>的形式来...转载 2018-03-20 14:07:51 · 112 阅读 · 0 评论 -
01.2 读取数组
${数组名[下标]}#!/bin/basha1=10aa2=20a3=30array=(a1 aa2 a3)array[10]=a10echo ${array[0]}echo ${#array[*]}echo ${array[@]}输出如下a14a1 aa2 a3 a10原创 2018-03-13 17:12:25 · 172 阅读 · 0 评论 -
01.6 shell.输入输出重定向
可将输出内容输出到文件中,代码为:$./test.sh > a.txt输入指令为$ ./test2.sh其中test2.sh内为:cat < b.txt为实现函数调用文件内资料,使用输入重定向方法如下:fun `cat < test.txt`其中,函数调用方法为函数名后面加参数,如:fun 21 3 4 5 一对反单引号是一个表达式,将`cat < test.txt`作为一...原创 2018-03-17 17:24:12 · 119 阅读 · 0 评论 -
01.6 shell的函数练习
#fun.sh#!/bin/bashfun(){ echo "making fun" read -p "input a:" a read -p "input b:" b return $(($a + $b))}echo "=====begin====="funecho "a+b=$?"echo "======end======"#fun2.sh#!/bin/bash原创 2018-03-17 10:25:54 · 160 阅读 · 0 评论 -
01.5 shell语法练习
read -p "请输入一段文字:" -n 6 -t 5 -s passwordecho "\npassword is $password"参数说明: -p 输入提示文字 -n 输入字符长度限制(达到6位,自动结束) -t 输入限时 -s 隐藏输入内容$ sh test.sh 请输入一段文字:password is asdfgh...转载 2018-03-16 10:39:37 · 171 阅读 · 0 评论