import os
import json
from exploit import Exploit

e = Exploit()

# CURRENT_FLAG_ID = "370"

''' LOCAL '''
# e.execute("0.0.0.0", "10001", CURRENT_FLAG_ID)

''' DOCKER '''
# e.execute("0.0.0.0", "10001", CURRENT_FLAG_ID)

''' PUSH TO DOCKER REGISTRY '''
meta = json.loads(os.environ['TARGETS'])[0]
ip = meta['ip']
ip = "172.17.0.1"
port = meta['port']
flag_id = meta['flag_id']
e.execute(ip, port, flag_id)

result = e.result()
print(result['FLAG'])

