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 | |
search(){ | |
echo "" | |
echo "Searching for $1 usage.." | |
echo "" | |
grep -nr --include \*.py --exclude test\*.py \ | |
--exclude \*_test\*.py\ | |
--exclude \*tempest\*\ | |
--exclude \*site-packages\* \ | |
-E $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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <time.h> | |
#include <memory.h> | |
void display_current_time(const char *name, short tz){ | |
time_t t; | |
struct tm *tdata; | |
time(&t); |
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
# demo of what people 'may' do.. | |
import bcrypt | |
from hashlib import sha1 | |
salt = bcrypt.gensalt() | |
def hash_password(password): | |
# as per article various mechanisms may be employed | |
# to truncate the passwords length to 72 chars | |
return bcrypt.hashpw(sha1(password).digest(), salt) |
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
// original source - http://sourceforge.net/projects/mancha/files/sec/altchainfail.c/download | |
/* | |
* alt.chain.fail | |
* stand-alone vulnerability tester for: CVE-2015-1793 | |
* by: mancha (@mancha140) | |
* | |
* based on test written by Matt Caswell for the OpenSSL project. | |
* | |
* gcc -o altchainfail altchainfail.c -lcrypto |
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 | |
for IP in `cat servers.txt`; do ssh $USER@$IP 'bash -s' < $@; done |
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 | |
# -*- coding: utf-8 -*- | |
import sys | |
import paramiko | |
import itertools | |
import multiprocessing | |
to_csv = lambda x: ', '.join(x) | |
allowed = lambda x: x == 'publickey' |
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
set et | |
set ts=4 | |
set sw=4 | |
set ai | |
set smarttab | |
set incsearch | |
set hlsearch | |
set wildmenu | |
set wildmode=list:longest,full | |
set backspace=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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <talloc.h> | |
#include <dirent.h> | |
#include <regex.h> | |
int main(int argc, char *argv[]) | |
{ | |
int arg; | |
regex_t pattern; |
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 | |
Recipient="user@example.com" | |
Subject="Status: $(date --date="7 days ago" +'%y-%m-%d')" | |
LastWeek=`task export status:completed end.after:$(date --date="7 days ago" "+%m/%d/%Y") |json_reformat | grep description | sed -e "s/\"description\"\: \"/\* /" -e "s/\",$//"` | |
ThisWeek=`task export status:pending |json_reformat | grep description | sed -e "s/\"description\"\: \"/\* /" -e "s/\",$//"` | |
Body=`echo -e "Last Week:\n\n${LastWeek}\n\nThis Week:\n\n${ThisWeek}\n\nGrant."` | |
thunderbird -compose "to='$Recipient',subject='$Subject',body='$Body'" |
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
#include <stdio.h> | |
int main() | |
{ | |
void *p; | |
if (((unsigned long)p) & 15 == 0) | |
puts("16 bit aligned"); | |
if (((unsigned long)p) & 23 == 0) | |
puts("24 bit aligned"); | |
if (((unsigned long)p) & 31 == 0) | |
puts("32 bit aligned"); |