Skip to content

Commit

Permalink
Merge pull request #71 from vulncheck-oss/tls-and-typo-fix
Browse files Browse the repository at this point in the history
Enable older TLS/SSL clients by default. Fix rhosts typo.
  • Loading branch information
j-baines authored Oct 23, 2023
2 parents 4f5e9b3 + 71e3886 commit 89314e4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,7 @@ issues:
linters:
- staticcheck
text: SA1019
- path: framework.go
linters:
- staticcheck
text: SA1019
4 changes: 2 additions & 2 deletions cli/commandline.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,11 @@ func handleRhostsOptions(conf *config.Config, rhosts string, rports string, rhos
func commonValidate(conf *config.Config, rhosts string, rports string, rhostsFile string) bool {
switch {
case len(conf.Rhost) == 0 && len(rhosts) == 0 && len(rhostsFile) == 0:
output.PrintFrameworkError("Missing required option 'rhost', 'rhosts', or 'rhostsFile'")
output.PrintFrameworkError("Missing required option 'rhost', 'rhosts', or 'rhosts-file'")

return false
case conf.Rport == 0 && len(rports) == 0 && len(rhostsFile) == 0:
output.PrintFrameworkError("Missing required option 'rport', 'rports', or 'rhostsFile'")
output.PrintFrameworkError("Missing required option 'rport', 'rports', or 'rhosts-file'")

return false
case len(conf.Rhost) != 0 && len(rhosts) != 0:
Expand Down
6 changes: 5 additions & 1 deletion framework.go
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,11 @@ func RunProgram(sploit Exploit, conf *config.Config) {
}

// disable https cert verification globally
http.DefaultTransport.(*http.Transport).TLSClientConfig = &tls.Config{InsecureSkipVerify: true}
http.DefaultTransport.(*http.Transport).TLSClientConfig = &tls.Config{
InsecureSkipVerify: true,
// We have no control over the SSL versions supported on the remote target. Be permissive for more targets.
MinVersion: tls.VersionSSL30,
}

// if the c2 server is meant to catch responses, initialize and start so it can bind
if !startC2Server(conf) {
Expand Down

0 comments on commit 89314e4

Please sign in to comment.