const fs = require('fs');
var text1 = fs.readFileSync('file1.txt')+'',
text2 = fs.readFileSync('file2.txt')+'',
data = '';
while(text1.length){
var frag = text1.slice(0,42);
if(text2.includes(frag)) data+=frag;
text1 = text1.slice(42);
}
fs.writeFileSync('file3.txt', data);