Skip to content
Snippets Groups Projects
Commit 56423309 authored by gpotter2's avatar gpotter2
Browse files

Reduce coverage randomness: tls+TEX

parent 1944f788
No related branches found
No related tags found
No related merge requests found
...@@ -333,6 +333,20 @@ assert(ret == ("<span class=prompt>&gt;&gt;&gt; </span>IP().src\n'127.0.0.1'\n", ...@@ -333,6 +333,20 @@ assert(ret == ("<span class=prompt>&gt;&gt;&gt; </span>IP().src\n'127.0.0.1'\n",
ret = autorun_get_latex_interactive_session("IP().src") ret = autorun_get_latex_interactive_session("IP().src")
assert(ret == ("\\textcolor{blue}{{\\tt\\char62}{\\tt\\char62}{\\tt\\char62} }IP().src\n'127.0.0.1'\n", '127.0.0.1')) assert(ret == ("\\textcolor{blue}{{\\tt\\char62}{\\tt\\char62}{\\tt\\char62} }IP().src\n'127.0.0.1'\n", '127.0.0.1'))
= Test utility TEX functions
assert tex_escape("{scapy}\\^$~#_&%|><") == "{\\tt\\char123}scapy{\\tt\\char125}{\\tt\\char92}\\^{}\\${\\tt\\char126}\\#\\_\\&\\%{\\tt\\char124}{\\tt\\char62}{\\tt\\char60}"
a = colgen(1, 2, 3)
assert a.next() == (1, 2, 2)
assert a.next() == (1, 3, 3)
assert a.next() == (2, 2, 1)
assert a.next() == (2, 3, 2)
assert a.next() == (2, 1, 3)
assert a.next() == (3, 3, 1)
assert a.next() == (3, 1, 2)
assert a.next() == (3, 2, 3)
= Test config file functions = Test config file functions
saved_conf_verb = conf.verb saved_conf_verb = conf.verb
......
...@@ -968,6 +968,10 @@ assert(not t7.pad and not t7.padlen) ...@@ -968,6 +968,10 @@ assert(not t7.pad and not t7.padlen)
assert(isinstance(t7.msg[0], _TLSEncryptedContent)) assert(isinstance(t7.msg[0], _TLSEncryptedContent))
len(t7.msg[0].load) == 478 len(t7.msg[0].load) == 478
= 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)
############################################################################### ###############################################################################
################## Reading TLS vulnerable test session ######################## ################## Reading TLS vulnerable test session ########################
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment