Skip to content

Instantly share code, notes, and snippets.

@kytta
kytta / tcp.py
Last active December 27, 2021 12:03
TCP packet built from scratch in Python 3
# tcp.py -- example of building and sending a raw TCP packet
# Copyright (C) 2020 Nikita Karamov <nick@karamoff.dev>
#
# With code from Scapy (changes documented below)
# Copyright (C) 2019 Philippe Biondi <phil@secdev.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.