Skip to content

Commit

Permalink
Most tests now work
Browse files Browse the repository at this point in the history
For now, all current test cases work, but it will most likely need to be revised again in the future
  • Loading branch information
battleoverflow committed Mar 10, 2023
1 parent 7717600 commit b3f9442
Show file tree
Hide file tree
Showing 5 changed files with 78 additions and 138 deletions.
4 changes: 2 additions & 2 deletions .github/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install nose coverage collective.checkdocs
pip install nose collective.checkdocs
- name: Test scripts
run: |
nosetests --with-coverage --cover-package=iocextract --cover-xml
nosetests tests.py
python setup.py checkdocs
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,9 @@ import iocextract

content = \
"""
I really love example[.]com!
All the bots are on hxxp://example.com/bad/url these days.
C2: tcp://example[.]com:8989/bad
I really love example[.]com!
All the bots are on hxxp://example.com/bad/url these days.
C2: tcp://example[.]com:8989/bad
"""

for url in iocextract.extract_urls(content):
Expand Down Expand Up @@ -167,10 +167,10 @@ import iocextract

content = \
"""
http://example.com/bad/url
http://example.com:8989/bad
http://example.com
http://example.com:8989/bad
http://example.com/bad/url
http://example.com:8989/bad
http://example.com
http://example.com:8989/bad
"""

for url in iocextract.extract_urls(content, defang_data=False):
Expand All @@ -194,9 +194,9 @@ import iocextract

content = \
"""
I really love example[.]com!
All the bots are on hxxp://example.com/bad/url these days.
C2: tcp://example[.]com:8989/bad
I really love example[.]com!
All the bots are on hxxp://example.com/bad/url these days.
C2: tcp://example[.]com:8989/bad
"""

print(list(iocextract.extract_urls(content)))
Expand Down Expand Up @@ -425,7 +425,7 @@ Contributing
If you have a defang technique that doesn't make it through the extractor, or if you find any bugs, Pull Requests and Issues are always welcome. The library is released under a GPL-2.0 [license](https://github.com/InQuest/python-iocextract/blob/master/LICENSE).

Who's using iocextract?
----------------------
-----------------------

- [InQuest](https://inquest.net)
- [PacketTotal](https://www.packettotal.com)
Expand Down
6 changes: 0 additions & 6 deletions docs/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@ iocextract
.. image:: https://readthedocs.org/projects/iocextract/badge/?version=latest
:target: http://inquest.readthedocs.io/projects/iocextract/en/latest/?badge=latest
:alt: Documentation Status
.. .. image:: https://api.codacy.com/project/badge/Grade/920894593bde451c9277c56b7d9ab3e1
.. :target: https://app.codacy.com/app/InQuest/python-iocextract
.. :alt: Code Health
.. .. image:: https://api.codacy.com/project/badge/Coverage/920894593bde451c9277c56b7d9ab3e1
.. :target: https://app.codacy.com/app/InQuest/python-iocextract
.. :alt: Test Coverage
.. image:: http://img.shields.io/pypi/v/iocextract.svg
:target: https://pypi.python.org/pypi/iocextract
:alt: PyPi Version
Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import os
from setuptools import setup

README = open(os.path.join(os.path.dirname(__file__), 'README.md')).read()
# README = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read()

# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))

setup(
name='iocextract',
version='2.0.0',
version='1.15.0',
include_package_data=True,
py_modules=['iocextract',],
install_requires=['regex',],
Expand All @@ -24,7 +24,7 @@
},
license='GPL',
description='Advanced Indicator of Compromise (IOC) extractor.',
long_description=README,
long_description="README.md",
url='https://github.com/InQuest/python-iocextract',
author='InQuest Labs',
author_email='labs@inquest.net',
Expand Down

0 comments on commit b3f9442

Please sign in to comment.