Skip to content

Instantly share code, notes, and snippets.

View eiginn's full-sized avatar

Ryan Carter eiginn

View GitHub Profile
@eiginn
eiginn / sudo.py
Created April 22, 2019 17:43 — forked from perfecto25/sudo.py
saltstack sudo module
# Custom Execution Module - SUDO ACCESS
# tested for Centos 7
import salt
import time
import os
import logging
import re
from datetime import datetime, timedelta
import subprocess
#!/usr/bin/env python3
# GistID: 0fcc596bf72973eef955aa2361cc0e73
import sys
import os
import tempfile
from subprocess import call
import unidiff
if len(sys.argv) != 2:
@eiginn
eiginn / Netfilter-IPTables-Diagrams.md
Created September 18, 2018 22:09 — forked from nerdalert/Netfilter-IPTables-Diagrams.md
Linux NetFilter, IP Tables and Conntrack Diagrams

Linux NetFilter, IP Tables and Conntrack Diagrams

IPTABLES TABLES and CHAINS

IPTables has the following 4 built-in tables.

1) Filter Table

Filter is default table for iptables. So, if you don’t define you own table, you’ll be using filter table. Iptables’s filter table has the following built-in chains.

@eiginn
eiginn / 00_rings.md
Created March 10, 2018 06:10 — forked from keijiro/00_rings.md
KodeLife fragment shader sketch

gif

@eiginn
eiginn / 00_blot5.md
Created March 10, 2018 06:09 — forked from keijiro/00_blot5.md
KodeLife fragment shader sketch

gif

@eiginn
eiginn / 00_blot6.md
Created March 10, 2018 06:09 — forked from keijiro/00_blot6.md
KodeLife fragment shader sketch

gif

## Original Rules
# Generated by iptables-save v1.4.21 on Wed Oct 11 21:54:52 2017
*nat
:PREROUTING ACCEPT [5687:339260]
:INPUT ACCEPT [5673:337852]
:OUTPUT ACCEPT [74556:5261167]
:POSTROUTING ACCEPT [74560:5261407]
-A PREROUTING -p tcp -m tcp --dport 5222 -m state --state NEW -m statistic --mode nth --every 7 --packet 0 -m comment --comment tetra-proxy-0-chat-port -j DNAT --to-destination :5232
-A PREROUTING -p tcp -m tcp --dport 5223 -m state --state NEW -m statistic --mode nth --every 7 --packet 0 -m comment --comment tetra-proxy-0-chat-port-ssl -j DNAT --to-destination :5233
@eiginn
eiginn / gist:2c871955d33df0ff771e5b604df3fd75
Created September 27, 2017 18:21 — forked from gdestuynder/gist:0db99a45872d4bfc4dc9
Google authenticator (base32) and OATH (hex) TOTP QR code generator
#!/usr/bin/env python
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# Required packages (available from pip) : pyqrcode, pypng
import pyqrcode
import base64
@eiginn
eiginn / pam.md
Created September 27, 2017 15:45

Source

PAM Tutorial

© 2005–2016 by Wayne Pollock, Tampa Florida USA. All Rights Reserved.

Background: