-
Notifications
You must be signed in to change notification settings - Fork 171
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27 from mlsecproject/releaseprep
Release v0.1
- Loading branch information
Showing
29 changed files
with
2,662,949 additions
and
240 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,3 +51,5 @@ venv | |
# other data files | ||
crop.json | ||
harvest.csv | ||
|
||
.ipynb_checkpoints |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[Reaper] | ||
inbound_urls = inbound_urls.txt | ||
outbound_urls = outbound_urls.txt | ||
|
||
[Winnower] | ||
dnsdb_server = | ||
dnsdb_api = | ||
enrich_dns = 1 | ||
enrich_ip = 0 | ||
|
||
[Baler] | ||
tiq_directory = tiq_test | ||
winnow = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#!/usr/bin/env python | ||
|
||
import argparse | ||
import os | ||
import sys | ||
|
||
# Combine components | ||
from reaper import reap | ||
from thresher import thresh | ||
from baler import bale, tiq_output | ||
from winnower import winnow | ||
|
||
parser = argparse.ArgumentParser() | ||
parser.add_argument('-t', '--type', help="Specify output type. Currently supported: CSV") | ||
parser.add_argument('-f', '--file', help="Specify output file. Defaults to harvest.FILETYPE") | ||
parser.add_argument('-d', '--delete', help="Delete intermediate files", action="store_true") | ||
parser.add_argument('-e', '--enrich', help="Enrich data", action="store_true") | ||
parser.add_argument('--tiq-test', help="Output in tiq-test format", action="store_true") | ||
args = parser.parse_args() | ||
|
||
possible_types = ['csv', 'CSV'] | ||
|
||
if not args.type: | ||
out_type = 'csv' | ||
elif args.type not in possible_types: | ||
sys.exit('Invalid file type specified. Possible types are: %s' % possible_types) | ||
else: | ||
out_type = args.type | ||
|
||
if args.file: | ||
out_file = args.file | ||
else: | ||
out_file = 'harvest.'+out_type | ||
|
||
reap('harvest.json') | ||
thresh('harvest.json', 'crop.json') | ||
if args.enrich: | ||
winnow('crop.json', 'crop.json', 'enrich.json') | ||
bale('crop.json', out_file, out_type) | ||
|
||
if args.tiq-test: | ||
tiq_output('crop.json', 'enrich.json') | ||
|
||
if args.delete: | ||
# be careful with this when we support a JSON output type | ||
os.remove('harvest.json') | ||
os.remove('crop.json') |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Oops, something went wrong.