Skip to content

Commit 2f85ca6

Browse files
committed
fix 1、-v -debug未显示成功爆破密码的bug \n2、优化密码字典 2022-07-02 22:34:1656772441
1 parent 7a9a0ff commit 2f85ca6

22 files changed

+51621
-1286
lines changed

main.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import (
66
"github.com/hktalent/scan4all/pkg/hydra"
77
naaburunner "github.com/hktalent/scan4all/pkg/naabu/v2/pkg/runner"
88
"github.com/projectdiscovery/gologger"
9+
"io"
10+
"log"
911
"os"
1012
"runtime"
1113
)
@@ -21,6 +23,11 @@ func main() {
2123
}
2224
}()
2325
options := naaburunner.ParseOptions()
26+
if false == options.Debug && false == options.Verbose {
27+
// disable standard logger (ref: https://github.com/golang/go/issues/19895)
28+
log.SetFlags(0)
29+
log.SetOutput(io.Discard)
30+
}
2431
pkg.G_Options = options
2532
if runtime.GOOS == "windows" {
2633
options.NoColor = true

nuclei_Yaml/internal/runner/options.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ package runner
22

33
import (
44
"bufio"
5-
"io"
6-
"log"
75
"os"
86
"path/filepath"
97
"strings"
@@ -152,10 +150,6 @@ func configureOutput(options *types.Options) {
152150
if options.Silent {
153151
gologger.DefaultLogger.SetMaxLevel(levels.LevelSilent)
154152
}
155-
156-
// disable standard logger (ref: https://github.com/golang/go/issues/19895)
157-
log.SetFlags(0)
158-
log.SetOutput(io.Discard)
159153
}
160154

161155
// loadResolvers loads resolvers from both user provided flag and file

pkg/config.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,15 @@ func GetVal4File(key, szDefault string) string {
111111
return szDefault
112112
}
113113

114+
// 读区配置中的字典文件
115+
func GetVal4Filedefault(key, szDefault string) string {
116+
s := GetVal4File(key,szDefault)
117+
if 2 == len(strings.Split(strings.Split(s,"\n")[0],":"){
118+
s = strings.ReplaceAll(s,":","\t")
119+
}
120+
return s
121+
}
122+
114123
func init() {
115124
var ConfigName = "config/config.json"
116125
config := viper.New()

pkg/hydra/dicts/ftp_default.txt

Lines changed: 64 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,66 @@
11
anonymous anonymous
2-
ftp ftp
2+
root rootpasswd
3+
root 12hrs37
4+
ftp b1uRR3
35
admin admin
4-
admin 123456
6+
localadmin localadmin
7+
admin 1234
8+
apc apc
9+
admin nas
10+
Root wago
11+
Admin wago
12+
User user
13+
Guest guest
14+
ftp ftp
15+
admin password
16+
a avery
17+
admin 123456
18+
adtec none
19+
admin admin12345
20+
none dpstelecom
21+
instrument instrument
22+
user password
23+
root password
24+
default default
25+
admin default
26+
nmt 1234
27+
admin Janitza
28+
supervisor supervisor
29+
user1 pass1
30+
avery avery
31+
IEIeMerge eMerge
32+
ADMIN 12345
33+
beijer beijer
34+
Admin admin
35+
admin 1234
36+
admin 1111
37+
root admin
38+
se 1234
39+
admin stingray
40+
device apc
41+
apc apc
42+
dm ftp
43+
dmftp ftp
44+
httpadmin fhttpadmin
45+
user system
46+
MELSEC MELSEC
47+
QNUDECPU QNUDECPU
48+
ftp_boot ftp_boot
49+
uploader ZYPCOM
50+
ftpuser password
51+
USER USER
52+
qbf77101 hexakisoctahedron
53+
ntpupdate ntpupdate
54+
sysdiag factorycast@schneider
55+
wsupgrade wsupgrade
56+
pcfactory pcfactory
57+
loader fwdownload
58+
test testingpw
59+
webserver webpages
60+
fdrusers sresurdf
61+
nic2212 poiuypoiuy
62+
user user00
63+
su ko2003wa
64+
MayGion maygion.com
65+
admin 9999
66+
PlcmSpIp PlcmSpIp

0 commit comments

Comments
 (0)