Skip to content

Instantly share code, notes, and snippets.

@N0dr4x
N0dr4x / Scapy_TcpSession.py
Last active January 11, 2025 23:21
Simple Scapy TCP Session
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
# Author: N0dr4x ([email protected])
'''
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