File tree 4 files changed +20
-5
lines changed
4 files changed +20
-5
lines changed Original file line number Diff line number Diff line change 4
4
[ ![ License] ( https://img.shields.io/badge/License-Apache%202.0-yellowgreen )] ( https://github.com/kitabisa/ssb/blob/master/LICENSE )
5
5
[ ![ contributions] ( https://img.shields.io/badge/contributions-welcome-magenta.svg?style=flat )] ( https://github.com/kitabisa/ssb/issues )
6
6
[ ![ made with Go] ( https://img.shields.io/badge/made%20with-Go-brightgreen )] ( http://golang.org )
7
- [ ![ Version] ( https://img.shields.io/badge/version-0.0.2 -blueviolet )] ( https://github.com/kitabisa/ssb/releases )
7
+ [ ![ Version] ( https://img.shields.io/badge/version-0.1.0 -blueviolet )] ( https://github.com/kitabisa/ssb/releases )
8
8
9
9
** S** _ ecure_ ** S** _ hell_ ** B** _ ruteforcer_ — A faster & simpler way to bruteforce SSH server.
10
10
@@ -30,7 +30,7 @@ Need [go1.14+](https://golang.org/doc/install#download) compiler installed and c
30
30
31
31
``` bash
32
32
▶ ssb [-p port] [-w wordlist.txt] [-t timeout]
33
- [-c concurrent] [-o output] [user@]hostname
33
+ [-c concurrent] [-r retries] [- o output] [user@]hostname
34
34
```
35
35
36
36
### Options:
@@ -44,6 +44,8 @@ Need [go1.14+](https://golang.org/doc/install#download) compiler installed and c
44
44
Connection timeout (default 30s).
45
45
-c concurrent
46
46
Concurrency/threads level (default 100).
47
+ -r retries
48
+ Specify the connection retries (default 1).
47
49
-o output
48
50
Save valid password to file.
49
51
-v
Original file line number Diff line number Diff line change @@ -5,10 +5,11 @@ import "time"
5
5
var (
6
6
opt * Options
7
7
uhost []string
8
+ vld bool
8
9
)
9
10
10
11
const (
11
- version = "v0.0.2 "
12
+ version = "v0.1.0 "
12
13
banner = `
13
14
_
14
15
` + version + ` | |
@@ -34,6 +35,8 @@ Options:
34
35
Connection timeout (default 30s).
35
36
-c concurrent
36
37
Concurrency/threads level (default 100).
38
+ -r retries
39
+ Specify the connection retries (default 1).
37
40
-o output
38
41
Save valid password to file.
39
42
-v
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ import (
15
15
type Options struct {
16
16
concurrent int
17
17
wordlist string
18
+ retries int
18
19
verbose bool
19
20
timeout time.Duration
20
21
output string
@@ -32,6 +33,7 @@ func Parse() *Options {
32
33
opt .timeout = timeout
33
34
34
35
flag .IntVar (& opt .port , "p" , 22 , "" )
36
+ flag .IntVar (& opt .retries , "r" , 1 , "" )
35
37
flag .IntVar (& opt .concurrent , "c" , 100 , "" )
36
38
flag .BoolVar (& opt .verbose , "v" , false , "" )
37
39
flag .StringVar (& opt .output , "o" , "" , "" )
Original file line number Diff line number Diff line change @@ -25,7 +25,11 @@ func New(opt *Options) {
25
25
go func () {
26
26
defer swg .Done ()
27
27
for pass := range job {
28
- opt .run (pass )
28
+ for i := 0 ; i < opt .retries ; i ++ {
29
+ if opt .run (pass ) {
30
+ break
31
+ }
32
+ }
29
33
}
30
34
}()
31
35
}
@@ -39,7 +43,7 @@ func New(opt *Options) {
39
43
gologger .Infof ("Done!" )
40
44
}
41
45
42
- func (opt * Options ) run (password string ) {
46
+ func (opt * Options ) run (password string ) bool {
43
47
cfg := ssb .New (opt .user , password , opt .timeout )
44
48
45
49
con , err := ssb .Connect (opt .host , opt .port , cfg )
@@ -55,7 +59,11 @@ func (opt *Options) run(password string) {
55
59
if opt .file != nil {
56
60
fmt .Fprintf (opt .file , "%s\n " , password )
57
61
}
62
+
63
+ vld = true
58
64
}
65
+
66
+ return vld
59
67
}
60
68
61
69
func (opt * Options ) showInfo () {
You can’t perform that action at this time.
0 commit comments