This file contains hidden or 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
module tb_md5; | |
// inputs | |
logic CLK; | |
logic RST; | |
logic START; | |
logic [511:0] DIN512; | |
// outputs | |
logic BUSY; | |
logic DONE; | |
logic [127:0] DOUT128; |
This file contains hidden or 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
module MD5 ( | |
input logic CLK, | |
input logic RST, | |
input logic [31:0] MSGLEN, | |
input logic [511:0] DIN512, | |
input logic START, | |
//output logic [31:0] BLKADDR | |
output logic BUSY, | |
output logic DONE, | |
//output logic ERR, |
This file contains hidden or 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
module MD5TRANSFORM ( | |
input logic [127:0] state_in, | |
//input logic [31:0] X[0:15], // 512 bit | |
input logic [0:15][31:0] X, // 32bit x 16. 512 bit | |
input logic [6:0] step, // 0 - 63 | |
output logic [127:0] state_out | |
); | |
// Constants | |
localparam [0:63][3:0] XSEL = { |
This file contains hidden or 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 <PS3BT.h> | |
#include <usbhub.h> | |
#include <SPI.h> | |
USB Usb; | |
BTD Btd(&Usb); | |
PS3BT PS3(&Btd); | |
byte buf[2]; |
This file contains hidden or 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/python | |
#-*- coding: utf-8 -*- | |
data = open('problem.jpeg', 'rb').read() | |
data_list = list(data) | |
broken_spot = data.find('\xff\xfc') | |
data_list[broken_spot] = '\xfe' | |
open('flag.png', 'wb').write(''.join(data_list)) |
This file contains hidden or 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/python | |
#-*- coding: utf-8 -*- | |
import hashlib | |
data1 = open('./shattered-1.pdf', 'rb').read() | |
data2 = open('./shattered-2.pdf', 'rb').read() | |
filesize = (2017*1024 + 2018*1024) / 2 # 2065920 |
This file contains hidden or 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/python | |
#-*- coding: utf-8- | |
def f(n): | |
a = 0 | |
b = 1 | |
for i in range(1, n): | |
a, b = b, a+b | |
return b |
This file contains hidden or 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/python | |
#-*- coding: utf-8 -*- | |
s = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz_{}' | |
c = 'POR4dnyTLHBfwbxAAZhe}}ocZR3Cxcftw9' | |
key = ('_KP2Za__aZ2PK_'*3)[:34] | |
plain = ['*']*len(c) | |
for i in range(len(c)): |
This file contains hidden or 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/python | |
#-*- coding: utf-8 -*- | |
s = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz_{}' | |
plain = 'SECCON{' + '*'*26 + '}' | |
c = 'POR4dnyTLHBfwbxAAZhe}}ocZR3Cxcftw9' | |
key = ['*']*34 | |
for i in range(len(plain)): | |
if plain[i] == '*': continue |
This file contains hidden or 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 <math.h> | |
void main(int t,int i,int j){ | |
unsigned char p[]="###<f_YM\204g_YM\204g_Y_H #<f_YM\204g_YM\204g_Y_H #+-?[WKAMYJ/7 #+-?[WKgH #+-?[WKAMYJ/7hk\206\203tk\\YJAfkkk"; | |
for(i=0;t=1;i=(i+1)%(sizeof(p)-1)){ | |
double x = pow(1.05946309435931,p[i]/6+13); | |
for(j=1+p[i]%6;t++%(8192/j);){ | |
putchar(t>>5|(int)(t*x)); | |
} |
NewerOlder