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/python3 | |
"""Create image from a directory | |
This script creates image whose contents are a given directoy on the filesystem. | |
Example usage: | |
$ mkdir mydir | |
$ echo A > mydir/a | |
$ ./dir2img.py -d mydir -i myimage.img |
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/python3 | |
import re | |
import io | |
class FtraceEventParser(object): | |
"""FTraceEventParser parses the text form of a single event | |
to a tuple of all the event's arguments. | |
Example usage: |
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/python3 | |
import argparse | |
import paramiko.client | |
import time | |
parser = argparse.ArgumentParser(description='stress test SSH channels') | |
parser.add_argument('-H', '--host', help='host to test') | |
parser.add_argument('-u', '--user', help='user to use SSH with') | |
parser.add_argument('-p', '--pwd', help='password to use SSH with') | |
parser.add_argument( |
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 <argp.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <fcntl.h> | |
#include <sys/stat.h> | |
#include <sys/types.h> | |
#include <unistd.h> | |
static char args_doc[] = "FILES to poll until missing"; |
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/python3 | |
""" | |
This scripts creates an isolated network environment, | |
and adds necessary configuration to the given QEMU command line to run | |
in this network. | |
WARNING: for development purposes only, allows PE for every user on the host. | |
Typical Usage |
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
setup xen environment |
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
alias gdbdump='hexdump -e '\''"0x%04_ax: " 8/1 "0x%02x\t" "\n"'\''' | |
# hexdump format is: '"0x%04_ax: " 8/1 "0x%02x\t" "\n"' |
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/python | |
import sys | |
import os | |
import tempfile | |
import re | |
starts_with_ifndef = re.compile(r'^\s*#ifndef.*\n#define.*\n') | |
ends_with_endif = re.compile(r'#endif.*$') |
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 <ctype.h> | |
#include <stdio.h> | |
struct buf { | |
unsigned char *p; | |
uint64_t len; | |
}; | |
void hexdump(struct buf buf) { | |
int i = 0; |
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 | |
if [ -z "$@" ]; then | |
echo Example usage: | |
echo $0 ubuntu/xenial64 | |
echo Output: | |
echo https://atlas.hashicorp.com/ubuntu/boxes/xenial64/versions/20160627.0.0/providers/virtualbox.box | |
echo https://atlas.hashicorp.com/ubuntu/boxes/xenial64/versions/20160625.0.0/providers/virtualbox.box | |
echo ... | |
exit 1 | |
fi |