Can't get custom config working
ResistanceIsUseless opened this issue · 0 comments
ResistanceIsUseless commented
- How come Rat won't blindly forward the current line to the bindkey? Is there a way to trick it into doing that?
- It feels kinda of repetitive that your starting command and annotate need to be the same. For example if i cat a list of domains and IP's and do an annotate regex that matches against IP's or Hostnames. Shouldn't that work?
I'm trying to use rat as a way to combine multiple tools and run commands based on output. Most of the tools output in a single line format so most of the time there isn't really a need to annotate or parse anything to pull it out and send it to the next command. For example if i had a list of hostnames and ip's and did "rat -m host.info -c cat hosts.txt" then i scrolled through and used one of my bindkeys below to send that host or IP to the specific command.
mode host.info
annotate regex domain -- "(?i)^(?:([a-z0-9-]+|\*)\.)?([a-z0-9-]{1,61})\.([a-z0-9]{2,7})$"
annotate regex ip -- "(\b(?:[0-9]{1,3}\.){3}[0-9]{1,3}\b)"
annotate regex url -- "(?P<origin>(?P<protocol>http[s]?:)?\/\/(?P<host>[a-z0-9A-Z-_.]+))(?P<port>:\d+)?(?P<path>[\/a-zA-Z0-9-\.]+)?(?P<search>\?[^#\n]+)?(?P<hash>#.*)?"
bindkey i ip preview -- curl http://ipinfo.io/$ip
bindkey n domain preview -- nslookup $domain
bindkey s domain,ip preview -- nmap -sC -sV $domain $ip
bindkey c url preview -- curl -v $url
end
None of this is working though. I tried messaging you on glitter but i doubt you're on there regularly but feel free to respond there if that's easier.
Thanks!