Skip to content

fckorea/DD

Repository files navigation

DD

Detection-Dog

Description

This python script find files using string or regular expression.

Environment

  • Python3.7
  • pyinstaller [Optional for build]

Usages

python3 dd.py [options] file or directory list...

  • python3 dd.py /var/www/data /var/www/upload
  • python3 dd.py -v /var/www/data /var/www/upload
  • Options
    • --version: show program's version number and exit
    • -h, --help: show this help message and exit
    • -c <Config file path>, --config=<Config file path>: Set config file path. default: config.conf)
    • -o <Output file path>, --output=<Output file path>: Set output file path.
    • -t <Output file type>, --output_type=<Output file type>: Set output file type(csv, json, txt). default) csv
    • --no-sub-dir: Set no traversal sub directory. default) Traversal
    • -v, --verbose: Set verbose mode. default) False

Make config

  • json style
  • required names
    • updated: string, ex) 2019-08-20
    • extension: array in string, ex) [ ".php", ".aspx" ]
    • pattern: array in object
      • pattern object
        • type: string, "string"|"regex"|"hex"|"yara"
        • data: string
          • string: "passthru"
          • regex: "^(test|pass)$"
          • hex: "0F 1F 3C"
          • yara: "rule test { strings: $string = \"test\" wide ascii $string2 = \"pass\" condition: $string or $string2 }"

Build

for Windows

  • [pyinstaller --onefile dd.py] OR [build\build.bat]

for Linux

  • [pyinstaller --onefile dd.py] OR [build/build.sh]

About

DD is detection-dog.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages