Something went wrong. Try again.
JavaScript generic ASN.1 parser (mirror)
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536#/bin/shRFCs="5280 5208 3369 3161 2986"downloadRFC() { URL="https://www.ietf.org/rfc/rfc$1.txt" if [ -x /usr/bin/fetch ]; then /usr/bin/fetch -m --no-verify-peer $URL elif [ -x /usr/bin/wget ]; then /usr/bin/wget -N --no-check-certificate $URL elif [ ! -r dumpasn1.cfg ]; then echo Please download $URL in this directory. exit 1 fi}echo '{}' > rfcdef.json # start from scratchmkdir -p rfccd rfcfor n in $RFCs; do downloadRFC $n ../parseRFC.js rfc$n.txt ../rfcdef.jsondonecd ..{ echo "// content parsed from the following RFCs: $RFCs" cat - <<EOF(typeof define != "undefined" ? define : function (factory) { "use strict"; if (typeof module == "object") module.exports = factory(); else window.rfcdef = factory();})(function () {"use strict";EOF echo -n "return " cat rfcdef.json echo ";});"} > rfcdef.jsecho Conversion completed.