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
// Copyright (c) 2018 HarryR | |
// License: LGPL-3.0+ | |
pragma solidity ^0.5.0; | |
/** | |
* Implements MiMC-p/p over the altBN scalar field used by zkSNARKs | |
* | |
* See: https://eprint.iacr.org/2016/492.pdf | |
* |
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 <Windows.h> | |
#include <winternl.h> | |
#include <wchar.h> | |
#include <tlhelp32.h> | |
PPEB get_peb(void); | |
DWORD __stdcall unicode_ror13_hash(const WCHAR *unicode_string); | |
DWORD __stdcall ror13_hash(const char *string); | |
HMODULE __stdcall find_module_by_hash(DWORD hash); |
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
# Random element of S | |
ℝ ∈ S = λS -> {ω ∈ Ω | ℝ_ω ∈ S} | |
# A homomorphic function which transforms `x` from its additive | |
# group into its equivalent in the multiplicative group | |
G^x = {λx | x ∈ Z_(q-1)} -> X | |
# Maps `x` to `X` within `Z_q` while adhering to the random oracle model | |
H = λx -> X ∈ Z_q |
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
pragma solidity ^0.4.17; | |
contract ModExp { | |
// Wrapper for built-in bigint_modexp (contract 0x5) as described here https://github.com/ethereum/EIPs/pull/198 | |
function modexp(bytes memory _base, bytes memory _exp, bytes memory _mod) public view returns(bytes memory ret) { | |
uint256 bl = _base.length; | |
uint256 el = _exp.length; | |
uint256 ml = _mod.length; |
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
// This file is MIT Licensed. | |
// | |
// Copyright 2017 Christian Reitwiessner | |
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF O |
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 re | |
import sys | |
def parse_any(symbols): | |
while len(symbols): | |
if symbols[0] == '(': | |
return parse_list(symbols[1:]) | |
if symbols[0] == "'": | |
symbols, inner = parse_any(symbols[1:]) | |
return symbols, ['quote', inner] |
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
from flask import Flask | |
from flask import request | |
import json | |
import requests | |
import hashlib as hasher | |
import datetime as date | |
node = Flask(__name__) | |
# Define what a Snakecoin block is | |
class Block: |
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
""" | |
Cryptochannel provides a way of securely communicating with another | |
party where each party as a verifiable identity. | |
It provides both Client and Server components, where the Server has a known | |
long-term key but the Server doesn't need to know the client's long-term key | |
prior to it connecting. | |
The protocol enforces forward secrecy, where if either of the parties long-term | |
keys are leaked no intercepting party will be able to recover the contents of |
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 | |
""" | |
Technical Explanation: https://blog.sucuri.net/2017/02/content-injection-vulnerability-wordpress-rest-api.html | |
REST API Wordpress reference: https://developer.wordpress.org/rest-api/reference/posts/#update-a-post | |
Wordpress Version Affected: 4.7.0/4.7.1 | |
2017 - Coded by snoww0lf. | |
""" | |
import re |
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 | |
""" | |
Embed files into C arrays | |
Hacky solution because xxd didn't have enough features | |
""" | |
from __future__ import with_statement | |
from __future__ import print_function |
NewerOlder