Пример #1
0
def get_members():
    setup_access()
    try:
        members = ThreatExchangeMember.objects(full_response=True)
    except pytxFetchError, e:
        return {'success': False,
                'message': e.message.message}
Пример #2
0
def get_members():
    setup_access()
    try:
        members = ThreatExchangeMember.objects(full_response=True)
    except pytxFetchError, e:
        return {'success': False,
                'message': e.message.message}
Пример #3
0
def members_main(args):
    """
    Call the /threat_exchange_members API endpoint and print the results.

    :param args: Command line arguments
    :type args: ArgumentParser    
    """
    members = ThreatExchangeMember.objects(dict_generator=True)
    for member in members:
        sys.stdout.write(json.dumps(member))
        sys.stdout.write('\n')
Пример #4
0
#!/usr/bin/env python

from pytx import init
from pytx import ThreatExchangeMember
from pytx.vocabulary import ThreatExchangeMember as tem

app_id = '<your-app-id>'
app_secret = '<your-app-secret>'

init(app_id, app_secret)

results = ThreatExchangeMember.objects()
for result in results:
    print '"%s","%s"' % (result.get(tem.NAME),
                         result.get(tem.ID))
Пример #5
0
def run():
    results = ThreatExchangeMember.objects()
    for result in results:
        print '"%s","%s"' % (result.get(tem.NAME),
                             result.get(tem.ID))
Пример #6
0
#!/usr/bin/env python

from pytx import init
from pytx import ThreatExchangeMember
from pytx.vocabulary import ThreatExchangeMember as tem

app_id = '<your-app-id>'
app_secret = '<your-app-secret>'

init(app_id, app_secret)

results = ThreatExchangeMember.objects()
for result in results:
    print '"%s","%s"' % (result.get(tem.NAME), result.get(tem.ID))
Пример #7
0
def run():
    results = ThreatExchangeMember.objects()
    for result in results:
        print '"%s","%s"' % (result.get(tem.NAME), result.get(tem.ID))