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 | |
PORT="$1" | |
FILE="$2" | |
SIZE=`/usr/bin/wc -c "$FILE" | /usr/bin/awk '{print$1}'` | |
( | |
/bin/cat <<EoF | |
HTTP/1.1 200 OK | |
Content-Type: application/octet-stream |
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
superfish-tester.rya.nc xxx.xxx.xxx.xxx - - [19/Feb/2015:20:17:08 +0000] "GET /ca.js?cb=1424377029329 HTTP/1.1" 200 111 "https://rya.nc/superfish" "Mozilla/5.0 (Linux; Android 4.4.4; A0001 Build/KTU84Q) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.109 Mobile Safari/537.36" |
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 -eu | |
if [ "$#" != 2 ]; then | |
echo >&2 "Usage: $0 <clone_url> <public_username> | |
A VERY SLOW mining implementation. This should give you an idea of | |
where to start, but it probably won't successfully mine you any | |
Gitcoins. |
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 | |
import re | |
import sys | |
import itertools | |
import collections | |
from struct import pack, pack_into, unpack, unpack_from, calcsize | |
from binascii import crc32, hexlify, unhexlify | |
from pprint import pprint |
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 | |
# taken from https://gist.github.com/jjarmoc/1299906 | |
function atoi | |
{ | |
#Returns the integer representation of an IP arg, passed in ascii dotted-decimal notation (x.x.x.x) | |
IP=$1; IPNUM=0 | |
for (( i=0 ; i<4 ; ++i )); do | |
((IPNUM+=${IP%%.*}*$((256**$((3-${i})))))) | |
IP=${IP#*.} |
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
/* crypto/rsa/rsa_gen.c */ | |
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | |
* All rights reserved. | |
* | |
* This package is an SSL implementation written | |
* by Eric Young (eay@cryptsoft.com). | |
* The implementation was written so as to conform with Netscapes SSL. | |
* | |
* This library is free for commercial and non-commercial use as long as | |
* the following conditions are aheared to. The following conditions |
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/env python | |
# Needs python 2.7 or later | |
from collections import OrderedDict | |
substitutions = OrderedDict([(3, 'Fizz'), (5, 'Buzz'), (7, 'Quxx')]) | |
for i in xrange(1, 128): | |
line = '' | |
# This depends on the ordering of keys in the dict |
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/env python | |
from collections import OrderedDict | |
substitutions = OrderedDict([(3, 'Fizz'), (5, 'Buzz'), (7, 'Quxx')]) | |
max_i = 127 | |
# Pre-compute all outputs - should be faster. | |
output_list = ['']*(max_i+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
#define _LARGEFILE_SOURCE | |
#define _LARGEFILE64_SOURCE | |
#include <unistd.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <fcntl.h> | |
#include <stdio.h> | |
int main(int argc, char **argv) { |
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 <string.h> | |
#include <signal.h> | |
#include <unistd.h> | |
#include <fcntl.h> | |
#include <time.h> | |
#include <sys/types.h> | |
#include <sys/stat.h> |