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 zstd | |
from struct import pack as pk, unpack as up | |
import subprocess as sp | |
# Quick and dirty Spelunky 2 asset extraction, author SciresM. | |
# Assets are protected by a weird chacha20 variant. | |
# The developers made an unfortunate set of typos that | |
# significantly weakens the asset crypto... | |
def rotate_left(a, b): |
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 node | |
const { promisify } = require('util'); | |
/* eslint-disable import/no-extraneous-dependencies */ | |
const glob = promisify(require('glob')); | |
/* eslint-enable */ | |
const cryptFile = require('../util/cryptFile'); | |
const handler = async (command, secret, ...filePathArgs) => { |
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 binascii, sys, random, asn1 | |
from fractions import gcd | |
def extended_gcd(aa, bb): | |
lastremainder, remainder = abs(aa), abs(bb) | |
x, lastx, y, lasty = 0, 1, 1, 0 | |
while remainder: | |
lastremainder, (quotient, remainder) = remainder, divmod(lastremainder, remainder) | |
x, lastx = lastx - quotient*x, x | |
y, lasty = lasty - quotient*y, y |
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
{ | |
"countries": [ | |
{ | |
"country": "Afghanistan", | |
"states": ["Badakhshan", "Badghis", "Baghlan", "Balkh", "Bamian", "Daykondi", "Farah", "Faryab", "Ghazni", "Ghowr", "Helmand", "Herat", "Jowzjan", "Kabul", "Kandahar", "Kapisa", "Khost", "Konar", "Kondoz", "Laghman", "Lowgar", "Nangarhar", "Nimruz", "Nurestan", "Oruzgan", "Paktia", "Paktika", "Panjshir", "Parvan", "Samangan", "Sar-e Pol", "Takhar", "Vardak", "Zabol"] | |
}, | |
{ | |
"country": "Albania", | |
"states": ["Berat", "Dibres", "Durres", "Elbasan", "Fier", "Gjirokastre", "Korce", "Kukes", "Lezhe", "Shkoder", "Tirane", "Vlore"] | |
}, |
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
<# | |
$Metadata = @{ | |
Title = "Archive User ActiveDirectory and Mailbox" | |
Filename = "Archive-ADUserAndMailbox.ps1" | |
Description = "" | |
Tags = "powershell, activedirectory, archive, user, mailbox" | |
Project = "" | |
Author = "Janik von Rotz" | |
AuthorContact = "http://janikvonrotz.ch" | |
CreateDate = "2013-10-21" |
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 2013 Paul Brewer | |
// License: You may copy this file under the same terms as the MIT License | |
// located at http://opensource.org/licenses/MIT | |
// This file is provided AS IS WITH NO WARRANTY OF ANY KIND. All use is at your own risk. | |
// | |
// Status: July 13, 2013, Paul Brewer: First version. Simple test case passed. It needs to be more extensively tested. | |
// It lacks escaping for odd characters in strings, though a workaround is possible as described in the comments. | |
// | |
// July 14, 2013, Paul Brewer: JSON.stringify() used to stringify basic | |
// types such as string, number, null/undefined. This provides string |