Skip to content

Instantly share code, notes, and snippets.

@Stichoza
Created January 7, 2014 03:27
Show Gist options
  • Select an option

  • Save Stichoza/8294253 to your computer and use it in GitHub Desktop.

Select an option

Save Stichoza/8294253 to your computer and use it in GitHub Desktop.
FreshPHP debug_text decoder linux CLI
#!/bin/sh
echo debug_decoder v0.0.2
echo making temporary directories
mkdir debug_decode_tmp
cd debug_decode_tmp
echo getting source via 'wget'
wget --output-document=wgetfile $1
echo parsing data
dout=`grep -o '<code>.*</code>' wgetfile | sed 's/\(<code>\|<\/code>\)//g' | rev | base64 --decode | python -mjson.tool`
echo data parsing ended
echo "
DEBUG INFO:
"
echo "$dout"
rm wgetfile
cd ..
rmdir debug_decode_tmp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment