Skip to content

Instantly share code, notes, and snippets.

@mic159
mic159 / scan.py
Created December 27, 2016 14:33
SYN scan in python
#!/usr/bin/env python
"""
Do a syn scan over a host.
To run as non-root:
> sudo setcap cap_net_raw=ep /home/michaelc/.virtualenvs/tmp/bin/python2
Sources:
- http://www.secdev.org/projects/scapy/doc/usage.html
- https://securitylair.wordpress.com/2014/02/21/simple-port-scanner-in-python-with-scapy-2/