import requests
import sys

#indirizzo arbitro
url = 'http://127.0.0.1:5000/'

def submit(service, flag):
	payload = {'flag':flag, 'team':'CuredPin', 'service':service}
	req = requests.post(url+'submit', data = payload)
	print url+'submit ' + " Servizio = " + str(service)
	print req.text
	return req.text

def getflagid(service):
    payl = {'enemy_name': 'LiquidPad', 'service':service}
    richiesta = requests.get(url+'flagid?', params=payl)
    print url+'getflagid ' + " Servizio = " + str(service)
    #print "\n"
    print richiesta.text + "\n"
    return richiesta.text