migrate to git.charlotte.sh

This commit is contained in:
Charlotte Croce 2025-04-19 23:42:08 -04:00
commit fbd588721e
412 changed files with 13750 additions and 0 deletions

View file

@ -0,0 +1,21 @@
#! /bin/bash
# This is the link we will scrape
link="10.0.17.6/IOC.html"
# get it with curl and tell curl not to give errors
fullPage=$(curl -sL "$link")
# Utilizing xmlstarlet tool to extract table from the page
toolOutput=$(echo "$fullPage" | \
xmlstarlet format --html --recover 2>/dev/null | \
xmlstarlet select -n --template --copy-of \
"//html//body//table//tr//td[1]")
# Processing HTML with sed
echo "$toolOutput" | sed -e 's/<td[^>]*>//g' | sed -e 's/<\/td>/;/g' | \
tr ';' '\n' | sed '/^$/d' > IOC.txt