#!/bin/bash

# Lista de repositorios (nombre y URL)
repos=(
    "redteam https://github.com/d0nkeys/redteam"
    "redteam_vul https://github.com/r0eXpeR/redteam_vul"
    "demiguise https://github.com/nccgroup/demiguise"
    "RedTeaming-Tactics-and-Techniques https://github.com/mantvydasb/RedTeaming-Tactics-and-Techniques"
    "Awesome-Redteam https://github.com/Threekiii/Awesome-Redteam"
    "RedTeam-OffensiveSecurity https://github.com/bigb0sss/RedTeam-OffensiveSecurity"
    "RedTeamer https://github.com/fengjixuchui/RedTeamer"
    "RedTeamTools https://github.com/lengjibo/RedTeamTools"
    "RedTeam https://github.com/jeansgit/RedTeam"
    "RedTeam_BlueTeam_HW https://github.com/Mr-xn/RedTeam_BlueTeam_HW"
    "pentesttools https://github.com/mabangde/pentesttools"
    "redteam-tips https://github.com/we1h0/redteam-tips"
    "RedTeam-BCS https://github.com/Mel0day/RedTeam-BCS"
    "RedTeamPowershellScripts https://github.com/Mr-Un1k0d3r/RedTeamPowershellScripts"
    "BrowserGhost https://github.com/QAX-A-Team/BrowserGhost"
    "100-redteam-projects https://github.com/kurogai/100-redteam-projects"
    "RedTeamNotes https://github.com/biggerduck/RedTeamNotes"
    "redteam-plan https://github.com/magoo/redteam-plan"
    "redteam-notebook https://github.com/foobarto/redteam-notebook"
    "redteam-research https://github.com/blackarrowsec/redteam-research"
    "RedTeamCSharpScripts https://github.com/Mr-Un1k0d3r/RedTeamCSharpScripts"
    "Awesome-RedTeam-Cheatsheet https://github.com/RistBS/Awesome-RedTeam-Cheatsheet"
    "RedTeaming2020 https://github.com/XTeam-Wing/RedTeaming2020"
    "RedTeamCCode https://github.com/Mr-Un1k0d3r/RedTeamCCode"
    "RedTeam_toolkit https://github.com/signorrayan/RedTeam_toolkit"
    "RedTeam-Resources https://github.com/J0hnbX/RedTeam-Resources"
    "PortBender https://github.com/praetorian-inc/PortBender"
    "Viper https://github.com/FunnyWolf/Viper"
    "redteam-tools https://github.com/r0eXpeR/redteam-tools"
    "RedTeam https://github.com/RootUp/RedTeam"
    "HastySeries https://github.com/obscuritylabs/HastySeries"
    "redteam-hardware-toolkit https://github.com/sectool/redteam-hardware-toolkit"
    "RedTeam-Pentest-Cheatsheets https://github.com/b1n4ry4rms/RedTeam-Pentest-Cheatsheets"
    "Awesome-CobaltStrike https://github.com/zer0yu/Awesome-CobaltStrike"
    "RedteamStandard https://github.com/zhutougg/RedteamStandard"
    "RedTeaming_CheatSheet https://github.com/0xJs/RedTeaming_CheatSheet"
    "A-Red-Teamer-diaries https://github.com/ihebski/A-Red-Teamer-diaries"
    "Taie-RedTeam-OS https://github.com/taielab/Taie-RedTeam-OS"
    "RedTeamAttack https://github.com/r0eXpeR/RedTeamAttack"
    "PoCHub https://github.com/Lucifer1993/PoCHub"
    "trident https://github.com/praetorian-inc/trident"
    "RootKits-List-Download https://github.com/d30sa1/RootKits-List-Download"
    "RedTeamScripts https://github.com/Mr-Un1k0d3r/RedTeamScripts"
    "PEzor https://github.com/phra/PEzor"
    "RedTeam https://github.com/rosonsec/RedTeam"
    "BadAssMacros https://github.com/Inf0secRabbit/BadAssMacros"
    "RedTeam https://github.com/slimdaddy/RedTeam"
    "defcon27_csharp_workshop https://github.com/mvelazc0/defcon27_csharp_workshop"
    "CobaltStrike_RedTeam_CheatSheet https://github.com/wsummerhill/CobaltStrike_RedTeam_CheatSheet"
    "RedTeam-Physical-Tools https://github.com/DavidProbinsky/RedTeam-Physical-Tools"
    "sam-the-admin https://github.com/WazeHell/sam-the-admin"
    "Awesome-Red-Teaming https://github.com/yeyintminthuhtut/Awesome-Red-Teaming"
    "RedTeam_CheetSheets https://github.com/zer0yu/RedTeam_CheetSheets"
    "AWS-RedTeam-ADLab https://github.com/PhilKeeble/AWS-RedTeam-ADLab"
    "chashell https://github.com/sysdream/chashell"
    "redteamT00ls https://github.com/angels520/redteamT00ls"
    "redteam-infra https://github.com/redteaminfra/redteam-infra"
    "frostbyte https://github.com/pwn1sher/frostbyte"
    "idea-project-fish-exploit https://github.com/CC11001100/idea-project-fish-exploit"
    "LOLBAS https://github.com/LOLBAS-Project/LOLBAS"
    "cheat.sheets https://github.com/esp0xdeadbeef/cheat.sheets"
    "RedTeamSIEM https://github.com/SecurityRiskAdvisors/RedTeamSIEM"
    "redteam_toolkit https://github.com/anthonysecurity/redteam_toolkit"
    "RedTeam-Automation https://github.com/bneg/RedTeam-Automation"
    "ATTACK-Tools https://github.com/nshalabi/ATTACK-Tools"
    "hershell https://github.com/sysdream/hershell"
    "ADSec-and-RedTeam https://github.com/lotapp/ADSec-and-RedTeam"
    "RedTeamCheatsheet https://github.com/sh4d3s/RedTeamCheatsheet"
    "LuWu https://github.com/QAX-A-Team/LuWu"
    "RedTeamMemory https://github.com/chrismaddalena/RedTeamMemory"
    "overlord https://github.com/qsecure-labs/overlord"
    "DiscordGo https://github.com/emmaunel/DiscordGo"
    "Goby_PoC_RedTeam https://github.com/CnHack3r/Goby_PoC_RedTeam"
    "ImpulsiveDLLHijack https://github.com/knight0x07/ImpulsiveDLLHijack"
    "Cobaltstrike-MS17-010 https://github.com/phink-team/Cobaltstrike-MS17-010"
    "redteamwiki https://github.com/redteamwiki/redteamwiki"
    "FourEye https://github.com/lengjibo/FourEye"
    "KnockOutlook https://github.com/eksperience/KnockOutlook"
    "CuiRi https://github.com/NyDubh3/CuiRi"
    "MicrosoftWontFixList https://github.com/cfalta/MicrosoftWontFixList"
    "fofa_viewer https://github.com/wgpsec/fofa_viewer"
    "go-shellcode https://github.com/brimstone/go-shellcode"
    "cobalt-arsenal https://github.com/mgeeky/cobalt-arsenal"
    "redteam-k8spwn https://github.com/TheSecureTux/redteam-k8spwn"
    "redboard https://github.com/Dviros/redboard"
    "DNS-Persist https://github.com/0x09AL/DNS-Persist"
    "AniYa https://github.com/piiperxyz/AniYa"
    "RedTeamDeploy https://github.com/micahjmartin/RedTeamDeploy"
    "UltimateAppLockerByPassList https://github.com/api0cradle/UltimateAppLockerByPassList"
    "LOLBAS https://github.com/api0cradle/LOLBAS"
    "vshell https://github.com/veo/vshell"
    "nishang https://github.com/samratashok/nishang"
    "CrossC2 https://github.com/gloxec/CrossC2"
    "hackingLibrary https://github.com/jwx0539/hackingLibrary"
    "NorthStarC2 https://github.com/EnginDemirbilek/NorthStarC2"
    "Some_Pentesters_SecurityResearchers_RedTeamers https://github.com/DamonMohammadbagher/Some_Pentesters_SecurityResearchers_RedTeamers"
    "theHarvester https://github.com/laramies/theHarvester"
    "PeiQi-WIKI-Book https://github.com/PeiQi0/PeiQi-WIKI-Book"
    "CyberSecurityRSS https://github.com/zer0yu/CyberSecurityRSS"
    "pwndrop https://github.com/kgretzky/pwndrop"
    "atomic-red-team https://github.com/redcanaryco/atomic-red-team"
    "Red-Teaming-Toolkit https://github.com/infosecn1nja/Red-Teaming-Toolkit"
    "Red-Team-Infrastructure-Wiki https://github.com/bluscreenofjeff/Red-Team-Infrastructure-Wiki"
    "Shr3dKit https://github.com/shr3ddersec/Shr3dKit"
    "Red_Team https://github.com/BankSecurity/Red_Team"
    "red_team_tool_countermeasures https://github.com/mandiant/red_team_tool_countermeasures"
    "Checklists https://github.com/netbiosX/Checklists"
    "Mythic https://github.com/its-a-feature/Mythic"
    "RedELK https://github.com/outflanknl/RedELK"
    "Covenant https://github.com/cobbr/Covenant"
    "Hack-Tools https://github.com/LasCC/Hack-Tools"
    "Redcloud https://github.com/khast3x/Redcloud"
    "red-team-scripts https://github.com/threatexpress/red-team-scripts"
    "Red-Team-links https://github.com/hudunkey/Red-Team-links"
    "OffensiveRust https://github.com/trickster0/OffensiveRust"
    "RedRabbit https://github.com/securethelogs/RedRabbit"
    "redmine_backlogs https://github.com/backlogs/redmine_backlogs"
    "RedTips https://github.com/vysecurity/RedTips"
    "Azure-Red-Team https://github.com/rootsecdev/Azure-Red-Team"
    "stratus-red-team https://github.com/DataDog/stratus-red-team"
    "WEASEL https://github.com/facebookarchive/WEASEL"
    "offensiveinterview https://github.com/WebBreacher/offensiveinterview"
    "RedEye https://github.com/cisagov/RedEye"
    "Red-Baron https://github.com/Coalfire-Research/Red-Baron"
    "moistpetal https://github.com/propervillain/moistpetal"
    "Red-Team https://github.com/Al1ex/Red-Team"
    "Awesome-Red-Team-Operations https://github.com/CyberSecurityUP/Awesome-Red-Team-Operations"
    "Ninja https://github.com/ahmedkhlief/Ninja"
    "redsnarf https://github.com/nccgroup/redsnarf"
    "RedGuard https://github.com/wikiZ/RedGuard"
    "awesome-windows-red-team https://github.com/marcosValle/awesome-windows-red-team"
    "Arsenal https://github.com/KCarretto/Arsenal"
    "nopowershell https://github.com/bitsadmin/nopowershell"
    "red-kube https://github.com/lightspin-tech/red-kube"
    "Red-Team-Infrastructure-Automation https://github.com/mantvydasb/Red-Team-Infrastructure-Automation"
    "MaliciousClickOnceGenerator https://github.com/Mr-Un1k0d3r/MaliciousClickOnceGenerator"
    "NodeJS-Red-Team-Cheat-Sheet https://github.com/aadityapurani/NodeJS-Red-Team-Cheat-Sheet"
    "red_team_attack_lab https://github.com/Marshall-Hallenbeck/red_team_attack_lab"
    "Red-Teaming-TTPs https://github.com/RoseSecurity/Red-Teaming-TTPs"
    "ReconHunter https://github.com/hassan0x/ReconHunter"
    "Checklists https://github.com/netbiosX/Checklists"
    "The-Hackers-Hardware-Toolkit https://github.com/yadox666/The-Hackers-Hardware-Toolkit"
    "RTFM https://github.com/Agahlot/RTFM"
    "adversarial-robustness-toolbox https://github.com/Trusted-AI/adversarial-robustness-toolbox"
    "Macrome https://github.com/michaelweber/Macrome"
    "PoshC2 https://github.com/nettitude/PoshC2"
    "Windows-Red-Team-Cheat-Sheet https://github.com/morph3/Windows-Red-Team-Cheat-Sheet"
    "RedWarden https://github.com/mgeeky/RedWarden"
    "AH2021Workshop https://github.com/chr0n1k/AH2021Workshop"
    "CRTO https://github.com/h3ll0clar1c3/CRTO"
    "Bashfuscator https://github.com/Bashfuscator/Bashfuscator"
    "Awesome-Red-Teaming https://github.com/0xMrNiko/Awesome-Red-Teaming"
    "DefaultCreds-cheat-sheet https://github.com/ihebski/DefaultCreds-cheat-sheet"
    "invoke-atomicredteam https://github.com/redcanaryco/invoke-atomicredteam"
    "Stormspotter https://github.com/Azure/Stormspotter"
    "ares https://github.com/dutchcoders/ares"
    "CredDefense https://github.com/CredDefense/CredDefense"
    "RedGhost https://github.com/d4rk007/RedGhost"
    "Redboto https://github.com/ihamburglar/Redboto"
    "awesome-hacker-search-engines https://github.com/edoardottt/awesome-hacker-search-engines"
    "pwnboard https://github.com/ztgrace/pwnboard"
    "openssh-7.6p1-patch https://github.com/QAX-A-Team/openssh-7.6p1-patch"
    "Red-Team-Management https://github.com/CyberSecurityUP/Red-Team-Management"
    "Awesome-macOS-Red-Teaming https://github.com/tonghuaroot/Awesome-macOS-Red-Teaming"
    "catphish https://github.com/ring0lab/catphish"
    "AggressorScripts_0x727 https://github.com/0x727/AggressorScripts_0x727"
    "redmine_mentions https://github.com/arkhitech/redmine_mentions"
    "red-team https://github.com/ryanmrestivo/red-team"
    "evil-winrm https://github.com/Hackplayers/evil-winrm"
    "GhostPack https://github.com/GhostPack"
)

# Crear carpeta "tools" si no existe
mkdir -p tools

# Mostrar la lista de repositorios
echo "Seleccione el número del repositorio que desea clonar:"
for i in "${!repos[@]}"; do
    echo "$((i+1)). ${repos[$i]}"
done

# Leer la selección del usuario
read -p "Ingrese el número: " selection

# Validar la selección
if [[ $selection -ge 1 && $selection -le ${#repos[@]} ]]; then
    # Extraer el nombre y la URL del repositorio seleccionado
    selected_repo="${repos[$((selection-1))]}"
    name=$(echo $selected_repo | awk '{print $1}')
    url=$(echo $selected_repo | awk '{print $2}')

    # Mostrar el nombre del repositorio
    echo "Clonando $name desde $url"

    # Clonar el repositorio en la carpeta "tools"
    git clone $url tools/$name
else
    echo "Selección inválida. Por favor, intente nuevamente."
fi

echo "El proceso ha finalizado."