Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't get custom config working #50

Open
ResistanceIsUseless opened this issue May 27, 2021 · 0 comments
Open

Can't get custom config working #50

ResistanceIsUseless opened this issue May 27, 2021 · 0 comments

Comments

@ResistanceIsUseless
Copy link

ResistanceIsUseless commented May 27, 2021

  1. How come Rat won't blindly forward the current line to the bindkey? Is there a way to trick it into doing that?
  2. 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!

@ResistanceIsUseless ResistanceIsUseless changed the title Can't custom config working Can't get custom config working May 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant