honoki / bbrf-client

The Bug Bounty Reconnaissance Framework (BBRF) can help you coordinate your reconnaissance workflows across multiple devices
MIT License
613 stars 90 forks source link

Ability to add a domain without the need to explicitly using the -p option #51

Closed xqd-ai closed 3 years ago

xqd-ai commented 3 years ago

Hi, it would be great if we can just use the bbrf domain add asdf.example.com and bbrf add it to the matching program without the need to use the -p option

honoki commented 3 years ago

I have good news! Since v1.1.4 you can use the dynamic program name @INFER to do exactly that:

  • Use the dynamic program name -p @INFER to infer the program name based on other properties if you're unable to specify the program flag yourself for some reason; this is currently supported for the following operations:
    • bbrf ip add 1.1.1.1:example.tld -p @INFER will set the IP's program name to the same as the domain example.tld if it already exists;
    • bbrf domain add some.example.tld:1.2.3.4 -p @INFER will set the domain's program name to the same as 1.2.3.4 if it already exists - note that this will bypass the scope validation of the program, because the program name is inferred just before writing to the database.
    • bbrf domain add some.example.tld some.other.tld -p @INFER will add the domains to whatever program scope matches the input;
    • bbrf url add http://this.example.tld https://that.some.tld/robots.txt -p @INFER will add the URLs to whatever program has the domain in scope;
honoki commented 3 years ago

Also note that you can always use bbrf use <programname> followed by bbrf domain add asdf.example.com, and it will be automatically added to the active program <programname>.

xqd-ai commented 3 years ago

@honoki Thank you for this great update!