Skip to content

Instantly share code, notes, and snippets.

#! /usr/bin/env node
var fs = require("fs");
var argv = process.argv;
// 4556454e54484f52495a4f4e
// 0617071EE10C9F5B
#! /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";
@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.
'''
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
'''
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 Sep 19, 2010
@author: Eloi Sanfelix < eloi AT limited-entropy.com >
'''
from PaddingOracle.InvalidBlockError import InvalidBlockError
import random
import struct
class CBCREncryptionOracle:
4610 IceKarma
3098 Stereo
2722 sheepbat
2385 relsqui
2360 snark
1248 Glench
1061 FrowarDD
967 shoofle
855 Lhyzz
701 creature
syntax "awk" "\.awk$"
color brightyellow "\$[A-Za-z0-9_!@#$*?-]+"
color brightyellow "[[:<:]](ARGC|ARGIND|ARGV|BINMODE|CONVFMT|ENVIRON|ERRNO|FIELDWIDTHS)[[:>:]]"
color brightyellow "[[:<:]](FILENAME|FNR|FS|IGNORECASE|LINT|NF|NR|OFMT|OFS|ORS)[[:>:]]"
color brightyellow "[[:<:]](PROCINFO|RS|RT|RSTART|RLENGTH|SUBSEP|TEXTDOMAIN)[[:>:]]"
color brightblue "[[:<:]](function|extension|BEGIN|END)[[:>:]]"
color red "[-+*/%^|!=&<>?;:]|\\|\[|\]"
color brightblack "[[:<:]](for|if|while|do|else|in|delete|exit)[[:>:]]"
color brightblack "[[:<:]](break|continue|return)[[:>:]]"
407 Bucket
117 Snark
97 Relsqui
87 Stereo
69 njsg
68 IceKarma
65 Puddle
60 barometz
57 InitHello
53 Caffeine
3 Wh
2 xn
2 it
2 Th
1 tw
1 so
1 sh
1 pr
1 ic
1 fu