
Golang
文章平均质量分 86
Yatere
求职,求合伙人,求项目。网络安全方面。
人生就好像一杆天平,虽明知没有绝对的平衡,但我们也在不断尝试,因为我们相信奇迹总会出现。
展开
-
Go语言_HTTP包
在Golang中写一个http web服务器大致是有两种方法:1 使用net包的net.Listen来对端口进行监听2 使用net/http包 http客户端这里是讨论如何使用net/http包创建一个web服务器net/http请求提供了HTTP客户端和服务端的具体实现import ( "fmt" "net/http"原创 2012-08-23 18:26:33 · 2011 阅读 · 0 评论 -
内网打洞,类似于lcx 但是比他更加强大
经常有朋友用lcx的,但是由于很多原因可能都不好使,例如 :1.linux下能用lcx,有时只能拿msf出来。(golang的程序跨平台,甚至嵌入式linux都支持。)2.不免杀 (基本上目前golang 语言不会被当病毒)3.每次内网要从新连接其他主机时候,必须从进去从新敲打命令 ,操作过多任意被发现。(肉鸡只用操作一次,其他都交给主控端操作了)最近正好都碰上了,于是自原创 2015-04-28 18:06:00 · 4576 阅读 · 2 评论 -
dns服务器 、dns中间人篡改服务器
软件介绍: 本身为独立执行程序,跨平台,可以充当正常dns服务器。默认情况下,本程序只篡改MX(邮件交换记录)为特定主机。作用:本软件 与 本博客前文中的 smtp 中继监控服务器程序 结合来实施攻击,特别在内网中。其他:如果需要实现高级的基于特定域名的篡改,修改代码即可。package mainimport ( "fmt" "github.原创 2015-01-30 22:31:50 · 3314 阅读 · 0 评论 -
golang random string and int
package mainimport ( "fmt" "math/rand" "time" "bytes")func main() { fmt.Println(randomString(10) )}func randomString (l int ) string { var result bytes.Buffe原创 2013-04-20 15:45:52 · 4429 阅读 · 0 评论 -
golang 读写文件内容(备份)
以下是读取文件内容package mainimport ( "bufio" "fmt" "io" "os" "strings")func main() { fh, ferr := os.Open("d:\\n.txt") if ferr != nil { fmt.Printf("An error occurred on原创 2013-04-14 23:21:41 · 4351 阅读 · 0 评论 -
golang sort 排序
package mainimport ( "fmt" "sort")func main() { d := []int{5, 2, 6, 3, 1, 4} // unsorted sort.Sort(sort.IntSlice(d)) fmt.Println(d) // Output:[1 2 3 4 5 6] a := []flo原创 2013-04-06 23:25:06 · 6202 阅读 · 0 评论 -
golang rand 随机例子
package mainimport ( "fmt" "math/rand" "time")func main() { rand.Seed(time.Now().UnixNano()) for i := 0; i < 10; i++ { x := rand.Intn(100) fmt.Println(x) }}以上例子是打印10个100以内(0-99)的随机数原创 2013-04-06 22:57:41 · 35906 阅读 · 2 评论 -
任意数据类型切片 golang
package mainimport ( "fmt" . "strconv")type Element interface{}type List []Elementtype Person struct { name string age int}func (P Person) String() string { return "My name is " + P.n原创 2013-04-05 03:22:22 · 1814 阅读 · 1 评论 -
go语言的php cgi执行程序
/* PHP FactCGI Remote Code Execute Exploit* Date: 2012-09-15* Author: wofeiwo@80sec.com* Affected: All PHP-FPM exposed outsie, but "system" cmd only affects >=5.3.3* !!Note: Only for research purp转载 2012-09-23 20:23:41 · 3332 阅读 · 0 评论 -
go lang 读写文件操作
参考备份写程序离不了文件操作,这里总结下go语言文件操作。一、建立与打开建立文件函数:func Create(name string) (file *File, err Error)func NewFile(fd int, name string) *File具体见官网:http://golang.org/pkg/os/#Crea原创 2012-09-27 16:07:46 · 3158 阅读 · 0 评论 -
使用Golang 搭建http web服务器
转自:http://www.cnblogs.com/yjf512/archive/2012/09/03/2668384.htmlGolang在搭建web服务器方面的能力是毋庸置疑的。官方已经有提供net/http包为搭建http服务器做准备。使用这个包能很简单地对web的路由,静态文件,模版,cookie等数据进行设置。至于这个包是否好用,这个就见仁见智了。你可以从net包开始转载 2012-09-26 09:50:46 · 2377 阅读 · 0 评论 -
提供自学go的资料
好多资料,首先就是:https://github.com/astaxie/build-web-application-with-golanghttps://github.com/wonderfo/wonderfogo/wiki形星的电子书也不错。还有google的go论坛和官网了。一些民间个人博客,群,论坛等。PS:某人需原创 2012-09-26 09:48:06 · 1130 阅读 · 0 评论 -
Go语言_eclipse环境搭建(继上篇)
1 下载eclipse 2 下载goeclipsehttp://code.google.com/p/goclipse/wiki/InstallationInstructions 3 下载GoCodehttps://github.com/nsf/gocode下载源码到Gopath路径下Go build可以到父目录上生成了转载 2012-08-23 18:39:55 · 2512 阅读 · 0 评论 -
终极Web应用性能和压力测试工具Gor
什么是Gor项目地址:https://github.com/buger/gor官方描述Gor is a simple http traffic replication tool written in Go.Its main goal is to replay traffic from production servers to staging and dev env转载 2016-05-19 09:41:29 · 6355 阅读 · 0 评论