Commit Graph

232 Commits

Author SHA1 Message Date
Pierre Lalet 7476e93141 Merge pull request #553 from Leereen/sctp-enhance
[SCTP] RFC 4895 & 5061
2017-04-19 16:11:27 +02:00
Guillaume Valadon dcd1b911c0 Merge pull request #613 from p-l-/fix-bitfield-len
Fields/BitField: implement .i2len()
2017-04-19 11:04:15 +02:00
Pierre Lalet 4af8e3a4ed Merge pull request #609 from gpotter2/random-coverage
[coverage] Small tests
2017-04-18 23:13:49 +02:00
gpotter2 0ef96fa9cb Add new tests that do not depend on sniffing
to reduce the randomness of coverage
2017-04-18 22:55:32 +02:00
Pierre Lalet 575a582e2f Merge pull request #586 from plorinquer/eap-fixes
EAP - fix variable length field computation
2017-04-18 22:14:32 +02:00
Pierre Lalet 8c56c54fa7 Merge pull request #599 from gpotter2/fix-windows-routes
[Routing/Windows] Improve routing system
2017-04-18 21:22:28 +02:00
Pierre Lorinquer 3adc44e65b LEAP - (Cisco) Lightweight EAP support added. 2017-04-18 14:07:57 +02:00
Pierre LALET 0227a5157c Fields/BitField: implement .i2len() 2017-04-17 14:56:20 +02:00
gpotter2 3288e99073 IPv6 support for Windows 7 + no powershell 2017-04-16 23:14:14 +02:00
Pierre Lalet 535885ed52 Merge pull request #606 from guedou/codecov_12
[coverage] Answering machines unit tests
2017-04-13 13:46:12 +02:00
Guillaume Valadon 01ac767be7 Answering machines unit tests 2017-04-13 11:25:05 +02:00
Lucas Pascal 46eac33866 [fix] requested correction 2017-04-13 08:50:30 +02:00
Guillaume Valadon c8289a7feb More tests for scapy/*.py files 2017-04-12 17:29:18 +02:00
Pierre Lalet 2868fa8703 Merge pull request #601 from guedou/smaller_ut_results
Smaller unit tests results
2017-04-10 17:34:17 +02:00
Guillaume Valadon 4bbee3b741 [coverage] More unit tests for scapy/*.py & bug fixes (#522)
* Code cleaning, unit tests
* Fix manuf DB path
* Specify seed in volatile objects using RandomEnumeration
* pypy fixes
2017-04-10 17:33:08 +02:00
Guillaume Valadon 5e0fe43f47 Smaller unit tests results 2017-04-10 15:48:19 +02:00
Lucas Pascal d8a0387bdd [test] basic SCTP testing 2017-04-10 11:23:32 +02:00
gpotter2 db7c9c1d87 Fix duplicated function + test 2017-04-09 13:07:54 +02:00
gpotter2 43af87fc49 Improve routes on windows 2017-04-09 13:07:54 +02:00
Thomas Faivre 8ea9b84b4a test/ipsec: add reference packet to check decryption
Currently, only internal encryption and decryption were tested but the
implementation might not be the on it is supposed to be.

Add reference packets generated using Ubuntu-16.04, iproute2 and ping:
 # ip -V
 ip utility, iproute2-ss151103
 # uname -a
 Linux router-vm 4.4.0-62-generic #83-Ubuntu SMP Wed Jan 18 14:10:15 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
 # ping -V
 ping utility, iputils-s20160308

Signed-off-by: Thomas Faivre <thomas.faivre@6wind.com>
2017-04-06 13:00:57 +02:00
Thomas Faivre e430ef6386 tests: fix some AES-CCM tests
In TLS, the AES-CCM test is commented out because CCM is not supported
by cryptography. But the combined_modes_ccm keyword is made to skip
these tests.

In IPsec, some IPv4 tests are located in the IPv6 section. Also add the
same combination of test for the AES-CCM as the other modes.

Also, there is some errors in the key material as the *MUST*
implementation uses a 16 bytes key and a 3 bytes nonce. Fix those
lengths.

Signed-off-by: Thomas Faivre <thomas.faivre@6wind.com>
2017-04-06 13:00:57 +02:00
Guillaume Valadon 1bb5499190 Support Raw IPv6 as PCAP linktype 2017-03-30 09:05:13 +02:00
Pierre Lalet 77b4ce3af4 Merge pull request #576 from guedou/PR#504_improved
[rewritten] PR #504
2017-03-29 12:10:05 +02:00
Pierre Lorinquer 2cd6d3347f Fix EAP_MD5 "len" field computation.
The default values of the "value_size" field is None. This can trigger
an issue
when computing the "len" field.

Test: str(EAP_MD5())

In order to fix this issue, the default value of the "value_size" field
has been set to 0.

Tests have been added in "regression.uts".

Added regression tests for EAP_TLS and EAP_FAST.

Use XStrLenField in EAP_MD5, EAP_TLS and EAP_FAST packets instead of StrLenField.

Delete blank lines before the class description (EAPOL, EAP, EAP_MD5, EAP_TLS and EAP_FAST packet classes).

"registered_options" dictionary was renamed "registered_methods"
(EAP-MD5, EAP-TLS etc are not options, but authentication methods).

EAP getlayer() and haslayer() methods have been overloaded in order to
allow access to a given "EAP layer" (such as EAP_TLS, for instance) by
providing the parent class name ("EAP"). For example, this is now
possible:

>>> eap_tls = EAP_TLS()
>>> EAP_TLS in eap_tls
True
>>> EAP in eap_tls
True
>>> eap_tls[EAP_TLS]
<EAP_TLS  |>
>>> eap_tls[EAP]
<EAP_TLS  |>

Regression tests have been added.
2017-03-28 21:36:16 +02:00
Thomas Faivre c73cdbc5f2 layers/ipsec: fix AH dissection
The ICV size is defined by the authentication algorithm in the SA.
it can be deduced from the payloadlen field but the padding len is
unknown aswell so there is no way to find both without the SA.

Assume everything in payloadlen is the ICV until the verification called
from the SA. Fill padding when possible.

Signed-off-by: Thomas Faivre <thomas.faivre@6wind.com>
2017-03-28 11:35:12 +02:00
Guillaume Valadon 1ab629e4d4 Small fix and unit tests 2017-03-23 16:09:05 +01:00
Pierre LALET a6e2c2f3cb Prevent sr() tests crashes 2017-03-22 08:24:44 +01:00
Pierre Lalet 037c992d29 Merge pull request #572 from gpotter2/scpy-30-prog
[convergence] Python 3- string byte tag
2017-03-22 07:21:59 +01:00
gpotter2 d2d7d2dac9 Auto parser on tests 2017-03-21 22:38:45 +01:00
gpotter2 3b36b636b6 Fix mock_windows tests 2017-03-20 21:03:41 +01:00
Guillaume Valadon a7a164350d Merge pull request #516 from plorinquer/ntp-update
NTP : update and small fixes
2017-03-16 09:13:16 +01:00
Pierre Lalet 0c7ad603d7 Merge pull request #558 from guedou/PR#182_improved
[rewritten] PR #182
2017-03-15 17:25:05 +01:00
Guillaume Valadon 996b02e6f1 Merge pull request #528 from gpotter2/patch-7
[coverage] Tests for ManufDB + Multiple fixes
2017-03-15 15:03:27 +01:00
Guillaume Valadon 597f30bea7 Merge pull request #537 from gpotter2/pickling-error
[Pickling] Add packets pickling support
2017-03-15 15:02:29 +01:00
Guillaume Valadon 35354325a8 Improved Segment Routing Header support - draft-06 2017-03-15 14:29:36 +01:00
gpotter2 911f1d6c45 Better tests + fixes 2017-03-15 13:17:49 +01:00
gpotter2 8666c13183 Only test ManuFDB when available 2017-03-15 13:17:49 +01:00
gpotter2 81fc163513 Added some windows arch tests 2017-03-15 13:17:48 +01:00
gpotter2 ab08f45646 Fix manufdb detection on windows 2017-03-15 13:15:11 +01:00
gpotter2 8fbcf84614 Added client tls tests on appveyor 2017-03-15 13:15:10 +01:00
Pierre Lalet 7d9004373b Merge pull request #498 from gpotter2/patch-windows-tests
[Windows] Fixed VBS fallback
2017-03-13 13:51:08 +01:00
gpotter2 f3016aca7c Add pickling methods 2017-03-11 01:38:28 +01:00
Guillaume Valadon caff8ac253 Better unit tests for inet6.py 2017-03-10 13:05:35 +01:00
Guillaume Valadon 4d8b461e69 Merge pull request #545 from p-l-/enh-flags
Flags: allow operations (| & ==) with strings
2017-03-10 12:59:01 +01:00
Pierre Lalet f982008e7a Merge pull request #543 from gpotter2/multi-utscapy
[coverage] Speed up all tests x2
2017-03-10 08:24:53 +01:00
Pierre Lalet 3f0ec99b54 Merge pull request #548 from gpotter2/fix-as-resolver
[Tests] Fix AS_RESOLVER
2017-03-09 22:37:25 +01:00
Pierre LALET 53a66dee44 Add tests for TCP.answers() 2017-03-09 13:47:59 +01:00
gpotter2 d5670e8b38 Fix AS_RESOLVER 2017-03-06 20:55:03 +01:00
Pierre LALET a6b12fc6eb Flags: allow operations (| & ==) with strings: pkt[TCP].flags |= "SA" 2017-03-06 07:56:52 +01:00
gpotter2 f2201b7f82 Add UTscapy multi-file support 2017-03-05 02:14:36 +01:00