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
from Crypto.Cipher import AES | |
from pwn import * | |
ciphertext = 'YWFhYWFhYWFhYWFhYWFhYQ==' | |
one = 'ICAgICAgICAgICAxNTc1Mw==' | |
two = 'ICAgICAgICAgICA2Nzc5Nw==' | |
three = 'ICAgICAgICAgICA0NDQ0NQ==' | |
four = 'ICAgICAgICAgICAyMzU2Mw==' | |
five = 'ICAgICAgICAgICAgNDc3OA==' |
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
from pwn import * | |
M = 2**31 | |
A = 7**6 | |
C = 5 | |
# bisect the possible set of correct numbers | |
def get_next_guess(low, high): | |
return low+(high-low)/2 |
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
<iframe src="file:///etc/passwd"> |
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
#include <stdlib.h> | |
#include <netdb.h> | |
#include <netinet/in.h> | |
#include <string.h> | |
#include <unistd.h> | |
#include <time.h> | |
int doprocessing (int sock); | |
int authtest(char *username, char *password); | |
int runcode(); |
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 hashlib | |
KEY = #NAH | |
FLAG = #NAH | |
message = 'Hello LOLCTF! Can you beat my super-leet stream cipher? If you can, the flag is: ' + FLAG | |
def sxor(s1, s2): | |
return ''.join([chr(ord(c1) ^ ord(c2)) for c1, c2 in zip(s1, s2)]) |
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
Ode to ECB - Ben Nagy | |
""" | |
Oh little one, you’re growing up | |
You’ll soon be writing C | |
You’ll treat your ints as pointers | |
You’ll nest the ternary | |
You’ll cut and paste from github | |
And try cryptography | |
But even in your darkest hour |
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
<?php | |
$FLAG = '[REDACTED]' //Flag removed | |
if (strcmp($_GET['password'],'[REDACTED]')==0){ // Real password has been removed | |
echo $FLAG; | |
}else{ | |
echo 'LOL NOPE'; | |
} | |
?> |
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
from Crypto.Cipher import AES | |
import sys | |
FLAG = '7368336c6c63306e72756c7a'.decode('hex') | |
def pkcs7_pad(text): | |
pad_num = 16 - (len(text) % 16) | |
return text + chr(pad_num) * pad_num | |
cipher = AES.new('yellow submarINE', AES.MODE_ECB) |