Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
scapy
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CodeLinaro
public-release-test-restored
platform
external
scapy
Commits
f91eae08
Commit
f91eae08
authored
7 years ago
by
gpotter2
Browse files
Options
Downloads
Patches
Plain Diff
TLS continuous data
parent
6a783f4a
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
scapy/layers/tls/record.py
+5
-0
5 additions, 0 deletions
scapy/layers/tls/record.py
test/tls.uts
+3
-0
3 additions, 0 deletions
test/tls.uts
with
8 additions
and
0 deletions
scapy/layers/tls/record.py
+
5
−
0
View file @
f91eae08
...
...
@@ -288,6 +288,11 @@ class TLS(_GenericTLSSessionInheritance):
if
s
.
rcs
and
not
isinstance
(
s
.
rcs
.
cipher
,
Cipher_NULL
):
from
scapy.layers.tls.record_tls13
import
TLS13
return
TLS13
if
_pkt
and
len
(
_pkt
)
<
5
:
# Layer detected as TLS but too small to be a real packet (len<5).
# Those packets appear when sessions are interrupted or to flush buffers.
# Scapy should not try to decode them
return
conf
.
raw_layer
return
TLS
### Parsing methods
...
...
This diff is collapsed.
Click to expand it.
test/tls.uts
+
3
−
0
View file @
f91eae08
...
...
@@ -968,6 +968,9 @@ assert(not t7.pad and not t7.padlen)
assert(isinstance(t7.msg[0], _TLSEncryptedContent))
len(t7.msg[0].load) == 478
= Reading TLS msg dissect - Packet too small
assert isinstance(TLS(b"\x00"), Raw)
= Reading TLS msg dissect - Wrong data
from scapy.layers.tls.record import _TLSMsgListField
assert isinstance(_TLSMsgListField.m2i(_TLSMsgListField("", []), TLS(type=0), '\x00\x03\x03\x00\x03abc'), Raw)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment