PentaHex

Something Different (50) - Filez


We are given a 7z file which extracts to a txt


My first attempt was to try and find the file on the internet. I searched up a few lines in the file (in quotes) and lo and behold there it was. I downloaded it opened boh files.

The challenge name includes the word different, so I tried to see the differences between the original files. I started just with a simple diff command in bash.

diff 1.txt 2.txt

This gave me:

< meditation or yoga, as they may appear DEAD even if they are still
> meditation or yoda, as they may appear DEAD even if they are still
500c500
< Following is a description of the Cross-Habitat Idiomatic Message
> Following is a description of the Cross-Labitat Idiomatic Message
635c635
< ZOO uses to send transcripts to a BARD. The IMPS protocol number is
> ZOO uses to send transcripts wo a BARD. The IMPS protocol number is

This is only the last part of the output, but I could see that each time a letter was randomly changed. "yoga" to "yoda", "Habitat" to "Labitat", "to" to "wo"

From there I wrote a python script to go through each character and output the ones that are different:

f1 = open('1.txt','r').read()
f2 = open('2.txt','r').read()
output=""
for i in range(len(f1)):
    if f1[i] != f2[i]:
        output+=f1[i]
print (output)

The first part opens the files and does .read() to convert it to a string. Then it loops through the files at the same time by using the index. It then checks to see if they are different. If it is different, it only outputs the changed one (stored in f1). This outputs: "flag is hidDeninPlaInsIgHt".

hidDeninPlaInsIgHt