ctf-2011

old assets from capture-the-flag ictf 2011

git clone https://9o.is/git/ctf-2011.git

read-json.py

(360B)


      1 #!/usr/bin/env python
      2 import urllib2
      3 from socket import *
      4 import time
      5 
      6 s = socket(AF_INET, SOCK_STREAM)
      7 s.connect_ex(('10.13.147.24', 55555))
      8 
      9 while True:
     10     print 'Getting jsons'
     11     f = urllib2.urlopen('http://192.35.222.36/index.json')
     12     for l in f.readlines():
     13         print 'pasting one'
     14         s.send(l)
     15     f.close()
     16     time.sleep(120)
     17 
     18 s.close()
     19