Example #1
0
def get_campaigns_for_report(stix_id):
  campaigns = []
  try: 
    campaigns = extract.get_campaigns_simple(None,stix_id,None)
  except NoDocFoundError:
    print("No campaigns found.")
  
  return campaigns
Example #2
0
def get_all_stix_campaigns( ):
    camps = []
    camp_docs = extract.get_campaigns_simple()
    # camp_docs = db.campaigns.find({"status":CampaignStatus.TERM_ONGOING})
    # get = dict_repr.get  
    for c in camp_docs: 
        #camp_status = VocabString.from_dict(c.get('status'))
        camps.append(Campaign.from_dict(c))
    return camps
Example #3
0
def get_unknown_campaigns( ):
    unk_camps = extract.get_campaigns_simple('Unknown', None, None)
    return unk_camps
Example #4
0
def get_ongoing_campaigns( ):
    ongoing_camps = extract.get_campaigns_simple(CampaignStatus.TERM_ONGOING, None, None)
    return ongoing_camps
Example #5
0
def get_historic_campaigns( ):
    historic_camps = extract.get_campaigns_simple(CampaignStatus.TERM_HISTORIC, None, None)
    return historic_camps
Example #6
0
def get_future_campaigns( ):
    future_camps = extract.get_campaigns_simple(CampaignStatus.TERM_FUTURE, None, None)
    return future_camps