lcvvvv/kscan

使用--hydra爆破时内存占用过大

daimiaopeng opened this issue · 1 comments

运行参数为"args": [ "-t", "216.73.156.0/24", "--threads","100", "--timeout","1", "--hydra", "--hydra-user","user.txt", "--hydra-pass","top19576.txt", ]
top19576.txt文件大小为:157KB
user.txt文件大小为:70KB
关键代码:

func NewAuthFromUsernameAndPassword(usernames, passwords []string) []Auth {
	var auths []Auth
	for _, password := range passwords {
		for _, username := range usernames {
			auths = append(auths, NewSpecialAuth(username, password))
		}
	}
	return auths
}

auths 在双循环下爆内存(20G以上)

lcvvvv commented

你不要搞这么大啊,这是轻量级的,......