程序源码
package main
import (
"net/http"
)
func main() {
http.Handle("/", http.FileServer(http.Dir(".")))
http.ListenAndServe(":8080", nil)
}
运行测试
运行httpFileServer.go
之后在浏览器中访问即可:
这有什么用呢?在渗透测试过程中,传输文件了呗,哈哈哈!
本文介绍了一种使用Go语言快速搭建HTTP文件服务器的方法,通过简单的代码实现文件的传输功能,适用于渗透测试等场景。
package main
import (
"net/http"
)
func main() {
http.Handle("/", http.FileServer(http.Dir(".")))
http.ListenAndServe(":8080", nil)
}
运行httpFileServer.go
之后在浏览器中访问即可:
这有什么用呢?在渗透测试过程中,传输文件了呗,哈哈哈!
476

被折叠的 条评论
为什么被折叠?