Merge pull request #806 from gpotter2/coverage-3

[coverage] Reduce coverage randomness: tls+TEX
This commit is contained in:
Guillaume Valadon 2017-09-11 12:10:57 +02:00 committed by GitHub
commit 557923afb5
2 changed files with 18 additions and 0 deletions

View File

@ -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")
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
saved_conf_verb = conf.verb

View File

@ -968,6 +968,10 @@ assert(not t7.pad and not t7.padlen)
assert(isinstance(t7.msg[0], _TLSEncryptedContent))
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 ########################