-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #174 from projectdiscovery/dev
tlsx v1.0.5
- Loading branch information
Showing
25 changed files
with
1,501 additions
and
204 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
|
||
"github.com/projectdiscovery/tlsx/pkg/tlsx" | ||
"github.com/projectdiscovery/tlsx/pkg/tlsx/clients" | ||
) | ||
|
||
func main() { | ||
// setup tlsx client with options | ||
// https://pkg.go.dev/github.com/projectdiscovery/tlsx/pkg/tlsx/clients#Options | ||
opts := &clients.Options{ | ||
TLSVersion: true, | ||
Retries: 3, | ||
Expired: true, | ||
} | ||
|
||
// available scanmodes | ||
allmodes := []string{"auto", "openssl", "ctls", "ztls"} | ||
|
||
for _, scanMode := range allmodes { | ||
opts.ScanMode = scanMode | ||
// create tlsx service with options | ||
service, err := tlsx.New(opts) | ||
if err != nil { | ||
panic(err) | ||
} | ||
|
||
// connect to any host either with hostname or ip | ||
// service.Connect(hostname, ip , port string) | ||
resp, err := service.Connect("scanme.sh", "", "443") | ||
if err != nil { | ||
panic(err) | ||
} | ||
|
||
fmt.Printf("[%v] scan-mode:%-7v tls-version:%v self-signed:%v cipher:%v\n", resp.Host, scanMode, resp.Version, resp.SelfSigned, resp.Cipher) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.