Skip to content

Instantly share code, notes, and snippets.

@icio

icio/pwnt.sh

Forked from anonymous/pwnt.sh
Created May 28, 2012
Embed
What would you like to do?
#!/bin/bash
#
# Checks a URI for the existance of a troll link.
#
# EXAMPLE USAGE:
# ./pwnt.sh www.youtube.com/watch?v=oHg5SJYRHA0
#
# TODO:
# Realtime Feedback
# Bayesian inference
#
string=$(wget -O - -o /dev/null $1)
found=1
declare -a evil=('roll' 'black' 'friday')
for needle in "${evil[@]}"
do
if [[ "$string" == *"$needle"* ]]; then
echo "contains '$needle'"
found=0
fi
done
if [[ found ]]; then
echo "safe"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.