diff --git a/.gitignore b/.gitignore index 82ed207..1c07c3a 100644 --- a/.gitignore +++ b/.gitignore @@ -177,6 +177,5 @@ assets/base.png docs/_site/ docs/assets/ docs/.jekyll-cache/ -docs/_config_dev.yml output/ test_run/ diff --git a/docs/_config_dev.yml b/docs/_config_dev.yml new file mode 100644 index 0000000..c0e63fb --- /dev/null +++ b/docs/_config_dev.yml @@ -0,0 +1,160 @@ +theme: just-the-docs + +title: DarkSpider +description: Anatomy of the Network structure of the Dark web to detect illicit websites +baseurl: "/DarkSpider" # the subpath of your site, e.g. /blog +url: "https://proxzima.dev" # the base hostname & protocol for your site, e.g. http://example.com +repository: PROxZIMA/DarkSpider # for github-metadata + +permalink: pretty + +exclude: + # from https://github.com/jekyll/jekyll/blob/master/lib/site_template/_config.yml: + - .sass-cache/ + - .jekyll-cache/ + - gemfiles/ + - Gemfile + - Gemfile.lock + - node_modules/ + - vendor/bundle/ + - vendor/cache/ + - vendor/gems/ + - vendor/ruby/ + # specific to the theme website: + - bin/ + - lib/ + - "*.gemspec" + - "*.gem" + - LICENSE.txt + - package.json + - package-lock.json + - Rakefile + - README.md + +# Set a path/url to a logo that will be displayed instead of the title +logo: "./logo.png" + +# Enable or disable the site search +# Supports true (default) or false +search_enabled: true +search: + # Split pages into sections that can be searched individually + # Supports 1 - 6, default: 2 + heading_level: 2 + # Maximum amount of previews per search result + # Default: 3 + previews: 2 + # Maximum amount of words to display before a matched word in the preview + # Default: 5 + preview_words_before: 3 + # Maximum amount of words to display after a matched word in the preview + # Default: 10 + preview_words_after: 3 + # Set the search token separator + # Default: /[\s\-/]+/ + # Example: enable support for hyphenated search words + tokenizer_separator: /[\s/]+/ + # Display the relative url in search results + # Supports true (default) or false + rel_url: true + # Enable or disable the search button that appears in the bottom right corner of every page + # Supports true or false (default) + button: false + +# To disable support for mermaid diagrams (https://mermaid-js.github.io/mermaid/), +# comment out the `mermaid` and `version` keys below +# By default, consuming the theme as a gem leaves mermaid disabled; it is opt-in +# mermaid: + # Version of mermaid library + # Pick an available version from https://cdn.jsdelivr.net/npm/mermaid/ + # version: "9.1.6" + # Put any additional configuration, such as setting the theme, in _includes/mermaid_config.js + # See also docs/ui-components/code + +# Enable or disable heading anchors +heading_anchors: true + +# Aux links for the upper right navigation +aux_links: + "DarkSpider on GitHub": + - "//github.com/PROxZIMA/DarkSpider" + +# Makes Aux links open in a new tab. Default is false +aux_links_new_tab: true + +# Sort order for navigation links +# nav_sort: case_insensitive # default, equivalent to nil +nav_sort: case_sensitive # Capital letters sorted before lowercase + +# External navigation links +# nav_external_links: +# - title: DarkSpider on GitHub +# url: https://github.com/PROxZIMA/DarkSpider + +# Footer content +# appears at the bottom of every page's main content + +# Back to top link +back_to_top: true +back_to_top_text: "Back to top" + +footer_content: false + +# Footer last edited timestamp +last_edit_timestamp: true # show or hide edit time - page must have `last_modified_date` defined in the frontmatter +last_edit_time_format: "%b %e %Y at %I:%M %p" # uses ruby's time format: https://ruby-doc.org/stdlib-2.7.0/libdoc/time/rdoc/Time.html + + + +# Footer "Edit this page on GitHub" link text +gh_edit_link: true # show or hide edit this page link +gh_edit_link_text: "Edit this page on GitHub" +gh_edit_repository: "https://github.com/PROxZIMA/DarkSpider" # the github URL for your repo +gh_edit_branch: "master" # the branch that your docs is served from +gh_edit_source: docs # the source that your files originate from +gh_edit_view_mode: "tree" # "tree" or "edit" if you want the user to jump into the editor immediately + +# Color scheme currently only supports "dark", "light"/nil (default), or a custom scheme that you define +color_scheme: dark + +callouts_opacity: 0.2 + +callouts_level: quiet # or loud +callouts: + highlight: + color: yellow + important: + title: Important + color: blue + new: + title: New + color: green + note: + title: Note + color: purple + warning: + title: Warning + color: red + +# Google Analytics Tracking (optional) +# e.g, UA-1234567-89 +ga_tracking: UA-228707195-1 +ga_tracking_anonymize_ip: true # Use GDPR compliant Google Analytics settings (true/nil by default) + +plugins: + - jekyll-seo-tag + +# kramdown: +# syntax_highlighter_opts: +# block: +# line_numbers: true + +compress_html: + clippings: all + comments: all + endings: all + startings: [] + blanklines: false + profile: false + # ignore: + # envs: all diff --git a/docs/contribute.md b/docs/contribute.md index 3ac8ab2..554880a 100644 --- a/docs/contribute.md +++ b/docs/contribute.md @@ -5,20 +5,40 @@ nav_order: 4 --- # Contributing -- Feel free to contribute on this project! Just fork it, make any change on your fork and add a pull request on current branch! Any advice, help or questions would be appreciated :shipit: +- Feel free to contribute to this project! Just fork it, make any changes on your fork and add a pull request on the current branch! Any advice, help or questions would be appreciated :shipit: [![Contributors](https://contrib.rocks/image?repo=PROxZIMA/DarkSpider "Contributors")](https://github.com/PROxZIMA/DarkSpider/graphs/contributors) [![Stats](https://repobeats.axiom.co/api/embed/6bcd62cf68bef8f509296f236f21b39f6af128a6.svg "Repobeats analytics image")](https://github.com/PROxZIMA/DarkSpider/pulse) -# Testing -- Test cases must be updated as we don't want any unexpected exception to pop-up in-between long runs. -- Before committing, make sure to run all the test cases and check the code coverage. +## Documentation +- This site uses [Just the Docs](https://github.com/just-the-docs/just-the-docs). +- Install dependencies using + +```bash +$ cd docs +$ bundle install +``` +- Test locally using + +```bash +$ cd docs +$ bundle exec jekyll serve -c _config_dev.yml --livereload --open-url +``` + +## Testing +- Test cases must be updated as we don't want any unexpected exceptions to pop up in between long runs. +- Install `pytest` and `coverage`. + +```bash +$ pip install -r requirements_dev.txt +``` +- Before committing, make sure to run all the test cases. ```bash $ coverage run -m pytest -q --tb=short modules/tests/ ``` -- Or a module specific test cases using +- Or a module-specific test case using ```bash $ pytest -q --tb=short modules/tests/test_extractor.py::TestCheckerFunctions::test_outex_002 diff --git a/requirements.txt b/requirements.txt index f1a7594..a08f041 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,10 +1,9 @@ -beautifulsoup4>=4.7.1 -Gooey>=1.0.7 -matplotlib>=3.5.2 -networkx>=2.8.5 -psutil>=5.9.0 +beautifulsoup4>=4.11.1 +Gooey>=1.0.8.1 +matplotlib>=3.6.1 +networkx>=2.8.8 +psutil>=5.9.2 requests>=2.25.1 seaborn>=0.11.1 yara-python>=4.2.0 -pysocks -lxml +lxml>=4.9.1 diff --git a/requirements_dev.txt b/requirements_dev.txt new file mode 100644 index 0000000..f9b7cf5 --- /dev/null +++ b/requirements_dev.txt @@ -0,0 +1,3 @@ +-r requirements.txt +pysocks>=1.7.1 +coverage>=7.0.5