Skip to content

Instantly share code, notes, and snippets.

@xsellier
Last active October 7, 2021 09:33
Show Gist options
  • Save xsellier/838366d840980039008533769202ddb3 to your computer and use it in GitHub Desktop.
Save xsellier/838366d840980039008533769202ddb3 to your computer and use it in GitHub Desktop.
Scan Twitch leak
for file in $(ls -1 *.zip)
do
echo "Scanning ${file}"
for filtered_file in $(zipinfo -1 "${file}" | grep "\(\.csv\|\.sql\)$" | sed -e 's/\ /@/g')
do
if [ -n "${filtered_file}" ]
then
original_filename=$(echo ${filtered_file} | sed -e 's/@/\ /g')
zipgrep -i "TWITCH_USERNAME" "${file}" "${original_filename}"
zipgrep -i "TWITCH_USER_ID" "${file}" "${original_filename}"
fi
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment