New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avoid slicing errors due to incorrect serial numbers #222
Merged
ehsandeep
merged 8 commits into
projectdiscovery:dev
from
pbuff07:bugfix/avoid_serial_process_slicing_errors
Mar 26, 2023
Merged
Avoid slicing errors due to incorrect serial numbers #222
ehsandeep
merged 8 commits into
projectdiscovery:dev
from
pbuff07:bugfix/avoid_serial_process_slicing_errors
Mar 26, 2023
Conversation
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
Bumps [google.golang.org/protobuf](https://github.com/protocolbuffers/protobuf-go) from 1.29.0 to 1.29.1. - [Release notes](https://github.com/protocolbuffers/protobuf-go/releases) - [Changelog](https://github.com/protocolbuffers/protobuf-go/blob/master/release.bash) - [Commits](protocolbuffers/protobuf-go@v1.29.0...v1.29.1) --- updated-dependencies: - dependency-name: google.golang.org/protobuf dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com>
…bot/go_modules/google.golang.org/protobuf-1.29.1 chore(deps): bump google.golang.org/protobuf from 1.29.0 to 1.29.1
ehsandeep
added
the
Type: Bug
Inconsistencies or issues which will cause an issue or problem for users or implementors.
label
Mar 26, 2023
ehsandeep
approved these changes
Mar 26, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
echo 12345.cnts.gov.cn | ./tlsx -json | jq .
_____ _ _____ __
|_ _| | / __\ \/ /
| | | |__\__ \> <
|_| |____|___/_/\_\ v1.0.6
projectdiscovery.io
[INF] Current tlsx version v1.0.6 (latest)
[INF] Connections made using crypto/tls: 1, zcrypto/tls: 0, openssl: 0
{
"timestamp": "2023-03-27T00:19:43.004822+05:30",
"host": "12345.cnts.gov.cn",
"ip": "59.37.165.158",
"port": "443",
"probe_status": true,
"tls_version": "tls12",
"cipher": "TLS_RSA_WITH_AES_128_CBC_SHA",
"self_signed": true,
"mismatched": true,
"not_before": "2020-10-11T07:11:55Z",
"not_after": "2040-10-06T07:11:55Z",
"subject_dn": "CN=H3C-HTTPS-Self-Signed-Certificate-9ae87f1ca5b084c1",
"subject_cn": "H3C-HTTPS-Self-Signed-Certificate-9ae87f1ca5b084c1",
"issuer_dn": "CN=H3C-HTTPS-Self-Signed-Certificate-9ae87f1ca5b084c1",
"issuer_cn": "H3C-HTTPS-Self-Signed-Certificate-9ae87f1ca5b084c1",
"fingerprint_hash": {
"md5": "d7ac083962bad52ecb4e160bf679472c",
"sha1": "42b67b7540ba2d2e90465046eb163609b459e7f5",
"sha256": "6abcb846d70ab5776f41d12d26b3e14d3c0f0e9f7445609726e28a12c8b43080"
},
"tls_connection": "ctls",
"sni": "12345.cnts.gov.cn"
}
tarunKoyalwar
approved these changes
Mar 26, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm !
$ go run . -u 12345.cnts.gov.cn -se
_____ _ _____ __
|_ _| | / __\ \/ /
| | | |__\__ \> <
|_| |____|___/_/\_\ v1.0.6
projectdiscovery.io
[INF] Current tlsx version v1.0.6 (latest)
12345.cnts.gov.cn:443 []
[INF] Connections made using crypto/tls: 1, zcrypto/tls: 0, openssl: 0
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Type: Bug
Inconsistencies or issues which will cause an issue or problem for users or implementors.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Some websites may use https certificates, but the format is problematic because the certificates are not issued by an authority.
For example website: https://12345.cnts.gov.cn/
If the original code is used to handle it, a panic exception will occur (the slice operation does not consider the length problem, ./tlsx16 represents tlsx version 1.6)
So I added if to judge whether the value of the large integer serial number is 0, if not 0, the serial number is normal, otherwise the return serial number field is empty