def get_token(ip): ua = UserAgent('POST', '{}/getSecure'.format(ip)) r = ua.SendRequest() return read_response(r)
ua = UserAgent('POST', '{}/getSecure'.format(ip)) r = ua.SendRequest() return read_response(r) if __name__ == '__main__': ip = '54.209.150.110' headers = DEFAULT_HEADERS parameters = { 'username': '******', 'token': get_token(ip), } # Activity #1 ua = UserAgent('POST', '{}/'.format(ip)) r = ua.SendRequest() f = read_response(r) print('Activity 1 Flag: ' + f) # Activity #2 ua = UserAgent('POST', '{}/getFlag2'.format(ip), parameters=parameters, ie_headers=True) r = ua.SendRequest() f = read_response(r) print('Activity 2 Flag: ' + f) # Activity #3 ua = UserAgent('POST', '{}/getFlag3Challenge'.format(ip),