Browse Source

Merge pull request #395 from SteveClement/master

chg: [deps] pyfaup seems to be required but not installed
pull/402/head
Steve Clement 2 years ago
committed by GitHub
parent
commit
e981966776
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      .travis.yml
  2. 1
      REQUIREMENTS
  3. 26
      docs/install.md
  4. 6
      misp_modules/modules/expansion/vmray_submit.py
  5. 5
      tests/test_expansions.py

10
.travis.yml

@ -9,14 +9,22 @@ python:
- "3.6"
- "3.6-dev"
- "3.7-dev"
- "3.8-dev"
before_install:
- docker build -t misp-modules --build-arg BUILD_DATE=$(date -u +"%Y-%m-%d") docker/
install:
- sudo apt-get install libzbar0 libzbar-dev libpoppler-cpp-dev tesseract-ocr libfuzzy-dev
- sudo apt-get install libzbar0 libzbar-dev libpoppler-cpp-dev tesseract-ocr libfuzzy-dev libcaca-dev liblua5.3-dev
- pip install pipenv
- pipenv install --dev
# install gtcaca
- git clone git://github.com/stricaud/gtcaca.git
- mkdir -p gtcaca/build
- pushd gtcaca/build
- cmake .. && make
- sudo make install
- popd
# install pyfaup
- git clone https://github.com/stricaud/faup.git
- pushd faup/build

1
REQUIREMENTS

@ -8,6 +8,7 @@
-e git+https://github.com/cartertemm/ODTReader.git/@49d6938693f6faa3ff09998f86dba551ae3a996b#egg=odtreader
-e git+https://github.com/sebdraven/pydnstrails@48c1f740025c51289f43a24863d1845ff12fd21a#egg=pydnstrails
-e git+https://github.com/sebdraven/pyonyphe@1ce15581beebb13e841193a08a2eb6f967855fcb#egg=pyonyphe
-e git+https://github.com/stricaud/faup.git#egg=pyfaup&subdirectory=src/lib/bindings/python
aiohttp==3.4.4
antlr4-python3-runtime==4.8 ; python_version >= '3'
apiosintds==1.8.3

26
docs/install.md

@ -21,8 +21,28 @@ $SUDO_WWW virtualenv -p python3 /var/www/MISP/venv
# END with virtualenv
cd /usr/local/src/
sudo git clone https://github.com/MISP/misp-modules.git
cd misp-modules
# Ideally you add your user to the staff group and make /usr/local/src group writeable, below follows an example with user misp
sudo adduser misp staff
sudo chmod 2775 /usr/local/src
sudo chown root:staff /usr/local/src
git clone https://github.com/MISP/misp-modules.git
git clone git://github.com/stricaud/faup.git faup
git clone git://github.com/stricaud/gtcaca.git gtcaca
# Install gtcaca/faup
cd gtcaca
mkdir -p build
cd build
cmake .. && make
sudo make install
cd ../../faup
mkdir -p build
cd build
cmake .. && make
sudo make install
sudo ldconfig
cd ../../misp-modules
# BEGIN with virtualenv:
$SUDO_WWW /var/www/MISP/venv/bin/pip install -I -r REQUIREMENTS
@ -168,4 +188,4 @@ tar xvf misp-module-bundeled.tar.bz2 -C misp-modules-bundle
cd misp-modules-bundle
ls -1|while read line; do sudo pip3 install --force-reinstall --ignore-installed --upgrade --no-index --no-deps ${line};done
~~~
Next you can follow standard install procedure.
Next you can follow standard install procedure.

6
misp_modules/modules/expansion/vmray_submit.py

@ -73,9 +73,9 @@ def handler(q=False):
do_not_include_vmrayjobids = request["config"].get("do_not_include_vmrayjobids")
try:
shareable = bool(strtobool(shareable)) # Do we want the sample to be shared?
reanalyze = not bool(strtobool(do_not_reanalyze)) # Always reanalyze the sample?
include_vmrayjobids = not bool(strtobool(do_not_include_vmrayjobids)) # Include the references to VMRay job IDs
shareable = bool(strtobool(shareable)) # Do we want the sample to be shared?
reanalyze = not bool(strtobool(do_not_reanalyze)) # Always reanalyze the sample?
include_vmrayjobids = not bool(strtobool(do_not_include_vmrayjobids)) # Include the references to VMRay job IDs
except ValueError:
misperrors["error"] = "Error while processing settings. Please double-check your values."
return misperrors

5
tests/test_expansions.py

@ -105,9 +105,10 @@ class TestExpansions(unittest.TestCase):
query = {"module": "btc_steroids", "btc": "1ES14c7qLb5CYhLMUekctxLgc1FV2Ti9DA"}
response = self.misp_modules_post(query)
try:
self.assertTrue(self.get_values(response).startswith('\n\nAddress:\t1ES14c7qLb5CYhLMUekctxLgc1FV2Ti9DA\nBalance:\t0.0000000000 BTC (+0.0005355700 BTC / -0.0005355700 BTC)'))
self.assertTrue(self.get_values(response).startswith('\n\nAddress:\t1ES14c7qLb5CYhLMUekctxLgc1FV2Ti9DA\nBalance:\t0.0002126800 BTC (+0.0007482500 BTC / -0.0005355700 BTC)'))
except Exception:
self.assertEqual(self.get_values(response), 'Not a valid BTC address')
self.assertEqual(self.get_values(response), 'Not a valid BTC address, or Balance has changed')
def test_btc_scam_check(self):
query = {"module": "btc_scam_check", "btc": "1ES14c7qLb5CYhLMUekctxLgc1FV2Ti9DA"}

Loading…
Cancel
Save