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

Accessing parent document properties on tags #85

Open Regala opened 3 years ago

Regala commented 3 years ago

When working with tags you are restricted to the ones of the document type you're querying, e.g. urls. However, there are many types where you'd want to work with the parent properties. e.g.

bbrf urls where program.disabled is false or bbrf urls where program.bounties is true

Let me know if this makes sense. Thanks!

pdelteil commented 3 years ago

It's a good idea. By now I do it this way:

All urls from Bugcrowd programs IFS=$'\n'; for i in $(bbrf programs where site is bugcrowd); do bbrf urls -p "$i" >> urls.bugcrowd.txt; done ;

Also this function to get urls from only disabled programs:

# getData only from disabled programs 
# Use getOnlyDisabledPrograms urls/domains
getOnlyDisabledPrograms()
{
    INPUT="$1" 
    COND="$2"
    if [ -z "$INPUT" ] 
    then
        echo "Use ${FUNCNAME[0]} urls/domains"
        return 1;
    fi
    IFS=$'\n'
    if [[  "$INPUT" != "urls"  &&  "$INPUT" != "domains" ]]
    then
        echo "Use ${FUNCNAME[0]} urls/domains"
        return 1;
    fi
    if [[  "$INPUT" == "urls" ]] | [[  "$INPUT" == "domains" ]]
    then
        all=$(bbrf programs --show-disabled $COND)
        enabled=$(bbrf programs $COND)
        listr=$(comm -3 <(echo "$enabled"|sort) <(echo "$all"|sort)|tr -d '\t')
    fi
    if [[  "$INPUT" == "urls" ]] 
    then
        for program in $(echo "$listr");
        do 
            bbrf urls -p "$program"
        done

    fi
    if [[  "$INPUT" == "domains" ]] 
    then
        for program in $(echo "$listr");
        do 
            bbrf domains -p "$program"
        done
    fi

}

I have written from functions to use BBRF in a more flexible way.

https://github.com/pdelteil/BugBountyHuntingScripts/blob/main/bbrf_helper.sh

Regala commented 3 years ago

Thanks for sharing!

On Tue, Oct 26, 2021, 17:51 Philippe Delteil @.***> wrote:

It's a good idea. By now I do it this way:

All urls from Bugcrowd programs IFS=$'\n'; for i in $(bbrf programs where site is bugcrowd); do bbrf urls -p "$i" >> urls.bugcrowd.txt; done ;

Also this function to get urls from only disabled programs:

getData only from disabled programs

Use getOnlyDisabledPrograms urls/domains

getOnlyDisabledPrograms() { INPUT="$1" COND="$2" if [ -z "$INPUT" ] then echo "Use ${FUNCNAME[0]} urls/domains" return 1; fi IFS=$'\n' if [[ "$INPUT" != "urls" && "$INPUT" != "domains" ]] then echo "Use ${FUNCNAME[0]} urls/domains" return 1; fi if [[ "$INPUT" == "urls" ]] | [[ "$INPUT" == "domains" ]] then all=$(bbrf programs --show-disabled $COND) enabled=$(bbrf programs $COND) listr=$(comm -3 <(echo "$enabled"|sort) <(echo "$all"|sort)|tr -d '\t') fi if [[ "$INPUT" == "urls" ]] then for program in $(echo "$listr"); do bbrf urls -p "$program" done

fi
if [[  "$INPUT" == "domains" ]]
then
    for program in $(echo "$listr");
    do
        bbrf domains -p "$program"
    done
fi

}

I have written from functions to use BBRF in a more flexible way.

https://github.com/pdelteil/BugBountyHuntingScripts/blob/main/bbrf_helper.sh

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/honoki/bbrf-client/issues/85#issuecomment-952126823, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKRBL5J3HPKMHI4RQNAIJTUI3MAJANCNFSM5GXITAGQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.