Skip to content

Instantly share code, notes, and snippets.

View modsaid's full-sized avatar

Mahmoud Salem modsaid

View GitHub Profile
@modsaid
modsaid / dummy-web-server.py
Created May 30, 2018 20:47 — forked from bradmontgomery/dummy-web-server.py
a minimal http server in python. Responds to GET, HEAD, POST requests, but will fail on anything else.
#!/usr/bin/env python
"""
Very simple HTTP server in python.
Usage::
./dummy-web-server.py [<port>]
Send a GET request::
curl http://localhost
@modsaid
modsaid / iptables-rollback.sh
Created January 20, 2020 18:08
helpful to apply after iptables commands on remote servers to avoid locking yourself out
#!/bin/bash
sleep 2m
iptables -F
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD ACCEPT