Last active
October 12, 2023 20:53
-
-
Save yosignals/37367edb947a0f6d528d3103753c0081 to your computer and use it in GitHub Desktop.
Dentist.sh - This script extracts what you want from your Nucleish json save, use this after you've ran Recruiter against your target domain.txt - https://thecontractor.io/data-bouncing/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Dependency check | |
if ! command -v jq &> /dev/null; then | |
echo "jq is not installed. Would you like to install it? (y/n)" | |
read -r answer | |
if [[ $answer == "y" || $answer == "Y" ]]; then | |
sudo apt-get install jq | |
else | |
echo "jq is required for this script to run." | |
exit 1 | |
fi | |
fi | |
# Check if the correct number of arguments is provided | |
if [ "$#" -ne 2 ]; then | |
echo "Usage: $0 <path_to_json_file> <string_to_remove>" | |
exit 1 | |
fi | |
# Assign arguments to variables | |
json_file=$1 | |
string_to_remove=$2 | |
# Process the JSON file and write the output to DataBouncers.txt | |
jq -r '.["full-id"] | split(".")[0:3] | join(".")' "$json_file" | \ | |
tr '[:upper:]' '[:lower:]' | \ | |
sed "s/${string_to_remove}//g" | \ | |
grep -E '^(host\.|xff\.|ref\.|wafp\.|cfcon\.|from\.|rip\.|trip\.|xclip\.|ff\.|origip\.|clip\.|contact\.)' | \ | |
sort | uniq > DataBouncers.txt | |
# Inform the user that the data has been written to DataBouncers.txt | |
echo "Data has been written to DataBouncers.txt" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment