Created
May 24, 2022 10:44
-
-
Save peci1/d2b06682ad511b595d5b1306c3a73258 to your computer and use it in GitHub Desktop.
Test of VSC7511 packet mangling bug
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Run "iperf3 -s" on "Computer 1" and "python3 gblox.py 10000 IP_OF_OTHER_COMPUTER_1" on "Computer 2". | |
# Run wireshark on Computer 2 and watch the packets arriving on port 5201. | |
# You will see all IP packets except the first in each UDP transmission have mangled 4 bytes | |
# near the beginning of their data sections. The test program shoud send repeated patterns of | |
# 0123456789abcdef, so it should be quite easy to spot. The 00 at position 7 and 8 is always | |
# there, 69 on the second blue line is also always there, while 87 seems to be randomly changing. | |
import socket | |
import sys | |
from math import ceil | |
l = 1480 | |
ip = "192.168.88.157" | |
port = 5201 | |
if len(sys.argv) > 1: | |
l = int(sys.argv[1]) | |
if len(sys.argv) > 2: | |
ip = sys.argv[2] | |
if len(sys.argv) > 3: | |
port = int(sys.argv[3]) | |
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) | |
payload = ("0123456789ABCDEF" * int(ceil(l/16)))[0:l] | |
s.sendto(bytes(payload, "ascii"), (ip, port)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment