This file contains hidden or 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 python3 | |
import argparse | |
import crypt | |
import getpass | |
import random | |
import string | |
import sys | |
def parse_args(): | |
parser = argparse.ArgumentParser(description='Generate SHA-512 crypt() password hash with configurable number of rounds') |
This file contains hidden or 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 python | |
from __future__ import print_function | |
from __future__ import unicode_literals | |
import socket | |
import sys | |
import threading | |
import time | |
if len(sys.argv) != 2: |
This file contains hidden or 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 python | |
from __future__ import print_function | |
from __future__ import unicode_literals | |
import os | |
import tempfile | |
import subprocess | |
import sys | |
if not 'SSH_KEY' in os.environ: |
This file contains hidden or 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 | |
set -e | |
WORK_DIR="$(mktemp --directory --tmpdir build-root.XXXXXXXX)" | |
trap 'rm -rf "${WORK_DIR}"' EXIT | |
if [ -f rootcache.tar.gz ]; then | |
tar --extract --numeric-owner --gzip --file rootcache.tar.gz --directory "${WORK_DIR}" | |
else | |
debootstrap --variant=minbase --include=linux-image-amd64,ifupdown,isc-dhcp-client,openssh-server,less,nano,python,lvm2,debootstrap jessie "${WORK_DIR}" http://httpredir.debian.org/debian |
This file contains hidden or 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 python | |
from __future__ import print_function | |
from __future__ import unicode_literals | |
values = {} | |
field_headers_type = None | |
field_headers = None | |
with open('/proc/net/snmp') as fh: | |
for line in fh: | |
line = line.strip() |
This file contains hidden or 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 | |
header('Content-Type: text/plain; charset=utf-8'); | |
foreach (array('_GET', '_POST', '_REQUEST', '_COOKIE', '_SERVER', '_ENV') as $v) { | |
echo '$' . $v . ' = ' . var_export($$v, TRUE) . ";\n"; | |
} |
This file contains hidden or 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 python | |
# | |
# Generate a string of phonemes. | |
# | |
# Based on the pwgen utility, however this is not | |
# suitable for creating passwords. | |
# | |
# pwgen: http://sourceforge.net/projects/pwgen/ | |
# |
This file contains hidden or 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 | |
/* Test script for GeoIP IPv6 lookups. | |
* Databases can be downloaded from: | |
* http://dev.maxmind.com/geoip/legacy/geolite/ | |
*/ | |
/* Path to the GeoIP library in Piwik. */ | |
$PIWIK_GEOIP_DIR = '/source/piwik/libs/MaxMindGeoIP'; |
This file contains hidden or 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 | |
set -e | |
cd /tmp | |
mkdir testroot | |
debootstrap wheezy testroot http://http.debian.net/debian | |
chroot testroot env LC_ALL=C apt-get install --no-install-recommends linux-image-amd64 | |
rm -rf testroot/var/cache/apt/* | |
ln -s bin/bash testroot/init | |
echo 'T0:23:respawn:/sbin/getty -L ttyS0 115200 vt100' >>testroot/etc/inittab | |
passwd -R "$(pwd)"/testroot -d root |
This file contains hidden or 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
virt-install --hvm --name testvm2 --ram 512 --disk 'path=/testvm2.img,size=4,bus=virtio' --os-type 'linux' --location 'http://http.debian.net/debian/dists/wheezy/main/installer-amd64/' --graphics vnc,port=5900,listen=0.0.0.0,keymap=no --network bridge=br0,model=virtio |
NewerOlder