csirtgadgets / bearded-avenger

CIF v3 -- the fastest way to consume threat intelligence
https://csirtgadgets.com/collective-intelligence-framework
Mozilla Public License 2.0
184 stars 51 forks source link

deployment script for centos7 does not include wget #219

Closed chusta closed 7 years ago

chusta commented 7 years ago

csirtg-smrt uses wget, which doesn't come standard with centos7

[cif@localhost vagrant]$ csirtg-smrt -d
2016-12-29 20:46:37,240 - INFO - root[276] - loglevel is: DEBUG
2016-12-29 20:46:37,241 - INFO - root[316] - starting...
2016-12-29 20:46:37,242 - DEBUG - csirtg_smrt.smrt[89] - processing /etc/cif/rules/default/alienvault.yml
2016-12-29 20:46:37,249 - DEBUG - csirtg_smrt.fetcher[42] - /var/lib/cif/smrt/reputation.alienvault.com
2016-12-29 20:46:37,249 - DEBUG - csirtg_smrt.fetcher[61] - CACHE /var/lib/cif/smrt/reputation.alienvault.com/reputation.data
2016-12-29 20:46:37,250 - DEBUG - csirtg_smrt.smrt[128] - loading parser: <class 'pattern.Pattern'>
2016-12-29 20:46:37,250 - DEBUG - csirtg_smrt.fetcher[100] - ['wget', '--header', 'User-Agent: csirtg-smrt/0.0.0a17 (csirtgadgets.org)', '--timeout=120', 'https://reputation.alienvault.com/reputation.data', '-N', '-P', '/var/lib/cif/smrt/reputation.alienvault.com']
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/csirtg_smrt/smrt.py", line 330, in main
    for i in s.process(r, f, limit=args.limit, data=data, filters=filters):
  File "/usr/lib/python2.7/site-packages/csirtg_smrt/smrt.py", line 188, in process
    for indicator_batch in feed_indicators_batches:
  File "/usr/lib/python2.7/site-packages/csirtg_smrt/utils/__init__.py", line 92, in chunk
    for x in it:
  File "/usr/lib/python2.7/site-packages/csirtg_smrt/smrt.py", line 184, in <genexpr>
    feed_indicators = (i for i in feed_indicators if not self.is_archived_with_log(i))
  File "/usr/lib/python2.7/site-packages/csirtg_smrt/smrt.py", line 178, in <genexpr>
    feed_indicators = (self.clean_indicator(i) for i in feed_indicators)
  File "/usr/lib/python2.7/site-packages/csirtg_smrt/parser/pattern.py", line 36, in process
    for l in self.fetcher.process(split=self.split):
  File "/usr/lib/python2.7/site-packages/csirtg_smrt/fetcher.py", line 111, in process
    subprocess.check_call(cmd)
  File "/usr/lib64/python2.7/subprocess.py", line 537, in check_call
    retcode = call(*popenargs, **kwargs)
  File "/usr/lib64/python2.7/subprocess.py", line 524, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib64/python2.7/subprocess.py", line 711, in __init__
    errread, errwrite)
  File "/usr/lib64/python2.7/subprocess.py", line 1327, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
Traceback (most recent call last):
  File "/bin/csirtg-smrt", line 11, in <module>
    load_entry_point('csirtg-smrt==0.0.0a17', 'console_scripts', 'csirtg-smrt')()
  File "/usr/lib/python2.7/site-packages/csirtg_smrt/smrt.py", line 355, in main
    raise e
OSError: [Errno 2] No such file or directory
wesyoung commented 7 years ago

also: https://github.com/csirtgadgets/csirtg-smrt-py/issues/104