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
openssl speed rsa |
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
PID=$(ps aux |\ | |
grep `w | \ | |
grep -E "\s(tty.*?|console.*?)\s" | \ | |
awk '{print $2}'` | \ | |
grep -v "grep" | \ | |
awk '{print $2}') |
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
for i in `ls -1 *.key`; do | |
cert=`echo $i |sed -e 's/\.key//'`; | |
c=$((\ | |
openssl x509 -noout -modulus -in "${cert}.crt" 2>/dev/null| \ | |
openssl md5; \ | |
openssl rsa -noout -modulus -in "${cert}.key" 2>/dev/null| \ | |
openssl md5)\ | |
|uniq \ | |
|wc -l); | |
test $c -gt 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
#!/bin/bash | |
gen_key() { | |
bits=4096 | |
keytype=$1 | |
ks="${keytype}_" | |
key="keys/ssh_host_${ks}key" | |
if [ ! -e "${key}" ] ; then | |
if [ "${keytype}" = 'dsa' ] ; then | |
bits=1024 | |
elif [ "${keytype}" = 'ecdsa' ] ; then |
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 | |
set -e | |
IMAGESIZE="990" # in Megabytes | |
USERNAME="bill" | |
PASSWORD="b0ard" | |
PACKAGES="wireless-tools xinit consolekit net-tools fonts-freefont-ttf ifplugd ifupdown hostname fontconfig-config fontconfig iputils-ping wpasupplicant curl binutils locales sudo openssh-server ntp usbmount patch less rsync sudo raspi-config matchbox chromium x11-xserver-utils xwit sqlite3 libnss3 vim" | |
PI_HOSTNAME=${PI_HOSTNAME-"dashboard${RANDOM:0:3}"} | |
# Print some configurations |
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
""" | |
Uncipher Cisco type 7 ciphered passwords | |
Usage: python uncipher.py <pass> where <pass> is the text of the type 7 password | |
Example: | |
$ python uncipher.py 094F4F1D1A0403 | |
catcat | |
""" | |
import sys |
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/sh | |
systemctl stop docker.service | |
rm $(which docker) | |
rm /var/run/docker.pid | |
curl -fsSL https://github.com/armhf-docker-library/binaries/releases/download/1.10.1/docker-1.10.1 \ | |
-o /usr/bin/docker | |
chmod u+x /usr/bin/docker | |
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 python | |
# | |
# log_format traffic '$http_host|$status|$bytes_sent|$msec|$remote_addr|$request_uri'; | |
import sys | |
import itertools, operator | |
from datetime import datetime | |
access_log = '/var/log/nginx/access.log' |
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 python | |
## | |
## This is a syslog server that is able to receive UDP based syslog | |
LOG = 'thelogfile.log' | |
HOST, PORT = "0.0.0.0", 514 | |
import logging |
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
import sys | |
from PySide.QtCore import QObject, Slot | |
from PySide.QtGui import QApplication | |
from PySide.QtWebKit import QWebView | |
html = """ | |
<html> | |
<body> | |
<h1>Hello!</h1><br> |