Skip to content

Instantly share code, notes, and snippets.

View V0idk's full-sized avatar

V0idk

View GitHub Profile
@gteissier
gteissier / tcpdump.py
Created December 14, 2019 15:19
Pythonic tcpdump: copy, paste, and enjoy
#!/usr/bin/env python
'''
It has been tested with either py2 or py3.
Beware ancient versions of Linux kernel which may not support SOCK_NONBLOCK
or the memory mapped ring buffer.
BPF filter listed below is compiled form of "not port 22"
if you want to change it, do something like
@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/
@wangruohui
wangruohui / Install NVIDIA Driver and CUDA.md
Last active September 27, 2025 02:50
Install NVIDIA Driver and CUDA on Ubuntu / CentOS / Fedora Linux OS
@manovotny
manovotny / script-already-running-check.sh
Last active November 12, 2024 10:33
Bash script to check if a script is already running.
#!/bin/bash
dupe_script=$(ps -ef | grep "SCRIPT_NAME.sh" | grep -v grep | wc -l | xargs)
if [ ${dupe_script} -gt 2 ]; then
echo -e "The SCRIPT_NAME.sh script was already running!"
exit 0
fi
@dahlia
dahlia / lisp.rb
Created September 2, 2010 07:52
30 minutes Lisp in Ruby
# 30 minutes Lisp in Ruby
# Hong Minhee <http://dahlia.kr/>
#
# This Lisp implementation does not provide a s-expression reader.
# Instead, it uses Ruby syntax like following code:
#
# [:def, :factorial,
# [:lambda, [:n],
# [:if, [:"=", :n, 1],
# 1,