Script for fast decoding/encoding of HTML entities
Encoded :
$ python3 html-entities.py --encode='alert(document.domain)'
Encoded: alert(document.domain)
Encoded + URL encoding
$ python3 html-entities.py --encode='alert(document.domain)' --url-encode
Encoded: %26%2397%26%23108%26%23101%26%23114%26%23116%26%2340%26%23100%26%23111%26%2399%26%23117%26%23109%26%23101%26%23110%26%23116%26%2346%26%23100%26%23111%26%23109%26%2397%26%23105%26%23110%26%2341
Decoded :
$ python3 html-entities.py --decode='HiYou'
Decoded: HiYou
Made with the help of ChatGPT ❤️