$> nc number.quals.seccon.jp 31337
-5, 5
The maximum number?
5
-5, -6, 3
The minimum number?
Timeout, bye.
$>
#!/usr/bin/python
#fr0g
import socket
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(("number.quals.seccon.jp",31337))
while True:
r = s.recv(4096)
print r+'\n'
if "Congratulations!" in r:
print "Done"
print s.recv(4096)
exit(0)
r = r.split("\n")
x = [int(z) for z in r[0].split(', ')]
if "max" in r[1]: r= max(x)
else: r=min(x)
print r
s.send(str(r)+'\n')
(2:1001)$ python seccon_prog100.py
0, 0
The maximum number?
0
3, -8, -6
The maximum number?
3
8, 2, 0, 1
The minimum number?
...
and again....
...
4082609020
1849373584, 2579779721, 3284424011, -1757530129, 2868081651, -4017098487, -3279906107, 3486716609, -938602290, 1585223682, 1412394680, 3667383351, 505304159, 3076882143, 210780544, 3944751413, 2653491153, -1234985717, -56795971, 288096568\
3, -103007064, 2825145914, 2563030760, -3577982870, 2699503568, -2199805080, 736180869, -3550545029, -2560573590, 247955255, 4113994008, 520979346, 4180825782, -3144683284, 452675862, -3241551949, 2372332425, -973186195, 2753568981, 18358\
06825, 1934218050, 15617840, -310833365, 743206465, 1612281630, -1956733736, -3518677300, -2272557663, 2284899745, -201745347, -2390208764, -1369757637, 3618750882, 1416647212, -1589090141, -3040903392, 4215197463, 3225324469, -90719289, \
-3246003052, -3691155023, 1190324039, 1063725756, 1957190911, 565236451, -763875785, -444443915, 1118206035, 438718766, -907163734, 147440687, -1280763509, 1769583909, -522016947, -1964847848, -1011062914, 647530867, -383256880, 825163252\
, -1177635768, 87203647, -2554654472, 377958532, 2985593530, -536804653, -597164617, 3405697636, 3354480489, 1542520742, 1994686578, -387330963, -3957370072, -3554237684, 3546696039, -3353312867, 1332293083, -1182704585, 526282429, 211091\
529, -2917384161, -52344676
The maximum number?
4215197463
Congratulations!
Done
The flag is SECCON{Programming is so fun!}
solved
fr0g