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 threatshunt- Hunt for specific threats using rulesdetect- Detect patterns in filesvalidate- Validate DSL rule syntaxtest- Test rules against sample datacompile- Compile DSL rulesanalyze- Comprehensive file analysisinteractive- Interactive DSL shellbenchmark- Benchmark rule performanceexamples- 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.2.tar.gz
(52.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gamma_scanner-1.0.2.tar.gz.
File metadata
- Download URL: gamma_scanner-1.0.2.tar.gz
- Upload date:
- Size: 52.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
211dc7085035964c797c05bacd74b26e99273956f62b7e0271dbfbb4f9f8330e
|
|
| MD5 |
ddb99dcbeabd61276d2a332a4d0ac7d1
|
|
| BLAKE2b-256 |
61dabaf4a460fc8e237cb04cac769a846aa0fdd97460856162941c59ac583730
|
File details
Details for the file gamma_scanner-1.0.2-py3-none-any.whl.
File metadata
- Download URL: gamma_scanner-1.0.2-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b9d5b5a9df6994768dfcfd2a83fb31d94b96c00ace831a4e82ab771d0793e30a
|
|
| MD5 |
1fd939b83b37fa301cb32703f51c0e4a
|
|
| BLAKE2b-256 |
a20f7be2d29ca76b500293f992c5bea6413207272ddd0efc996b16d866a65c5d
|