Skip to content

Instantly share code, notes, and snippets.

@intrd
Last active March 3, 2017 05:59
Show Gist options
  • Save intrd/c6435d9cd77341375943bbbd59322ad2 to your computer and use it in GitHub Desktop.
Save intrd/c6435d9cd77341375943bbbd59322ad2 to your computer and use it in GitHub Desktop.
Parser to crypto50-cryptoquizz @ insomni'hack 2017
#!/usr/bin/python
## Parser to crypto50-cryptoquizz @ insomni'hack 2017
# @author intrd - http://dann.com.br/
# @license Creative Commons Attribution-ShareAlike 4.0 International License - http://creativecommons.org/licenses/by-sa/4.0/
# int_wiki.py - https://gist.github.com/intrd/2c19ee22c3bd98ed07612c6ad3adc25d
# int_netcat.py - https://gist.github.com/intrd/00a39c83f752acf81775bfa9721e745a
import re, sys, string, time
sys.path.append("../../LIBS/")
from int_netcat import Netcat
from int_wiki import wikiGet
#filled w/ int_wiki.wikiGet()
fullnames = {'Serge Vaudenay': 1968, 'Ron Rivest': 1947, 'Yvo Desmedt': 1956, 'Joan Daemen': 1965, 'Antoine Joux': 1967, 'Amos Fiat': 1956, 'Daniel Bleichenbacher': 1964, 'Jacques Stern': 1949, 'Paul van Oorschot': 1962, 'Bart Preneel': 1963, 'Taher Elgamal': 1955, 'Shafi Goldwasser': 1958, 'Alex Biryukov': 1969, 'Rafail Ostrovsky': 1963, 'Mitsuru Matsui': 1961, 'Donald Davies': 1924, 'Daniel J. Bernstein': 1971, 'David Chaum': 1955, 'Oded Goldreich': 1957, 'Mihir Bellare': 1962, 'Jean-Jacques Quisquater': 1945, 'Gilles Brassard': 1955, 'Ueli Maurer': 1960, 'Silvio Micali': 1954, 'Scott Vanstone': 1947, 'Don Coppersmith': 1950, 'Bruce Schneier': 1963, 'Wang Xiaoyun': 1966, 'Claude Shannon': 1916, 'Neal Koblitz': 1948, 'Ivan Damgard': 1956, 'Vincent Rijmen': 1970, 'Amit Sahai': 1974, 'Kaisa Nyberg': 1948, 'Alan Turing': 1912, 'Markus Jakobsson': 1968, 'Adi Shamir': 1952, 'Ross Anderson': 1956, 'Whitfield Diffie': 1944, 'Jacques Patarin': 1965, 'Michael O. Rabin': 1931, 'Dan Boneh': 1969, 'Ronald Cramer': 1968, 'Claus-Peter Schnorr': 1943, 'Moni Naor': 1961, 'Horst Feistel': 1915, 'Niels Ferguson': 1965, 'Shai Halevi': 1966, 'Douglas Stinson': 1956, 'Yehuda Lindell': 1971, 'Ralph Merkle': 1952, 'Nigel P. Smart': 1967, 'Lars Knudsen': 1962, 'Victor S. Miller': 1947, 'Arjen K. Lenstra': 1956, 'Paul Kocher': 1973, 'David Naccache': 1967, 'Eli Biham': 1960, 'Tatsuaki Okamoto': 1952, 'Jim Massey': 1934, 'Martin Hellman': 1945, 'Xuejia Lai': 1954 }
nc = Netcat('quizz.teaser.insomnihack.ch', 1031)
#data=nc.read()
data=nc.read_until(' ?')
print(data)
while 1:
time.sleep(1)
data=nc.read(2048)
print(data)
name=re.search(r'of (.*) \?', data).group(1)
#name.replace(" ", "_") #to search w/ int_wiki.wikiGet()
print name
for i in fullnames.items():
if i[0] == name:
print str(i[1])
nc.write(str(i[1]) + '\n')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment