Skip to main content

Advanced string manipulation and pattern matching engine with unique DSL syntax

Project description

Gamma Scanner

Advanced string manipulation and pattern matching engine with unique DSL syntax.

Installation

pip install gamma-scanner

Quick Start

# Run the CLI
gamma-scanner --help

# Or use the short command
gamma --help

# Interactive mode
gamma interactive

# Scan files for threats
gamma scan rules.gamma target_file.txt

# Show examples
gamma examples

Unique DSL Syntax

Gamma Scanner features a completely original DSL syntax that uses natural language keywords:

HUNT SQLInjection:
    LOOK FOR:
        sqli_pattern ~ text "' OR '1'='1" IGNORE case
        union_attack ~ text "UNION SELECT" IGNORE case
    WHEN:
        file HAS sqli_pattern EITHER content HOLDS union_attack
    THEN:
        ALERT "SQL injection detected!"

Features

  • Unique DSL: Natural language-like syntax for pattern matching
  • Security Focus: Built-in patterns for common security threats
  • High Performance: Optimized execution engine with caching
  • CLI Tools: Comprehensive command-line interface
  • Pattern Library: Extensible pattern matching capabilities

Commands

  • scan - Scan files/directories for security threats
  • hunt - Hunt for specific threats using rules
  • detect - Detect patterns in files
  • validate - Validate DSL rule syntax
  • test - Test rules against sample data
  • compile - Compile DSL rules
  • analyze - Comprehensive file analysis
  • interactive - Interactive DSL shell
  • benchmark - Benchmark rule performance
  • examples - Show DSL syntax examples

Python API

from gamma_scanner import GammaScanner

scanner = GammaScanner()

# Compile a rule
rule = '''
HUNT TestRule:
    LOOK FOR:
        pattern ~ text "test" IGNORE case
    WHEN:
        content HAS pattern
    THEN:
        ALERT "Found test!"
'''

success = scanner.compile_rule(rule)
if success:
    results = scanner.match("This is a test string")
    print(results)

License

MIT License - see LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gamma_scanner-1.0.1.tar.gz (52.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gamma_scanner-1.0.1-py3-none-any.whl (41.1 kB view details)

Uploaded Python 3

File details

Details for the file gamma_scanner-1.0.1.tar.gz.

File metadata

  • Download URL: gamma_scanner-1.0.1.tar.gz
  • Upload date:
  • Size: 52.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.13

File hashes

Hashes for gamma_scanner-1.0.1.tar.gz
Algorithm Hash digest
SHA256 0288a7c960164ceb16469d9878dab87886bbf7b5ffcf2c15209569d7b9de4660
MD5 0a0f1da8257f9d225e9519af5c47884a
BLAKE2b-256 c771d5fa6bd312e4c6aa6b3b1124d96890a2e137d54e8234209f4fd9f3b2057c

See more details on using hashes here.

File details

Details for the file gamma_scanner-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: gamma_scanner-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 41.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.13

File hashes

Hashes for gamma_scanner-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 eeff51f66991eebe01d872c48a5ee7d304c7234ae3f258239ed5889e46d83579
MD5 c8607dbab75de33e1fd4ed0dd4adab2f
BLAKE2b-256 79a74b4735a86371e099c2d1242b56ab42940d54e415f958f291e87bfc074499

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page