write some pseudocode to decrypt a substitution cipher only knowing the encrypted text and not the key.
For example the text below
GFS WMY OG LGDVS MF SFNKYHOSU ESLLMRS, PC WS BFGW POL DMFRQMRS, PL OG CPFU M UPCCSKSFO HDMPFOSXO GC OIS LMES DMFRQMRS DGFR SFGQRI OG CPDD GFS LISSO GK LG, MFU OISF WS NGQFO OIS GNNQKKSFNSL GC SMNI DSOOSK. WS NMDD OIS EGLO CKSJQSFODY GNNQKKPFR DSOOSK OIS ‘CPKLO’, OIS FSXO EGLO GNNQKKPFR DSOOSK OIS ‘LSNGFU’ OIS CGDDGWPFR EGLO GNNQKKPFR DSOOSK OIS ‘OIPKU’, MFU LG GF, QFOPD WS MNNGQFO CGK MDD OIS UPCCSKSFO DSOOSKL PF OIS HDMPFOSXO LMEHDS. OISF WS DGGB MO OIS NPHISK OSXO WS WMFO OG LGDVS MFU WS MDLG NDMLLPCY POL LYEAGDL. WS CPFU OIS EGLO GNNQKKPFR LYEAGD MFU NIMFRS PO OG OIS CGKE GC OIS ‘CPKLO’ DSOOSK GC OIS HDMPFOSXO LMEHDS, OIS FSXO EGLO NGEEGF LYEAGD PL NIMFRSU OG OIS CGKE GC OIS ‘LSNGFU’ DSOOSK, MFU OIS CGDDGWPFR EGLO NGEEGF LYEAGD PL NIMFRSU OG OIS CGKE GC OIS ‘OIPKU’ DSOOSK, MFU LG GF, QFOPD WS MNNGQFO CGK MDD LYEAGDL GC OIS NKYHOGRKME WS WMFO OG LGDVS
Is decrypted using the website below without knowing the key.
https://www.boxentriq.com/code-breaking/cryptogram
All I would like is some pseudocode to show the process – i would like it to be generalised, so to decrypt any substitution cipher, not just for the example i have provided.
I do not need the answer to that example, just pseudocode to show the process.