Tags: misc
Rating:
> Create a python script using the `autocorrect` module to detect misspelled words.
```python
from autocorrect import Speller
spell = Speller(lang='en')
flag = ""
with open("words.txt","r") as myFile:
for line in myFile:
if line != spell(line): #Spelling mistake detected
wrong = list(line[:-1]) #[:-1] to remove newline char
correct = list(spell(line[:-1]))
index = 0
# Find first character difference (misspelled)
while wrong[index] == correct[index]:
index+=1
else:
flag+=wrong[index]
print(flag)
```
> Output: ictfyoupassedthespellingtest
> Proceed to insert "{}" into the flag where it meets the format.
`ictf{youpassedthespellingtest}`