# -*- coding: utf-8 -*-
from setuptools import setup

packages = \
['yara_scanner']

package_data = \
{'': ['*']}

install_requires = \
['plyara>=2.0.3,<3.0.0',
 'psutil>=5.6.7,<6.0.0',
 'pygments>=2.5.2,<3.0.0',
 'yara-python>=3.11.0,<4.0.0']

entry_points = \
{'console_scripts': ['scan = yara_scanner:main',
                     'ysc = ysc:main',
                     'yss = yss:main']}

setup_kwargs = {
    'name': 'yara-scanner',
    'version': '1.0.15',
    'description': 'A Python wrapper library for libyara and a local server for fully utilizing the CPUs of the system to scan with yara.',
    'long_description': 'A Python wrapper library for libyara and a local server for fully utilizing the CPUs of the system to scan with yara...with additional capabilities.\n\n### yara_scanner ###\n\ninstall\n- **pip3 option**\n\n   pip3 install yara_scanner\n- **git clone option**\n\n   git clone https://github.com/ace-ecosystem/yara_scanner.git\n\n   cd yara_scanner\n\n   sudo python3 setup.py install\n\n- **ready to scan**\n\n   scan --help\n   ```\n   usage: scan [-h] [-r] [--from-stdin] [--debug] [-j] [-t] [-y YARA_RULES]\n               [-Y YARA_DIRS] [-G YARA_REPOS] [-c] [-b BLACKLISTED_RULES]\n               [-B BLACKLISTED_RULES_PATH] [-d SIGNATURE_DIR]\n               [PATHS [PATHS ...]]\n\n   Scan the given file with yara using all available rulesets.\n\n   positional arguments:\n     PATHS                 One or more files or directories to scan with yara.\n\n   optional arguments:\n     -h, --help            show this help message and exit\n     -r, --recursive       Recursively scan directories.\n     --from-stdin          Read the list of files to scan from stdin.\n     --debug               Log debug level messages.\n     -j, --dump-json       Dump JSON details of matches. Otherwise just list the\n                           rules that hit.\n     -t, --test            Test each yara file separately against different types\n                           of buffers for performance issues.\n     -y YARA_RULES, --yara-rules YARA_RULES\n                           One yara rule to load. You can specify more than one\n                           of these.\n     -Y YARA_DIRS, --yara-dirs YARA_DIRS\n                           One directory containing yara rules to load. You can\n                           specify more than one of these.\n     -G YARA_REPOS, --yara-repos YARA_REPOS\n                           One directory that is a git repository that contains\n                           yara rules to load. You can specify more than one of\n                           these.\n     -c, --compile-only    Compile the rules and exit.\n     -b BLACKLISTED_RULES, --blacklist BLACKLISTED_RULES\n                           A rule to blacklist (remove from the results.) You can\n                           specify more than one of these options.\n     -B BLACKLISTED_RULES_PATH, --blacklist-path BLACKLISTED_RULES_PATH\n                           Path to a file that contains a list of rules to\n                           blacklist, one per line.\n   ```\n   \n- **example usage:**\n   - scan a single file\n      ```\n      scan ms0day.ppsx\n      ```\n   - scan a single file and generate JSON output\n      ```\n      scan -j ms0day.ppsx\n      scan -j ms0day.ppsx | json_pp\n      ```  \n   - scan multiple files\n      ```\n      scan file1 file2 file3\n      ```\n   - scan all files in a directory and all sub-directories\n      ```\n      scan -r dir\n      ```\n   - scan a list of files passed in on standard input\n      ``` \n      find dridex -type f | scan --from-stdin\n      ```\n   - scan a single file with a single yara rule\n      ```   \n      scan -y myrule.yar target_file\n      ```\n   - scan a single file with all rules in a given directory\n     ```\n     scan -Y my_rule_dir target_file\n     ```\n   - check the syntax of all the rules in a given directory\n      ```\n      scan -c -Y my_rule_dir\n      ```\n- ## additional features: ##\n\n- **Blacklisting**\n   \n   The scan tool also supports "blacklisting" rules. These are specified by using the -b and -B command line options. These allow you to exclude certain rules from the search results rather than making changes to the rules themselves. We use this technique to allow us to use the open source yara repository as-is, rather than trying to maintain a modified branch.       \n  \n  \n- **Tagging**\n   ```\n   Any tags specified in the rules will end up as tags in ACE. All tags should be lower case.\n\n   Some tags can influence a specific behavior within our tools. For example, using the tag \'informational\' will mark a rule as such and may not actually generate an alert if it is detected.\n\n   To add tags to a yara rule, use a space-separated list after the rule name.\n\n      rule shellcode_1: shellcode informational\n      {\n          ...\n   In the above example, "shellcode", and "informational" are all tags.\n   ```\n- **Rule Output Selection**\n\n   You can specify when a rule should (or should not) be displayed. This allows you to prevent some rules from matching against certain kinds of files, or for a rule to be matched against only one specific file.\n\n   The rules are specified as metadata name and value pairs. (example rule syntax)\n   ```\n   rule html_rule: odd html\n   {\n   meta:\n      mime_type = "text/html"\n   strings:\n      ...\n   condition:\n      ...\n   }\n   ```\n   - Metadata Names and Descriptions\n      ```\n      file_ext   | Matches everything past the first period in the file name.\n      file_name  | Matches the full name of the file (not including the path.)\n      full_path  | Matches against the full path of the file, if one was specified.\n      mime_type  | Matches against the output of file -b --mime-type.\n      ```\n      The value of the metadata variable is the string to match. By default the library matches as is, but special modifiers can be used to perform sub string matching and regular expressions. ** Special modifiers are added to the beginning of the value (or list of values) and apply to all values in the string. **\n      \n   - Matching Modifiers\n      ```\n      !     | negation    | Negates the match. This can be placed before other modifiers.\n      sub:  | sub-search  | Match if this string appears anywhere.\n      re:   | regex       | Match if the regular expression is satisfied.\n      ```\n      Values can be a comma separated list of values, regardless of the modifiers. Therefor, commas cannot be used in the patterns.\n\n   - Rule Selection Examples\n\n      Only match files the end with the .exe extension.\n      ``` \n      file_ext = "exe"\n      ```\n      Only match files that end with .exe, .dll or .ocx extension.\n      ```\n      file_ext = "exe, dll, ocx"\n      ```\n      Only match files that do not end with .exe, .dll or .ocx extension.\n      ```\n      file_ext = "!exe, dll, ocx"\n      ```\n      Only matches files that do not end with .bmp.\n      ```\n      file_ext = "!bmp"\n      ```\n      Only match files identified as PDF despite the file name.\n      ```\n      mime_type = "application/pdf"\n      ```\n      Only match files not identified as images.\n      ```\n      mime_type = "!sub:image/"\n      ```\n      Only match files that look like an invoice phish.\n      ```\n      file_name = "re:invoice[0-9]+\\\\.doc$"\n      ```\n      Only match files in a subdirectory called /ole.\n      ```\n      full_path = "sub:/ole/"\n      ```\n   - Modifiers\n   \n      Yara rules can contain the special meta value of modifiers that changes the way our tools interprets the results of the yara scan.  This is currently only supported by the ACE platform.  The value takes the form of a comma separated list of key=value pairs.  The following values are currently supported.\n      ```\n      no_alert | Causes the yara rule to not trigger an alert by itself. Normally any match of a yara would become a detection point and trigger an alert.\n      ```\n      ```\n      directive=VALUE\t| Causes the given directive to be applied to the file being scanned. This can be used to trigger other actions on the file.\n      ```\n',
    'author': 'John Davison',
    'author_email': 'unixfreak0037@gmail.com',
    'maintainer': None,
    'maintainer_email': None,
    'url': 'https://github.com/ace-ecosystem/yara_scanner',
    'packages': packages,
    'package_data': package_data,
    'install_requires': install_requires,
    'entry_points': entry_points,
    'python_requires': '>=3.6,<4.0',
}


setup(**setup_kwargs)
