I'm kind of at a loss. Rechecked everything. Really seems like the server is returning something different/incorrect compared to yesterday. Below is my simple Python code followed by the error.
#Jason A. Evans
#Joseph "Brian" Kelly
#AMSAA
#CPEG 697
#Resources
import taxii2client
#Set up client connection to server.
from taxii2client import Server
#Print out server details.
print ("Title: " + str(server.title))
print("Description: " + str(server.description))
print("URL: " + str(server.url))
print("Contact: " + str(server.contact))
print("Default: " + str(server.default))
print("# API Roots: " + str(len(server.api_roots)))
if(len(server.api_roots) > 0):
api_root = server.api_roots[0]
if len(server.api_roots[0].collections) > 0:
collection = api_root.collections[0]
print("\nAPI Root #" + str(1) + ", Collection #" + str(1) + " URL: " + collection.objects_url)
print("\n" + str(collection.get_objects())) #.get_object("indicator--9cb664cf-05dd-435a-94ee-bc6d44b6ccd1")))
server.close
Title: FreeTAXII Discovery Service
Description: A listing of API-Roots that this server knows about
Default: <taxii2client.ApiRoot object at 0x0353D430>
# API Roots: 2
{'collections': [{'id': 'd57c89ba-d128-4592-aca6-4ab6c1c097b3', 'title': 'ZeuS IP blocklist', 'description': 'A list of bad IPs (excluding hijacked sites and free hosting providers) from
abuse.ch', 'can_read': True, 'can_write': False, 'media_types': ['application/vnd.oasis.stix+json']}, {'id': '34f8c42d-213a-480d-9046-0bd8a8f25680', 'title': 'ZeuS domain blocklist', 'description': 'A list of bad domains (excluding hijacked sites) from
abuse.ch', 'can_read': True, 'can_write': False, 'media_types': ['application/vnd.oasis.stix+json']}]}
Traceback (most recent call last):
File "D:\Work\STIX_TAXII\taxii2_client.py", line 31, in <module>
print("\n" + str(collection.get_objects())) #.get_object("indicator--9cb664cf-05dd-435a-94ee-bc6d44b6ccd1")))
File "D:\Work\STIX_TAXII\taxii2client\__init__.py", line 204, in get_objects
return self._conn.get(self.objects_url, accept=MEDIA_TYPE_STIX_V20)
File "D:\Work\STIX_TAXII\taxii2client\__init__.py", line 484, in get
raise TAXIIServiceException(msg.format(content_type))
taxii2client.TAXIIServiceException: Unexpected Response Content-Type: text/plain; charset=utf-8