Skip to content

Instantly share code, notes, and snippets.

@darkxanter
darkxanter / tcp_flags.txt
Created July 2, 2021 11:19 — forked from tuxfight3r/tcp_flags.txt
tcpdump - reading tcp flags
##TCP FLAGS##
Unskilled Attackers Pester Real Security Folks
==============================================
TCPDUMP FLAGS
Unskilled = URG = (Not Displayed in Flag Field, Displayed elsewhere)
Attackers = ACK = (Not Displayed in Flag Field, Displayed elsewhere)
Pester = PSH = [P] (Push Data)
Real = RST = [R] (Reset Connection)
Security = SYN = [S] (Start Connection)
Ansible playbook to setup HTTPS using Let's encrypt on nginx.
The Ansible playbook installs everything needed to serve static files from a nginx server over HTTPS.
The server pass A rating on [SSL Labs](https://www.ssllabs.com/).
To use:
1. Install [Ansible](https://www.ansible.com/)
2. Setup an Ubuntu 16.04 server accessible over ssh
3. Create `/etc/ansible/hosts` according to template below and change example.com to your domain
4. Copy the rest of the files to an empty directory (`playbook.yml` in the root of that folder and the rest in the `templates` subfolder)
Ansible playbook to setup HTTPS using Let's encrypt on nginx.
The Ansible playbook installs everything needed to serve static files from a nginx server over HTTPS.
The server pass A rating on [SSL Labs](https://www.ssllabs.com/).
To use:
1. Install [Ansible](https://www.ansible.com/)
2. Setup an Ubuntu 16.04 server accessible over ssh
3. Create `/etc/ansible/hosts` according to template below and change example.com to your domain
4. Copy the rest of the files to an empty directory (`playbook.yml` in the root of that folder and the rest in the `templates` subfolder)
@darkxanter
darkxanter / uninstall_vmware.sh
Created March 21, 2020 06:46
Completely uninstall VMWare on macOS
#!/usr/bin/env bash
# Usage: bash uninstall_vmware.bash
remove() {
entry="$1"
echo -ne "Removing $entry ["
sudo rm -rf "$entry"
if [[ ! -e "$entry" ]]; then
echo -ne "OK"
@darkxanter
darkxanter / el_to_dnsmasq.sh
Created August 12, 2019 17:44 — forked from screeny05/el_to_dnsmasq.sh
Easylist to Dnsmasq
wget -q -nv https://easylist-downloads.adblockplus.org/easylist.txt -O list
egrep '^\|\|([a-Z\.]+)\^$' list | cut -d '^' -f1 | sed 's#||#address=/# ; s#$#/127.0.0.1#' | sort | uniq > list.dnsmasq
rm list
#!/bin/sh
easylist() {
echo -n 'Getting EasyList list ... '
out=/etc/dnsmasq.d/easylist.conf
tmp=$(mktemp)
wget -q -nv https://easylist-downloads.adblockplus.org/easylist.txt -O $tmp
egrep '^\|\|([a-Z\.]+)\^$' $tmp | cut -d '^' -f1 | sed 's#||#address=/# ; s#$#/127.0.0.1#' | sort | uniq >$tmp.$$
[ $? -eq 0 ] && sudo mv -f $tmp.$$ $out && wc -l $out || echo -42
rm $tmp
@darkxanter
darkxanter / bash-cheatsheet.sh
Created October 30, 2016 06:34 — forked from LeCoupa/bash-cheatsheet.sh
Bash CheatSheet for UNIX Systems
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
@darkxanter
darkxanter / batch-mkvmerge.sh
Created February 27, 2016 20:38 — forked from holms/batch-mkvmerge.sh
Batch mkvmerge
ls *.mkv | while read i; do mkvmerge -o "converted/${i}" "${i}" "${i%mkv}mka" ; done
@darkxanter
darkxanter / dnsmasq
Created November 26, 2015 11:45 — forked from denji/dnsmasq
nginx config - dynamic virtual hosts
# sudo apt-get install dnsmasq
# echo "address=/.dev/127.0.0.1" | sudo tee /etc/dnsmasq.conf
# sudo update-rc.d dnsmasq enable
# sudo service dnsmasq restart