Skip to content

Instantly share code, notes, and snippets.

@FranckPachot
Created April 6, 2023 13:01
Show Gist options
  • Save FranckPachot/6feb2f0fbc2ad2ea3e9cedcd937794f2 to your computer and use it in GitHub Desktop.
Save FranckPachot/6feb2f0fbc2ad2ea3e9cedcd937794f2 to your computer and use it in GitHub Desktop.
Unwrap Oracle Home package bodies
export PATH=$PATH:$ORACLE_HOME/python/bin
pip install html2text
for f in $(grep -l ' wrapped *$' $(find $ORACLE_HOME -name "*.plb"))
do
curl -s -F "file=@$f" -F "ShowLineNumbers=false" -F "UnwrapFile=Unwrap File" https://www.codecrete.net/UnwrapIt/ |
html2text | awk '
/Unwrap More Code/{p="Y";next}
/Bleichenbacher/{print "--",$0;next}
p=="Y"{gsub(/ʼ/,qq);print}
' qq="'" > ${f}.unwrapped && wc ${f}.unwrapped
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment