Skip to content

Instantly share code, notes, and snippets.

'''
Created on Sep 19, 2010
@author: Eloi Sanfelix < eloi AT limited-entropy.com >
'''
from PaddingOracle.InvalidBlockError import InvalidBlockError
import random
import struct
class CBCREncryptionOracle:
'''
Created on Jul 4, 2010
@author: Eloi Sanfelix < eloi AT limited-entropy.com >
'''
from Crypto.Cipher import AES
from PaddingOracle.DecryptionOracle import DecryptionOracle
from PaddingOracle.CBCREncryptionOracle import CBCREncryptionOracle
import random
@rcombs
rcombs / gist:5530290
Last active December 17, 2015 01:39
Quick write-up on Broken RSA from PicoCTF
C = ciphertext
M = plaintext
e = exponent (constant, 3)
n = modulus
RSA Algorithm: C = M^e % n
M[0] (M-Prime) = The flag we're trying to get. It's constant.
Choose 3 more values for M, call them M[1], M[2], M[3]. They should be very large.
#! /usr/bin/env node
s = [0,1,2,3,4,5,6,7];
//s[0] = 0; s[1] = 0x62b2595e; s[2] = 0xffffffff; s[3] = 0x92259269; s[4] = 0xffffffff; s[5] = 0xc8264b33; s[7] = 0; s[8] = 0x16519807;
s[1] = 0x60a04958; s[0] = 0x42121146; s[3] = 0x80241209; s[2] = 0x12018061; s[5] = 0x88244212; s[4] = 0x40220921; s[7] = 0x12118806; s[6] = 0x04501801;
var str = "";
for(var i = 0; i < 256; i+=2){
if(s[((i + 1) / 32) >>> 0] & (1 << ((i + 1) % 32))){
str += "1";
#! /usr/bin/env node
var fs = require("fs");
var argv = process.argv;
// 4556454e54484f52495a4f4e
// 0617071EE10C9F5B
#!/usr/bin/env python2.7
import argparse
from ConfigParser import ConfigParser
import os.path
import urllib2
import json
import sys
import base64
def main():
[00:04:02] *** Quits: nisstyre_ ([email protected]) (Connection reset by peer)
[02:03:03] *** Joins: hexium ([email protected])
[02:03:04] *** ChanServ sets mode: +o hexium
[02:10:40] *** Joins: Antior ([email protected])
[03:24:43] *** Joins: Stabby ([email protected])
[03:26:39] *** Quits: Knife ([email protected]) (Ping timeout)
[03:54:16] *** Quits: Antior ([email protected]) (Ping timeout)
[04:22:37] *** Joins: Velociraptors ([email protected])
[04:51:45] *** Quits: Velociraptors ([email protected]) (Quit: and *boom*)
[04:55:34] *** Joins: Velociraptors ([email protected])
testing
import re
import string
regex_string = '.*(dark ?star|black ?hole|location|darkstar|php ?[1-4]|solution|core ?dump|spam ?carver|bitwise|get ?key|robomunication|format ?[1-2]|rop ?[1-4]|ever ?green|more ?evil|mildly ?evil|overflow ?[1-5]|clue|eval ?[1-5]).*'
good_guys = {}
def good_guy(willie, trigger):
global good_guys
if trigger.admin: