Skip to content

Instantly share code, notes, and snippets.

from hashlib import sha256
import sys
from Crypto.Util.number import *
import number_util as nutil
P = 267336782497463360204553349940982883027638137556242083062698936408269688347005688891456763746542347101087588816598516438470521580823690287174602955234443428763823316700034360179480125173290116352018408224011457777828019316565914911469044306734393178495267664516045383245055214352730843748251826260401437050527
Q = 133668391248731680102276674970491441513819068778121041531349468204134844173502844445728381873271173550543794408299258219235260790411845143587301477617221714381911658350017180089740062586645058176009204112005728888914009658282957455734522153367196589247633832258022691622527607176365421874125913130200718525263
G = 2
# -*- coding: utf-8 -*-
from collections import Counter
import subprocess
import sys
from pwn import *
from Crypto.Util.number import *
PBITS = 201
#include<unordered_map>
#include<stdio.h>
using namespace std;
long long P = 577;
long long M = 1000000000000037LL;
long long T = 529873138871984LL;
char A = '0', B = 1;
long long S[32];
import re
import httplib
import sys
"""
Played around and found that single char change in plain text only affects a few char in cipher text,
and the positions of changed cipher char are determined by the position of changed plain char.
Given the format MMA{[SHA-1-like]}, we can determine the plain chars one by one.
"""
@csferng
csferng / Spark.md
Last active August 29, 2015 14:03
My spark notes

Spark Unit Test

Symptom: The SparkContext tried to bind to local hostname but with an foreign IP address and threw an exception.

Failed to bind to: example.com/10.82.109.140:0

Solution: Associate local hostname with 127.0.0.1 in /etc/hosts