@@ -0,0 +1,788 @@
+#!/usr/bin/python3%0A# -*- coding: utf-8 -*-%0A# Given a text file consisting of hex strings.%0A# Find strings which has been encrypted by single-character XOR%0A%0Aimport sys%0Aimport singleByteXOR%0A%0Aif __name__ == %22__main__%22:%0A    if len(sys.argv) == 1:%0A        print(%22Usage:%5Ct%7B%7D %5Bpath/%5Dfilename%22.format(sys.argv%5B0%5D))%0A    if len(sys.argv) == 2:%0A        found = %5B%5D%0A        try:%0A            for line in open(sys.argv%5B1%5D):%0A                (text, score) = singleByteXOR.attack(line)%0A                if score %3E= 80:%0A                    print(%22Decrypted text:%22, text)%0A                    if input(%22Good enough? (y for yes, else for no) %22) == %22y%22:%0A                        found.append(line)%0A            print(found)%0A        except IOError:%0A            print(%22Couldn't open the file %7B%7D%22.format(sys.argv%5B1%5D))%0A

Add dectect single-byte XOR