Skip to content

Instantly share code, notes, and snippets.

@arall
Created April 1, 2022 07:46
Show Gist options
  • Select an option

  • Save arall/8766bac9370a764aab10fd61190bf512 to your computer and use it in GitHub Desktop.

Select an option

Save arall/8766bac9370a764aab10fd61190bf512 to your computer and use it in GitHub Desktop.
spring4shell check
PAYLOAD="?class.module.classLoader.URLs%5B0%5D=0"
while read site; do
normalResponse=$(curl --write-out '%{http_code}' -L --silent --insecure --output /dev/null "$site")
pocResponse=$(curl --write-out '%{http_code}' -L --silent --insecure --output /dev/null "$site$PAYLOAD")
if [ $pocResponse == "400" ] && [ $normalResponse != $pocResponse ]; then
echo "$pocResponse - $site$PAYLOAD"
fi
done <$1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment