Skip to content

Commit

Permalink
Merge pull request #34 from mandiant/feat/poetry_packaging
Browse files Browse the repository at this point in the history
Poetry packaging and dependency updates
  • Loading branch information
ewalshmndt authored Jul 12, 2023
2 parents 342dfcc + e2950fc commit 33c0cd5
Show file tree
Hide file tree
Showing 17 changed files with 679 additions and 655 deletions.
11 changes: 11 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.dockerignore
.git
.github
gha-creds-*.json
**/__pycache__
.pytest_cache
*.egg-info
*.egg
**/*.py[cod]
build
dist
Empty file modified LICENSE
100755 → 100644
Empty file.
13 changes: 0 additions & 13 deletions MANIFEST.in

This file was deleted.

28 changes: 0 additions & 28 deletions Pipfile

This file was deleted.

514 changes: 0 additions & 514 deletions Pipfile.lock

This file was deleted.

26 changes: 11 additions & 15 deletions README.md
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -7,38 +7,34 @@
StringSifter is a machine learning tool that automatically ranks strings based on their relevance for malware analysis.

# Quick Links
* [Technical Blogpost - *Learning to Rank Strings Output for Speedier Malware Analysis*](https://www.fireeye.com/blog/threat-research/2019/05/learning-to-rank-strings-output-for-speedier-malware-analysis.html)
* [Announcement Blogpost - *Open Sourcing StringSifter*](https://www.fireeye.com/blog/threat-research/2019/09/open-sourcing-stringsifter.html)
* [Technical Blogpost - *Learning to Rank Strings Output for Speedier Malware Analysis*](https://www.mandiant.com/resources/blog/learning-rank-strings-output-speedier-malware-analysis)
* [Announcement Blogpost - *Open Sourcing StringSifter*](https://www.mandiant.com/resources/blog/open-sourcing-stringsifter)
* [DerbyCon Talk - *StringSifter: Learning to Rank Strings Output for Speedier Malware Analysis*](https://youtu.be/pLiaVzOMJSk)
* [StringSifter releases on PyPi](https://pypi.org/project/stringsifter/)

# Usage

StringSifter requires Python version 3.6 or newer. Run the following commands to get the code, run unit tests, and use the tool:
StringSifter requires Python version 3.9 or newer. Run the following commands to get the code, run unit tests, and use the tool:

## Installation

Use `pip` to get running immediately. Choose the major version corresponding to your version of python:

| Python Version | Stringsifter Version | Branch | Example Pip Command |
| -------------- | -------------------- | --------- | ------------------------------- |
| 3.8+ | 2.x | master | `pip install stringsifter~=2.0` |
| 3.6, 3.7 | 1.x | python3.7 | `pip install stringsifter~=1.0` |
```sh
pip install stringsifter
```

For development, check out the correct branch for your Python version or stay on master for the latest supported version. Then use `pipenv`:
For development, use [poetry](https://python-poetry.org/):
```sh
git clone https://github.com/fireeye/stringsifter.git
git clone https://github.com/mandiant/stringsifter.git
cd stringsifter
git checkout python3.7 #Optional
pipenv install --dev
poetry install --with dev
```

## Running Unit Tests

To run unit tests from the StringSifter installation directory:

```sh
pipenv run tests
poetry run tests -v
```

## Running from the Command Line
Expand Down Expand Up @@ -139,4 +135,4 @@ We use [GitHub Issues](https://github.com/fireeye/stringsifter/issues) for posti
- Thanks to the FireEye Data Science (FDS) and FireEye Labs Reverse Engineering (FLARE) teams for review and feedback.
- StringSifter was designed and developed by Philip Tully (FDS), Matthew Haigh (FLARE), Jay Gibble (FLARE), and Michael Sikorski (FLARE).
- The StringSifter logo was designed by Josh Langner (FLARE).
- `flarestrings` is derived from the excellent tool [FLOSS](https://github.com/fireeye/flare-floss/blob/master/floss/strings.py#L7-L9).
- `flarestrings` is derived from the excellent tool [FLOSS](https://github.com/mandiant/flare-floss).
6 changes: 2 additions & 4 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
FROM python:3.8

RUN pip install --upgrade pip pipenv
FROM python:3.9

WORKDIR /src/stringsifter
COPY . /src/stringsifter

RUN pipenv install --system --deploy
RUN pip install -r requirements.txt
RUN pip install -e /src/stringsifter

CMD [ "/bin/bash" ]
Loading

0 comments on commit 33c0cd5

Please sign in to comment.