laingame-net / lain_artbook_code

27 stars 4 forks source link

[Help wanted!] Let's crack this code. #1

Open mutr opened 3 years ago

mutr commented 3 years ago

At first we need to convert the text on images to plain text. I tried some OCRs but text is too small and fuzzy. Maybe someone can do it using only own eyes and hands. Or even train neural network to recognize it. Sounds like a interesting challenge. #lain_artbook_code_challenge

The second stage is decoding. The file format is BinHex 4.0 It used in classic macs. It's is very easy format that includes Base64-like encoding and RLE compression. Nothing serious. Macutils can open it for example. We already tried to decode the first line and it looks amazing. The only problem is that the code does not contains the error correction mechanism, only checksum. Some symbols are too fuzzy and barely can be seen. There will be errors all over and we have to convert them by hand or by brute force algorithm.

ghost commented 3 years ago

First to lines, feel free to check for errors

(This file must be converted with BinHex 4.0)

:$QaKD@jIEfeKDf8ZCfPQ*%G*4QBi3NPO!3!!!!Rq!!!#L4aa4dP!I$PKPJ$L!)!
!!2rrr~!!!#~!!!!!PJ$L!!!#ri52U4(VlaS+%YU,XpkmHdOpiNL@*Pl*kFQfEKY

Decoding that header will result in a lain_omake.gif file. rest of the code would be image data

h5vx commented 3 years ago

Googling first line leads me to this site http://www.noisywires.net/layer:09/layer:09.html

ghost commented 3 years ago

http://www.noisywires.net/layer:09/layer:09.html

Looks like he abandoned it way before we picked it up.

Also file 2 lines:

(This file must be converted with BinHex 4.0)

:$'PZEQpMC@jd,QT`C`"+8%9(1%**638!!!!,1J!!!!!C%2rBrq!!%%T'58B!!3)
"!5`",!!!rqd##&"SEh4[FfK[F#!c,M!!1%**632T!!!!!!"i!!B!!!")!%J!!!!
!![d#32rHrrB$*`**NJ-&H32I!!,p!!*B!PJ!!!!!'185`!*B!#d&S&1X!#B)!3%
"!"J!!5F2!!%!!3!!!!!!!!!!!!!!J!!"!!!"!3!!!!!!!!!!!!!!!!!!!!!!!!!
!-!%#'!%#!!!!%J!%1%**632Y!!!!!!!3!5`!!!!"!!)",!!!!!%!!MK#58d%$3!

Im going to binge type file 2 with a podcast tomorrow.

Agapurnis commented 3 years ago

It may be useful to identify the font so that it can be overlaid. Just doing the first line by hand, I'm already getting some differences when compared to the first line on the website, which isn't a good sign. However, that might just be me.

ghost commented 3 years ago

For clarity, im posting all available characters in BinHex 4.0

!"#$%&'()*+,-012345689@ABCDEFGHIJKLMNPQRSTUVXYZ[`abcdefhijklmpqr
mutr commented 3 years ago

@Agapurnis Post your progress in the comments.

The font is one of Courier (typeface) variant. I will try to make a dataset for neural network from this font. I am interested in making a fully automated solution. I hope to find time for this on Saturday.

rikkaonline commented 3 years ago

Guys you're not going to find anything useful. It's the psd file of the image converted to text and overlaid on the picture. The table of contents of rebuild explains it.

mutr commented 3 years ago

@rikkaonline The TOK just says that image inside. We already know the file names. It's lain_omake.gif and innocent.jpg. As you can see it's not even .psd.

What do you mean by useful? Did you hear about "hack value"?

Hack value is the notion used by hackers to express that something is worth doing or is interesting. This is something that hackers often feel intuitively about a problem or solution. An aspect of hack value is performing feats for the sake of showing that they can be done, even if others think it is difficult.

This files is part of the history of Lain fandom. The content of the file is not really matter. If something is encoded it must be decoded. I enjoy the process. For me it's like a 20 years old puzzle. А time capsule.

rikkaonline commented 3 years ago

Here's what the book says: PXL_20201126_212633589 The psd filename is right there.

You're not going to get anything useful in the sense that there is not a message or "code" hidden there to be cracked. He wanted to throw some random text on the pic to look cool so he ran the psd file through a tool to get that. If you want to run ocr on it to see what you can accomplish then sure have fun, but it's not going to yield data that has intrinsic value, and its certainly not worth the time sink of transcribing it all by hand.

mutr commented 3 years ago

Please look at other pages in TOC. Every layer has .psd not just 09. It's not related to content of the encoded file, it's related to page itself.

You can easily check that you are wrong. Try to decode the fragments we posted here.

First several bytes of the first file: lain_omake.gif\x00GIFf8BIN\x01 As you can see file has GIF signature and extension.

GIF files start with a fixed-length header ("GIF87a" or "GIF89a") giving the version, followed by a fixed-length Logical Screen Descriptor giving the pixel dimensions and other characteristics of the logical screen.

import base64
ref = '!"#$%&\'()*+,-012345689@ABCDEFGHIJKLMNPQRSTUVXYZ[`abcdefhijklmpqr'
mytrans = str.maketrans(ref, 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/')
base64.b64decode(inp.translate(mytrans).encode())
inp=':$QaKD@jIEfeKDf8ZCfPQ*%G*4QBi3NPO!3!!!!Rq'
base64.b64decode(inp.translate(mytrans).encode())

Easy peasy.

You're not going to get anything useful in the sense that there is not a message or "code" hidden there to be cracked.

I definitely don't expect to find the "code" that let me become Knights members or hack the pentagon. Ha-ha.

and its certainly not worth the time sink of transcribing it all by hand.

If you do not see value in something, this does not mean that it does not exist. If person A transcribed a file by hand and checksum matches then he or she will be the first in the world who do this. I will accept his PR right away and his name will be in this repository forever. Everyone who will google this code will see that a specific person A was the first.

If someday person B can suggest a better and more elegant solution requiring less hand work I will glad to add his code too. This will not cancel that the person A was first. That's the value. If you can't see this value just don't do it. It's not for you. Do something that has value to you.

rikkaonline commented 3 years ago

Of course every page has a psd file, every page is an image. That's the filename of the image on that page. It's related to the content of the encoded file by the text description that literally says that's what the text is.

You can easily check that you are wrong. Try to decode the fragments we posted here. A psd file could contain the contents of a gif file somewhere in it if that file is imported into it.

mutr commented 3 years ago

You still don't understand. It's not just a file or an artwork. It's a MESSAGE. The message from authors of Lain to those who can find it, open it and understand it. When someone open it that means that he or she was the recipient. It's like a catch message in a bottle. The content is not matter at all because recipient already know what this message is about. This message is about importance of information. If you're not interested just move it to the spam folder.

rikkaonline commented 3 years ago

https://en.wikipedia.org/wiki/Pareidolia

mutr commented 3 years ago

Oh, man. You are boring :)

mutr commented 3 years ago

I generate a dataset from background and Courier font and train a simple NN on it. photo_2020-11-29_14-09-02 photo_2020-11-29_13-57-02 2020-11-29_14-50-32

Works perfect on test data but not on real. Need to add variability and switch to CNN.

Real data: photo_2020-11-29_14-23-28

ghost commented 3 years ago

Thats nice also here are the lines from the second pic, without the last 10 lines. some characters could be others, i also included ? mark if the character was unreadable

(This file must be converted with BinHex 4.0)

:$'PZEQpMC@jd,QT`C`"+8%9(1%**638!!!!,1J!!!!!C%2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!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
)1UMZ*q#85888P"56!3R3@V+5C1NT55555P****+1rp1d"****5NNNNP+3RJ%SLJ
8NK!kX%K&B2Z8A`2815$bL[1bQ0N`85`1LLd&Te1UB!Q8PTA5553@U+G-R58T***
*5NNNNP2rd23%NNNP+55558XH&"62#JLN-A"4!JUC6!*,1ANP5E+3!`U55dP5G-R
3@V*dNNP+55558T****6r!2r4p!55558T****6%TNj6)T$%TfT&*U5@5G-R33ZNN
NNKC1Q6T+8NNNNT55555Rrp,d"****5NNNNP-6bQ+FmTLLN-5RDN8QT*C"1Q#G"D
ZNNNNT55555P****+8NNNNTrrf85X!!!!:
mutr commented 3 years ago

Nice work! I need it to validate my NN. Sent you invite to the repo. Feel free to upload it.

mutr commented 3 years ago

Another version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5%kL0&)F*+A9DmHq9B3,a1JJGNah6--X#NKdr3#)LJ1U55553rreI3%NNNP+55
558T-NN%P,T***+8Q6T*+BN*!Tc`Qe#59d+mF&%h+&ZV38LSEXUa$!TU,4$3&**!
!9****+Ire[3%NNNP+55558XN%kC*5k5C**5k5555PNNLNNT4#LjX`T*"*+NkC1N
K55555Rrrer3%NNNP+55558T-H8kL1K*5jL6"5"51U5@5G-1%k5&NJNNNT5356Gd
P,T***+A55558r`$rd23%NNNP+55558T-R558M)Jq58UC%U%***c0+NS0j8dP&5C
1Q53T)Tda58T**1NT55555RrrDI3%NNNP+55558T****5p%U5BT+Bpe*48NNPG-8
NNN+55558T1Q6T+8NNNNTrp,d"****5NNNNP+55558T-1K1SZi58XT"4M45#55T*
1Q53T****5NkC1NT55555Rrr6p!55558T****5NNNNP,+2*mP***5NJNNNTG-R6*
+8NNNNT5G-R58T****6rre23%NNNP+55558T-NNNT55555P***"*5kC***5NNNJN
TG****5NNNNP2rpAd"****5NNNNP,*Nj8C55'55555&*JN8JNPG)T**)@+F*LR58
ZNNNNT55555Rre[3%NNNP+55558XH%-Q%4!X2)5A45YG)8T90PKDB+1(b0%NQ+3U
)1UMZ*q#85888P"56!3R3@V+5C1NT55555P****+IrpId"****5NNNNP+3RJ%SLJ
8NK!kX%K&B2Z8A"2815$bL[1bQ0N`85"1LLd&Te1UB!Q8PTA5553@U+G-R58T***
*5NNNNP2rd23%NNNP+55558XH&"62#JLN-A"4!JUC6!*,1ANP5E+3!'U55dP5G-R
3@V*dNNP+55558T****6r!2r4p!55558T****6%TNj6)T$%TfT&*U5@5G-R33ZNN
NNKC1Q6T+8NNNNT55555Rrp,d"****5NNNNP-6bQ+FmTLLN-5RDN8QT*C"1Q#G"D
ZNNNNT55555P****+8NNNNTrrf85X!!!!:
ghost commented 3 years ago

Another version. Thanks to Roman

Pushed it in a commit.

nekto-nekto commented 3 years ago

Maybe you preliminarily make clear the picture from printing/scans artifacts? Example: https://photo.stackexchange.com/questions/23445/what-is-the-best-way-to-remove-texture-from-a-scanned-textured-photo-paper

kostapc commented 3 years ago

I was trying to remove scan (printing) artifacts, picture became better, but text becomes significant less readable.

mutr commented 3 years ago

Partial success. Changed one byte on DHT table. Picture can be opened now, but still looks corrupted. before_rle

I changed decoder a bit, now it saves the file before RLE decoding (before_rle.jpg). It seems RLE is not used by the encoder. And it can produce garbage on corrupted parts.

Courier is worst font for OCR ever. Look at this: 1l Yes that symbols are almost the same. And there is a lot of "l" and "1" mixed in the second half of a file.

h5vx commented 3 years ago

Playing around 1 / l, got little better results. Now produced JPEG can be opened without touching it's bytes innocent corrupted

nekto-nekto commented 3 years ago

3

ghost commented 3 years ago

3

Both of these methods should be used AFTER we get the final result.

nekto-nekto commented 3 years ago

@lelenium

Both of these methods should be used AFTER we get the final result.

Of course.

mutr commented 3 years ago

Uploaded a second file - raw_files/lain_omake.gif.hqx BinHex header checksum is valid. It's GIF image 150x226px black and while. Image is still broken. Also this file contains resource fork.

nick758 commented 2 years ago

Hi!

Thank you for your work.

I fixed OCR errors in the file lain_omake.gif.hqx and got correct lain_omake.gif. CRC is OK. I didn't fixed resource fork because I don't know its format. lain_omake

Fixed hqx is here: lain_omake.gif.zip

mutr commented 2 years ago

This is so awesome! Thank you! Are you going to create pull request?

What kind of object is she holding in her lap? Any ideas?

GermanAizek commented 2 years ago

I fixed OCR errors in the file lain_omake.gif.hqx and got correct lain_omake.gif. CRC is OK. I didn't fixed resource fork because I don't know its format. lain_omake

@nick758, cool, I did not believe that soon would transfer the binary file from the paper to the file.

nick758 commented 2 years ago

@GermanAizek It was semi-manual brute forcing :) I made utility which generates modified files with combinations of suspicious symbols. It receive number of changes and offset where to start. Default suspicious symbols is '"` and l1 sometimes I added ! in the first group. So, I generated about 100-200 files (about 5 changes in a file) at a time then decoded them and selected the better one visually. If result didn't become better I looked for mistakes in other symbols. And repeated this procedure until end.

nick758 commented 2 years ago

@mutr

What kind of object is she holding in her lap? Any ideas?

Maybe it's a packet with a gun which is seen in the game in Dc1057: https://laingame.net/index.php?id=55 Also Lain with a gun in Lda230: https://laingame.net/index.php?id=418

nick758 commented 2 years ago

innocent.jpg.hqx I've checked symbols which are duplicated in bigger font on the whole picture: https://i.warosu.org/data/lit/img/0052/57/1407621588546.jpg There were 3 mistakes but CRC is still wrong and there are no visual changes on the picture.

Pull request is created.

mutr commented 2 years ago

Thank you!

nick758 commented 2 years ago

Hi guys! I made time-lapse of fixing errors in "lain_omake.gif.hqx". I don't know why I did it. But let it be here: https://www.youtube.com/watch?v=eqRgU7CtQPM