Skip to content

Instantly share code, notes, and snippets.

@flawal
Forked from 1N3/crt.sh
Created August 21, 2020 16:55
Show Gist options
  • Save flawal/49d58d225c228e93670d3b73c0cff178 to your computer and use it in GitHub Desktop.
Save flawal/49d58d225c228e93670d3b73c0cff178 to your computer and use it in GitHub Desktop.

Revisions

  1. @1N3 1N3 revised this gist Dec 7, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion crt.sh
    Original file line number Diff line number Diff line change
    @@ -49,5 +49,5 @@ echo -e "$OKRED + -- ----------------------------=[Gathering Certificate Subdoma
    curl -s https://crt.sh/?q=%25.$TARGET > /tmp/curl.out
    cat /tmp/curl.out | grep $TARGET | grep TD | sed -e 's/<//g' | sed -e 's/>//g' | sed -e 's/TD//g' | sed -e 's/\///g' | sed -e 's/ //g' | sed -n '1!p' | sort -u > $TARGET-crt.txt
    cat $TARGET-crt.txt
    echo -e "$OKRED [+] Domains saved to: $TARGET-full.txt"
    echo -e "$OKRED [+] Domains saved to: $TARGET-crt.txt"
    echo -e "$OKRED + -- ----------------------------=[Done!]=----------------------------------- -- +$RESET"
  2. @1N3 1N3 revised this gist Dec 7, 2016. No changes.
  3. @1N3 1N3 created this gist Dec 7, 2016.
    53 changes: 53 additions & 0 deletions crt.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,53 @@
    #!/bin/bash
    #
    # crt.sh sub-domain check by 1N3@CrowdShield
    # https://crowdshield.com
    #

    OKBLUE='\033[94m'
    OKRED='\033[91m'
    OKGREEN='\033[92m'
    OKORANGE='\033[93m'
    RESET='\e[0m'
    TARGET="$1"

    if [ -z $TARGET ]; then
    echo -e "$OKRED _ _ $RESET"
    echo -e "$OKRED ___ _ __| |_ ___| |__ $RESET"
    echo -e "$OKRED / __| '__| __| / __| '_ \ $RESET"
    echo -e "$OKRED | (__| | | |_ _\__ \ | | |$RESET"
    echo -e "$OKRED \___|_| \__(_)___/_| |_|$RESET"
    echo ""
    echo -e "$OKRED [+] by 1N3@CrowdShield$RESET"
    echo -e "$OKRED [+] https://crowdshield.com$RESET"
    echo -e "$OKRED [-] Usage: crt.sh <target>$RESET"
    exit
    fi

    if [[ $TARGET = "--help" ]]; then
    echo -e "$OKRED _ _ $RESET"
    echo -e "$OKRED ___ _ __| |_ ___| |__ $RESET"
    echo -e "$OKRED / __| '__| __| / __| '_ \ $RESET"
    echo -e "$OKRED | (__| | | |_ _\__ \ | | |$RESET"
    echo -e "$OKRED \___|_| \__(_)___/_| |_|$RESET"
    echo ""
    echo -e "$OKRED [+] by 1N3@CrowdShield$RESET"
    echo -e "$OKRED [+] https://crowdshield.com$RESET"
    echo -e "$OKRED [-] Usage: crt.sh <target>$RESET"
    exit
    fi

    echo -e "$OKRED _ _ $RESET"
    echo -e "$OKRED ___ _ __| |_ ___| |__ $RESET"
    echo -e "$OKRED / __| '__| __| / __| '_ \ $RESET"
    echo -e "$OKRED | (__| | | |_ _\__ \ | | |$RESET"
    echo -e "$OKRED \___|_| \__(_)___/_| |_|$RESET"
    echo ""
    echo -e "$OKRED [+] by 1N3@CrowdShield$RESET"
    echo -e "$OKRED [+] https://crowdshield.com$RESET"
    echo -e "$OKRED + -- ----------------------------=[Gathering Certificate Subdomains]=-------- -- +$RESET"
    curl -s https://crt.sh/?q=%25.$TARGET > /tmp/curl.out
    cat /tmp/curl.out | grep $TARGET | grep TD | sed -e 's/<//g' | sed -e 's/>//g' | sed -e 's/TD//g' | sed -e 's/\///g' | sed -e 's/ //g' | sed -n '1!p' | sort -u > $TARGET-crt.txt
    cat $TARGET-crt.txt
    echo -e "$OKRED [+] Domains saved to: $TARGET-full.txt"
    echo -e "$OKRED + -- ----------------------------=[Done!]=----------------------------------- -- +$RESET"