Monday, 8 June 2020

50 One-word encryption (permutation code) hacked (+ grammar attack)

#One-word encryption (permutation code) hacked (+ grammar attack)
#Think of the name of a common animal.
#Encrypt it: change its letters of order cat---> act


# HACKED
while True:
    print ('')
    print ('Paste the encrypted text here:')
    ET = str(input())

    import itertools

    l = itertools.permutations(str(ET))
    output= ([str(''.join(x)) for x in l])
    print (output)

    #for elem in ET:
     #   print ((elem, end = '') )                #  , end = ''
     
    #elem = elem.lower()

###########################################################
#DICC is the dictionary of
    while True: 
        DICC = ["cat", "bat", "rat", "elephant", "dog"]

        for x in DICC:
            if x in output:
                print (x)
            else:
                print ('...')
        break