diff --git a/CTFs_and_WarGames/2014/9447/nosql/capture.pcap b/CTFs_and_WarGames/2014/9447/nosql/capture.pcap new file mode 100755 index 0000000..3b8bb50 Binary files /dev/null and b/CTFs_and_WarGames/2014/9447/nosql/capture.pcap differ diff --git a/CTFs_and_WarGames/2014/9447/nosql/client.py b/CTFs_and_WarGames/2014/9447/nosql/client.py new file mode 100755 index 0000000..a837e01 --- /dev/null +++ b/CTFs_and_WarGames/2014/9447/nosql/client.py @@ -0,0 +1,50 @@ +#!/usr/bin/python2 + +import os, socket, struct, sys +from Crypto.Cipher import AES + + +class EncryptedStream(object): + key = 'this is not the flag nor the key'[:16] + + def __init__(self, host, port): + self.sock = socket.socket() + self.sock.connect((host, port)) + + def send(self, msg): + while len(msg) % 16: + msg += '\0' + + iv = os.urandom(16) + aes = AES.new(self.key, AES.MODE_ECB, iv) + enc = aes.encrypt(msg) + + self.sock.send(struct.pack('