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
#include <stdint.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
void sha256_hash(const uint8_t *message, uint32_t len, uint32_t hash[8]); | |
extern void sha256_compress(uint32_t state[8], const uint8_t block[64]); | |
static const char alphabet[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; |
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
''' | |
Created on Oct 2, 2014 | |
@author: dcrobins | |
''' | |
import hashlib | |
import time | |
import string | |
import random |
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
import java.io.DataOutputStream; | |
import java.io.IOException; | |
import java.io.UnsupportedEncodingException; | |
import java.net.HttpURLConnection; | |
import java.net.URL; | |
import java.security.MessageDigest; | |
import java.security.NoSuchAlgorithmException; | |
import java.util.Random; | |
/** |
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
import smtplib | |
import imaplib | |
import getpass | |
import random | |
imapAddress = 'imap.googlemail.com' | |
smptAddress = 'smtp.gmail.com' | |
username = raw_input("Username:") | |
password = getpass.getpass("Password:") | |
toAddress = raw_input("Who to:") |
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 | |
def bfInterpreter(code,i): | |
dP = 0 | |
iP = 0 | |
cP = 0 | |
iTape = bytearray(i) | |
dTape = bytearray([0 for _ in range(1000)]) |
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 | |
ps -aux | grep chrome | tr -s ' ' | cut -d' ' -f4 | awk '{ SUM += $1} END { print SUM }' |
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
def diffusionStepLinearThreshold(G, sources): | |
newSources = set() | |
possibleTargets = [] | |
for node in sources: | |
G.node[node]["active"] = True | |
for node2 in G.neighbors(node): | |
if not G.node[node2]["active"]: | |
possibleTargets.append(node2) | |
possibleTargets = set(possibleTargets) |
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 | |
sudo apt-get update && sudo apt-get upgrade | |
sudo apt-get install -y build-essential libatlas-base-dev libatlas-dev libatlas3gf-base gfortran libpng12-dev libfreetype6-dev python-gtk2-dev libgtk2.0-dev python2.7 python-pip python2.7-dev mercurial libffi-dev libssl-dev libhdf5-dev libnetcdf-dev libgeos-dev libgdal-dev openjdk-7-jdk vim git libhdf5-dev libnetcdf-dev libhdf5-dev libnetcdf-dev python-opencv libgeos-dev libgeos++-dev libncurses5-dev htop jabref texstudio texlive-latex-extra openssh-server libzmq3-dev texlive-fonts-recommended | |
sudo apt-get build-dep -y python-mpltoolkits.basemap | |
sudo -H pip install --upgrade requests[security] |
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 | |
shell_exec("python sports.py '".file_get_contents("php://input")."'"); | |
$f = fopen("test.txt", "a"); | |
fwrite($f,"PHP - ".file_get_contents("php://input")."\n"); | |
fclose($f); | |
?> |
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 | |
import sys | |
import json | |
import urllib | |
import urllib2 | |
import random | |
f=open("test.txt","a") | |
if len(sys.argv)>1: | |
fullArgs = " ".join(sys.argv[1:]) |