We had broken the Japanese diplomatic codes in the 1930.
We had not broken JN 25, the main operational code for the IJN by the time of Pearl Harbor. That would occur in the Spring of 42. The information from the diplomatic codes was that Japan would probably attack American and British interests in the Far East. No specific information was decoded that specified dates or targets.
Japan has always been a great copier. They adopted the UK’s driving on the left, it’s odd currency and it’s post office.