[Original writeup](https://github.com/shiltemann/CTF-writeups-public/tree/master/DefCamp-2018#misc-message)
## Misc: Message
**Challenge**
I just typed this secret [message](https://raw.githubusercontent.com/shiltemann/CTF-writeups-public/master/DefCamp-2018/writeupfiles/message.txt) with my new encoding algorithm.
**Solution**
```wsxcvasdfghrfvbnhytqwertymnbvcdrtghuzxcvbnwsxcdeasdfghzaqwdrtgbzxcvbnqwertywsxqwertynbvcxswefrqwertyiuyhnbvqwertywsxcvfrasdfghzaqwdrtgbzxcvbnqwertywsxasdfghiuyhnbvasdfgh zxcvbnytrfvcxqwertywsxasdfghzaqwdrtgbqwertymnbvccdertgzxcvbnedcvbasdfghefvtzxcvbnasdfghwsxcfezxcvbnedcvbgtasdfghzaqwdrtgbqwertyxsweftynhzxcvbnjmyizxcvbnzxcvbnrtyuihnzxcvbnwsxcdeasdfghrgnygcqwertyrtyuihnasdfgh qwertyqazxcdewzxcvbnredcfzxcvbnzxcvbnwertyfvzxcvbnrfvgyhnasdfghwsxcdeqwerty qwertynbvcxswefrzxcvbnmnbvcdrtghuzxcvbnrfvqwertyxsweftgbqwertyrtyuihnqwertywsxasdfghxsweftgbzxcvbncvgredasdfgh[..]```
is this writing pattern on the keyboard? looking at sequences of letter that are adjacent on a keyboard wesee that `wsxcv` could represent an `L` shape? `rfvbnhyt` an `O`, etc? we do some of these replacements andsee legible text appear, looks like Lorem Ipsum text, we slowly piece together the text and all the replacements.
The following program will deciper the message:
```pythonreplacements = [('mnbvcdrtghu','R'),                ('efvgywdcft','W'),                ('nbvcxswefr','P'),('mnbvccdertg','P'),('nbvcxswerf','P'),                ('zaqwdrtgb','M'),('xsweftynh','M'),('xsweftyhn','M'),                ('xsweftgb','N'),('zaqwdvfr','N'),('xsweftbg','N'),                ('rfvbnhyt','O'),('qazxcdew','O'),('wsxcvfre','O'),                ('rfvgyhn','H'),('edcftgb','H'),('wsxdrfv','H'),                ('iuyhnbv','S'),('ytrfvcx','S'),                ('rtyuihn','T'),('wertyfv','T'),                ('wsxcvfr','U'),('edcvbgt','U'),                ('grdxcvb','A'),('zsefvcx','A'),('xcvbgrd','A'),                ('rfvbhg','B'),('wsxcfd','B'),('qazxds','B'),                ('wsxcde','E'),('edcvrf','E'),('tgbnhy','E'),                ('wsxcfe','D'),('yhnmku','D'),('edcvgr','D'),                ('cvgred','G'),('cvrged','G'),('redcvg','G'),                ('edcfby','K'),('qazsce','K'),('wsxdvr','K'),                ('rgnygc','X'),('wdvtdz','X'),                ('ewsxc','C'),('redcv','C'),('trfvb','C'),                ('redcf','F'),('trfvg','F'),('ewsxd','F'),                ('wsxcv','L'), ('edcvb','L'), ('rfvbn','L'),                ('wdcft','V'),('efvgy','V'),                ('efvt', 'Y'),('jmyi','Y'),                ('wsx','I'),('edc','I'),('rfv','I'),                ('qwerty',''),('asdfgh',''),('zxcvbn','')]
with open('message.txt','r') as f:    m = f.readline()
for i in replacements:    m = m.replace(i[0],i[1])
print(m)```
which outputs the text:
```LOREM IPSUM IS SIMPLY DUMMY TEXT OF THE PRINTING AND TYPESETTING INDUSTRY.LOREM IPSUM HAS BEEN THE INDUSTRY'S STANDARD DUMMY TEXT EVER SINCE THE 1500S,WHEN AN UNKNOWN PRINTER TOOK A GALLEY OF TYPE AND SCRAMBLED IT TO MAKE A TYPESPECIMEN BOOK. IT HAS SURVIVED NOT ONLY FIVE CENTURIES, BUT ALSO THE LEAP INTOELECTRONIC TYPESETTING, REMAINING ESSENTIALLY UNCHANGED. IT WAS POPULARISED IN THE1960S WITH THE RELEASE OF LETRASET SHEETS CONTAINING LOREM IPSUM PASSAGES, AND MORERECENTLY WITH DESKTOP PUBLISHING SOFTWARE LIKE ALDUS PAGEMAKER INCLUDING VERSIONS OFLOREM IPSUM.DCTF{B66ECAAA90AD05DF5DAB33D71A8F70934408F3A5847A4C5C38Dqazxds75891B0F0E32}LOREMIPSUM IS SIMPLY DUMMY TEXT OF THE PRINTING AND TYPESETTING INDUSTRY. LOREM IPSUM HASqazxdsEEN THE INDUSTRY'S STANDARD DUMMY TEXT EVER SINCE THE 1500S, WHEN AN UNKNOWNPRINTER TOOK A GALLEY OF TYPE AND SCRAMBLED IT TO MAKE A TYPE SPECIMEN BOOK. IT HASSURVIVED NOT ONLY FIVE CENTURIES, BUT ALSO THE LEAP INTO ELECTRONIC TYPESETTING,REMAINING ESSENTIALLY UNCHANGED. IT WAS POPULARISED IN THE 1960S WITH THE RELEASE OFLETRASET SHEETS CONTAINING LOREM IPSUM PASSAGES, AND MORE RECENTLY WITH DESKTOPPUBLISHING SOFTWARE LIKE ALDUS PAGEMAKER INCLUDING VERSIONS OF LOREM IPSUM.```
and contains our flag \o/
**Flag**```DCTF{B66ECAAA90AD05DF5DAB33D71A8F70934408F3A5847A4C5C38DB75891B0F0E32}```