Skip to content

DionTech/cgrep

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

about

cgrep is a grep variant, written in golang. It will use more cpu than normal grep, but therefor it will be faster. Useful, when to scan directories recursive and grep each file content. But it also can read from stdin.

install

go install

Recommended: set an alias like "cgrep".

usage

list options

cgrep --help

reading from stdin

For example, portscan and cgrep:

portscan scan -i 127.0.0.1 -t 20 | cgrep grep ^open

Using more than one thread:

portscan scan -i 127.0.0.1 -t 20 | cgrep grep --threads=20 ^open

scan directory recursive and grep file content

cgrep grep --path ./ "^open"

Using more threads

cgrep grep --path ./ --threads 10 "^open"

save and load expressions which you often use

save an expression:

cgrep save -n formAction -e "form(.?)action="

This will store a named expression "formAction" at /{your-homedir}/cgrep/templates.json

To use it, you can use the option and combine it with the other stuff like for example path grepping:

cgrep grep -e formAction -p ./

load all available expressions

cgrep list

About

a concurrent version of grepping

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages