Skip to content

Instantly share code, notes, and snippets.

@userbox020
userbox020 / scapy_tcp_handshake.py
Created November 12, 2022 00:43 — forked from tintinweb/scapy_tcp_handshake.py
simple scapy tcp three-way handshake
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
# Author : [email protected] <github.com/tintinweb>
'''
A simple TCP three-way handshake example
#> python scapy_tcp_handshake.py
DEBUG:__main__:init: ('oststrom.com', 80)
DEBUG:__main__:start
DEBUG:__main__:SND: SYN
/**
* Generates a client ID in the format historically used by the Google Analytics
* JavaScript libraries. Note that any alphanumeric value may be used, but
* ideally each should be unique to a given client.
*
* More information on Client IDs:
* https://developers.google.com/analytics/devguides/collection/protocol/v1/email#client-id-cid
*/
function generateGaClientId() {