Skip to content

Instantly share code, notes, and snippets.

View garyconstable's full-sized avatar
🏠
Working from home

Gary Constable garyconstable

🏠
Working from home
View GitHub Profile
@garyconstable
garyconstable / docker-cleanup-resources.md
Created July 20, 2019 13:23 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@garyconstable
garyconstable / Environments to bypass .htpasswd protection
Created May 9, 2019 11:41 — forked from tomschlick/Environments to bypass .htpasswd protection
This allows you to set certain urls/domains that are allowed to bypass a htpasswd protection layer, which is very useful for multiple environment setups (developement, staging, production)
#allows a single uri through the .htaccess password protection
SetEnvIf Request_URI "/testing_uri$" test_uri
#allows everything if its on a certain host
SetEnvIf HOST "^testing.yoursite.com" testing_url
SetEnvIf HOST "^yoursite.com" live_url
Order Deny,Allow
AuthName "Restricted Area"
AuthType Basic
@garyconstable
garyconstable / StockMismatchOnly.php
Created January 2, 2019 11:46
Magento - Configurable Product Checks
<html>
<head>
<title>Configurable product checks - only error items</title>
<style>
table {margin:25px 0px;}
td {padding:10px 5px;}
.green {color:green;}
.red {color:red;}
</style>
</head>
@garyconstable
garyconstable / port_scanner.php
Created August 16, 2018 14:48 — forked from akalongman/port_scanner.php
Port scanner on PHP
<?php
ini_set('max_execution_time', 0);
ini_set('memory_limit', -1);
$host = 'google.com';
$ports = array(21, 25, 80, 81, 110, 143, 443, 587, 2525, 3306);
foreach ($ports as $port)
{
$connection = @fsockopen($host, $port, $errno, $errstr, 2);
@garyconstable
garyconstable / install_php71.sh
Created July 19, 2018 10:55 — forked from wayanjimmy/install_php71.sh
Install php7.1 ubuntu 16.04 EC2
sudo apt-get update -y
sudo apt-get install -y nginx
sudo apt-get install -y python-software-properties
sudo add-apt-repository -y ppa:ondrej/php
sudo apt-get update -y
sudo apt-get install -y php7.1 php7.1-fpm php7.1-cli php7.1-common php7.1-mbstring php7.1-gd php7.1-intl php7.1-xml php7.1-mysql php7.1-mcrypt php7.1-zip
sudo apt-get install php-curl
@garyconstable
garyconstable / mailparse installation
Created February 16, 2018 13:00 — forked from thelbouffi/mailparse installation
how to instal mailparse on php7
REQUIREMENTS:
- php-pear (install automatically php7.0-xml and php-xml)
sudo apt-get install php-pear
-php7.0-mbstring
sudo apt-get install php7.0-mbstring
-php7.0-dev
sudo apt-get install php7.0-dev
INSTALLATION:
1- cd /tmp/xxxxxx (e.g: cd /tmp/pear/download)

#Wireless Penetration Testing Cheat Sheet

##WIRELESS ANTENNA

  • Open the Monitor Mode
root@uceka:~# ifconfig wlan0mon down
root@uceka:~# iwconfig wlan0mon mode monitor
root@uceka:~# ifconfig wlan0mon up
@garyconstable
garyconstable / get_gists.py
Created October 19, 2017 12:03 — forked from opexxx/get_gists.py
Download all gists for a specific user
# first: mkdir user && cd user && cp /path/to/get_gists.py .
# python3 get_gists.py user
import requests
import sys
from subprocess import call
user = sys.argv[1]
r = requests.get('https://api.github.com/users/{0}/gists'.format(user))
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<title>iScroll demo: simple</title>
@garyconstable
garyconstable / hack.md
Created July 27, 2016 15:32 — forked from tieorange/.sh
Hack
  1. airmon-ng -- see networks connections we have

  2. airmon-ng start wlan0 -- switch to the monitor mode (hacker mode)

  3. airodump-ng wlan0mon -- try to start scanning wifi. or show the processes wich interupts it

  4. airmon-ng stop wlan0 -- turn off the interface wlan0 (but leave the wlan0mon interface)

  5. airmon-ng check kill -- kill interupted processes