We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1e857c9 commit fa2302fCopy full SHA for fa2302f
fuzz/pcap_fuzzer.py
@@ -0,0 +1,32 @@
1
+#!/usr/bin/python3
2
+
3
+# SPDX-License-Identifier: GPL-2.0-only
4
+# This file is part of Scapy
5
+# See https://scapy.net/ for more information
6
7
+import sys
8
+import atheris
9
10
+with atheris.instrument_imports():
11
+ import io
12
+ import scapy
13
+ import scapy.error
14
+ import scapy.layers.all
15
+ import scapy.utils
16
17
18
+def TestOneInput(input_bytes):
19
+ try:
20
+ for p in scapy.utils.rdpcap(io.BytesIO(input_bytes)):
21
+ p.summary()
22
+ except scapy.error.Scapy_Exception:
23
+ pass
24
25
26
+def main():
27
+ atheris.Setup(sys.argv, TestOneInput)
28
+ atheris.Fuzz()
29
30
31
+if __name__ == "__main__":
32
+ main()
0 commit comments