Skip to content

Instantly share code, notes, and snippets.

@N0dr4x
N0dr4x / Scapy_TcpSession.py
Last active November 5, 2023 14:13
Simple Scapy TCP Session
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
# Author: N0dr4x (n0dr4x@protonmail.com)
'''
Simple Scapy TCP Session class that provide ability
to :
- execute the 3-way handshake (eg. connect)
- properly close connection (->FIN/ACK, <-FIN/ACK, ->ACK )
- send automatic acknowledgment of received tcp data packet