path
stringlengths
9
117
type
stringclasses
2 values
project
stringclasses
10 values
commit_hash
stringlengths
40
40
commit_message
stringlengths
1
137
ground_truth
stringlengths
0
2.74k
main_code
stringlengths
102
3.37k
context
stringlengths
0
14.7k
app.Tests.test_neural_network/TestNN.test_sha512_yes
Modified
Ciphey~Ciphey
6009f35c1442c11bba654adefaa01328cb2b94fa
Fixed some Pytest stuff
<0>:<add> model = app.neuralNetworkMod.nn.NeuralNetwork() <del> model = NeuralNetwork()
# module: app.Tests.test_neural_network # python3 -m unittest Tests.testchi_squared # python -m unittest discover -s tests # python3 -m unittest discover -s Tests -p test*.py # ["sha1", "md5", "sha256", "sha512", "caeser", "plaintext"] class TestNN(unittest.TestCase): ...
===========unchanged ref 0=========== at: app.neuralNetworkMod.nn NeuralNetwork() at: app.neuralNetworkMod.nn.NeuralNetwork predictnn(text) at: numpy.core.arrayprint set_printoptions(precision: None | SupportsIndex=..., threshold: None | int=..., edgeitems: None | int=..., ...
app.Tests.test_neural_network/TestNN.test_caesar_yes
Modified
Ciphey~Ciphey
6009f35c1442c11bba654adefaa01328cb2b94fa
Fixed some Pytest stuff
<0>:<add> model = app.neuralNetworkMod.nn.NeuralNetwork() <del> model = NeuralNetwork()
# module: app.Tests.test_neural_network # python3 -m unittest Tests.testchi_squared # python -m unittest discover -s tests # python3 -m unittest discover -s Tests -p test*.py # ["sha1", "md5", "sha256", "sha512", "caeser", "plaintext"] class TestNN(unittest.TestCase): ...
===========unchanged ref 0=========== at: app.neuralNetworkMod.nn NeuralNetwork() at: app.neuralNetworkMod.nn.NeuralNetwork predictnn(text) at: numpy.core.arrayprint set_printoptions(precision: None | SupportsIndex=..., threshold: None | int=..., edgeitems: None | int=..., ...
app.Decryptor.basicEncryption.reverse/Reverse.__init__
Modified
Ciphey~Ciphey
6009f35c1442c11bba654adefaa01328cb2b94fa
Fixed some Pytest stuff
<1>:<add> self.mh = app.mathsHelper.mathsHelper() <del> self.mh = mathsHelper.mathsHelper()
# module: app.Decryptor.basicEncryption.reverse + + class Reverse: def __init__(self, lc): <0> self.lc = lc <1> self.mh = mathsHelper.mathsHelper() <2>
===========unchanged ref 0=========== at: mathsHelper mathsHelper() ===========changed ref 0=========== + # module: app.Decryptor.Encoding + + ===========changed ref 1=========== + # module: app.Decryptor + + ===========changed ref 2=========== # module: app.Tests.test_basic_pa...
app.languageCheckerMod.chisquared/chiSquared.__init__
Modified
Ciphey~Ciphey
6009f35c1442c11bba654adefaa01328cb2b94fa
Fixed some Pytest stuff
# module: app.languageCheckerMod.chisquared class chiSquared: def __init__(self): <0> self.languages = { <1> "English": <2> #[0.0855, 0.0160, 0.0316, 0.0387, 0.1210,0.0218, 0.0209, 0.0496, 0.0733, 0.0022,0.0081, 0.0421, 0.0253, 0.0717, 0.0747,0.0207, 0.0010,...
===========below chunk 0=========== # module: app.languageCheckerMod.chisquared class chiSquared: def __init__(self): # offset: 1 } self.average = 0.0 self.totalDone = 0.0 self.oldAverage = 0.0 self.mh = mathsHelper.mathsHelper() ...
app.Tests.test_integration_languagechecker/TestLanguageChecker.test_basics_german
Modified
Ciphey~Ciphey
81e6a5c14253bd258fa1a51f80fa1e0ea28884d9
All tests - FIXED
<2>:<add> self.assertEqual(result, False) <del> self.assertEqual(result, True)
# module: app.Tests.test_integration_languagechecker # python3 -m unittest Tests.testchi_squared # python -m unittest discover -s tests # python3 -m unittest discover -s Tests -p test*.py class TestLanguageChecker(unittest.TestCase): def test_basics_german(self): <0> ...
===========unchanged ref 0=========== at: app.languageCheckerMod.LanguageChecker LanguageChecker() at: app.languageCheckerMod.LanguageChecker.LanguageChecker checkLanguage(text) at: unittest.case.TestCase failureException: Type[BaseException] longMessage: bool ...
app.Tests.test_integration_languagechecker/TestLanguageChecker.test_basics_quickbrownfox
Modified
Ciphey~Ciphey
81e6a5c14253bd258fa1a51f80fa1e0ea28884d9
All tests - FIXED
<3>:<add> lc = app.languageCheckerMod.LanguageChecker.LanguageChecker() <del> lc = LanguageChecker()
# module: app.Tests.test_integration_languagechecker # python3 -m unittest Tests.testchi_squared # python -m unittest discover -s tests # python3 -m unittest discover -s Tests -p test*.py class TestLanguageChecker(unittest.TestCase): def test_basics_quickbrownfox(self): <0> ...
===========unchanged ref 0=========== at: app.languageCheckerMod.LanguageChecker LanguageChecker() at: app.languageCheckerMod.LanguageChecker.LanguageChecker checkLanguage(text) at: unittest.case.TestCase assertEqual(first: Any, second: Any, msg: Any=...) -> None ...
app.Tests.test_integration_languagechecker/TestLanguageChecker.test_integration_addition
Modified
Ciphey~Ciphey
81e6a5c14253bd258fa1a51f80fa1e0ea28884d9
All tests - FIXED
<6>:<add> lc2 = app.languageCheckerMod.LanguageChecker.LanguageChecker() <del> lc2 = app.LanguageChecker()
# module: app.Tests.test_integration_languagechecker # python3 -m unittest Tests.testchi_squared # python -m unittest discover -s tests # python3 -m unittest discover -s Tests -p test*.py class TestLanguageChecker(unittest.TestCase): def test_integration_addition(self): <0> ...
===========unchanged ref 0=========== at: app.languageCheckerMod.LanguageChecker LanguageChecker() at: app.languageCheckerMod.LanguageChecker.LanguageChecker checkLanguage(text) getChiScore() at: unittest.case.TestCase assertAlmostEqual(first: float, second: fl...
app.neuralNetworkMod.nn/NeuralNetwork.__init__
Modified
Ciphey~Ciphey
81e6a5c14253bd258fa1a51f80fa1e0ea28884d9
All tests - FIXED
<3>:<add> <del> import mathsHelper <4>:<add> self.mh = app.mathsHelper.mathsHelper() <del> self.mh = mathsHelper.mathsHelper()
# module: app.neuralNetworkMod.nn class NeuralNetwork: def __init__(self): <0> self.CATEGORIES = ["sha1", "md5", "sha256", "sha512", "caeser", "plaintext"] <1> self.CATEGORIES = [1, 2, 3, 4, 5, 6] <2> self.MODEL = load_model("app/neuralNetworkMod/Neu...
===========changed ref 0=========== # module: app.Tests.test_integration_languagechecker # python3 -m unittest Tests.testchi_squared # python -m unittest discover -s tests # python3 -m unittest discover -s Tests -p test*.py class TestLanguageChecker(unittest.TestCase): def test_basics_ger...
app.Tests.test_caesarcipher_basic/TestChi.test_caesar_yes
Modified
Ciphey~Ciphey
81e6a5c14253bd258fa1a51f80fa1e0ea28884d9
All tests - FIXED
<2>:<add> c = app.Decryptor.basicEncryption.caesar.Caesar(lc) <del> c = Caesar.Caesar(lc)
<s>: app.Tests.test_caesarcipher_basic # python3 -m unittest Tests.testchi_squared # python -m unittest discover -s tests # python3 -m unittest discover -s Tests -p test*.py # {"lc": self.lc, "IsPlaintext?": True, "Plaintext": translated, "Cipher": "Caesar"} - ...
===========unchanged ref 0=========== at: app.Decryptor.basicEncryption.caesar Caesar(lc) at: app.Decryptor.basicEncryption.caesar.Caesar decrypt(message) at: app.languageCheckerMod.LanguageChecker LanguageChecker() at: unittest.case.TestCase failureExcepti...
app.Tests.test_caesarcipher_basic/TestChi.test_caesar_no
Modified
Ciphey~Ciphey
81e6a5c14253bd258fa1a51f80fa1e0ea28884d9
All tests - FIXED
<2>:<add> c = app.Decryptor.basicEncryption.caesar.Caesar(lc) <del> c = Caesar.Caesar(lc)
<s>.Tests.test_caesarcipher_basic # python3 -m unittest Tests.testchi_squared # python -m unittest discover -s tests # python3 -m unittest discover -s Tests -p test*.py # {"lc": self.lc, "IsPlaintext?": True, "Plaintext": translated, "Cipher": "Caesar"} - cl...
===========unchanged ref 0=========== at: app.Decryptor.basicEncryption.caesar Caesar(lc) at: app.Decryptor.basicEncryption.caesar.Caesar decrypt(message) at: app.languageCheckerMod.LanguageChecker LanguageChecker() at: unittest.case.TestCase assertEqual(fi...
app.Tests.test_caesarcipher_basic/TestChi.test_caesar_plaintext_yes
Modified
Ciphey~Ciphey
81e6a5c14253bd258fa1a51f80fa1e0ea28884d9
All tests - FIXED
<4>:<add> c = app.Decryptor.basicEncryption.caesar.Caesar(lc) <del> c = Caesar.Caesar(lc)
<s>test_caesarcipher_basic # python3 -m unittest Tests.testchi_squared # python -m unittest discover -s tests # python3 -m unittest discover -s Tests -p test*.py # {"lc": self.lc, "IsPlaintext?": True, "Plaintext": translated, "Cipher": "Caesar"} - class Tes...
===========unchanged ref 0=========== at: app.Decryptor.basicEncryption.caesar Caesar(lc) at: app.Decryptor.basicEncryption.caesar.Caesar decrypt(message) at: app.languageCheckerMod.LanguageChecker LanguageChecker() at: unittest.case.TestCase assertEqual(fi...
app.Tests.test_caesarcipher_basic/TestChi.test_caesar_english_comparison
Modified
Ciphey~Ciphey
81e6a5c14253bd258fa1a51f80fa1e0ea28884d9
All tests - FIXED
<1>:<add> c = app.Decryptor.basicEncryption.caesar.Caesar(lc) <del> c = Caesar.Caesar(lc)
<s>test_caesarcipher_basic # python3 -m unittest Tests.testchi_squared # python -m unittest discover -s tests # python3 -m unittest discover -s Tests -p test*.py # {"lc": self.lc, "IsPlaintext?": True, "Plaintext": translated, "Cipher": "Caesar"} - class Tes...
===========unchanged ref 0=========== at: app.Decryptor.basicEncryption.caesar Caesar(lc) at: app.Decryptor.basicEncryption.caesar.Caesar decrypt(message) at: app.languageCheckerMod.LanguageChecker LanguageChecker() at: unittest.case.TestCase assertEqual(fi...
app.Tests.test_caesarcipher_basic/TestChi.test_caesar_english_comparison_yeet
Modified
Ciphey~Ciphey
81e6a5c14253bd258fa1a51f80fa1e0ea28884d9
All tests - FIXED
<1>:<add> c = app.Decryptor.basicEncryption.caesar.Caesar(lc) <del> c = Caesar.Caesar(lc)
<s>esarcipher_basic # python3 -m unittest Tests.testchi_squared # python -m unittest discover -s tests # python3 -m unittest discover -s Tests -p test*.py # {"lc": self.lc, "IsPlaintext?": True, "Plaintext": translated, "Cipher": "Caesar"} - class TestChi(un...
===========unchanged ref 0=========== at: app.Decryptor.basicEncryption.caesar Caesar(lc) at: app.Decryptor.basicEncryption.caesar.Caesar decrypt(message) at: app.languageCheckerMod.LanguageChecker LanguageChecker() at: unittest.case.TestCase assertEqual(fi...
app.Tests.test_caesarcipher_basic/TestChi.test_caesar_what_is_this
Modified
Ciphey~Ciphey
81e6a5c14253bd258fa1a51f80fa1e0ea28884d9
All tests - FIXED
<4>:<add> c = app.Decryptor.basicEncryption.caesar.Caesar(lc) <del> c = Caesar.Caesar(lc)
<s>_caesarcipher_basic # python3 -m unittest Tests.testchi_squared # python -m unittest discover -s tests # python3 -m unittest discover -s Tests -p test*.py # {"lc": self.lc, "IsPlaintext?": True, "Plaintext": translated, "Cipher": "Caesar"} - class TestChi...
===========unchanged ref 0=========== at: app.Decryptor.basicEncryption.caesar Caesar(lc) at: app.Decryptor.basicEncryption.caesar.Caesar decrypt(message) at: app.languageCheckerMod.LanguageChecker LanguageChecker() at: unittest.case.TestCase assertEqual(fi...
app.Decryptor.basicEncryption.viginere/Viginere.attemptHackWithKeyLength
Modified
Ciphey~Ciphey
0dc5a5c839cba1e8cb58ad7da8b9148aa90ce0b4
broken
<15>:<add> keyAndFreqMatchTuple = (possibleKey, Decryptor.basicEncryption.freqAnalysis.englishFreqMatchScore(decryptedText)) <del> keyAndFreqMatchTuple = (possibleKey, app.Decryptor.basicEncryption.freqAnalysis.englishFreqMatchScore(decryptedText))
# module: app.Decryptor.basicEncryption.viginere class Viginere: def attemptHackWithKeyLength(self, ciphertext, mostLikelyKeyLength): <0> # Determine the most likely letters for each letter in the key: <1> ciphertextUp = ciphertext.upper() <2> # allF...
===========below chunk 0=========== # module: app.Decryptor.basicEncryption.viginere class Viginere: def attemptHackWithKeyLength(self, ciphertext, mostLikelyKeyLength): # offset: 1 # Try every combination of the most likely letters for each position # in t...
app.Decryptor.basicEncryption.basic_parent/BasicParent.__init__
Modified
Ciphey~Ciphey
0dc5a5c839cba1e8cb58ad7da8b9148aa90ce0b4
broken
<1>:<add> self.caesar = Decryptor.basicEncryption.caesar.Caesar(self.lc) <del> self.caesar = app.Decryptor.basicEncryption.caesar.Caesar(self.lc) <2>:<add> self.reverse = Decryptor.basicEncryption.reverse.Reverse(self.lc) <del> self.reverse = app.Decryptor.basicEncryption....
# module: app.Decryptor.basicEncryption.basic_parent class BasicParent: def __init__(self, lc): <0> self.lc = lc <1> self.caesar = app.Decryptor.basicEncryption.caesar.Caesar(self.lc) <2> self.reverse = app.Decryptor.basicEncryption.reverse.Reverse(self.lc) ...
===========unchanged ref 0=========== at: app.Decryptor.basicEncryption.basic_parent.BasicParent.decrypt self.lc = self.lc + answer["lc"] at: app.Decryptor.basicEncryption.caesar Caesar(lc) at: app.Decryptor.basicEncryption.pigLatin PigLatin(lc) at: app.Decryptor.b...
app.Decryptor.Encoding.morsecode/MorseCode.__init__
Modified
Ciphey~Ciphey
95e451e7a43a8c7a2f2aa42e4a9b7d25b13ab4f2
Fixed testing & Ciphey now runs
<2>:<add> self.MORSE_CODE_DICT = { <add> "A": ".-", <add> "B": "-...", <add> "C": "-.-.", <add> "D": "-..", <add> "E": ".", <add> "F": "..-.", <add> "G": "--.", <add> ...
# module: app.Decryptor.Encoding.morsecode class MorseCode: def __init__(self, lc): <0> self.lc = lc <1> self.ALLOWED = [".", "-", " ", "/", "\n"] <2> self.MORSE_CODE_DICT = {'A': '.-', 'B': '-...', <3> 'C': '-.-.', 'D': '-..', 'E': '.', <4> 'F...
===========changed ref 0=========== + # module: app.test_dictionary + + ===========changed ref 1=========== + # module: app.test_dictionary + class testDictionary(unittest.TestCase): + def test_english_false(self): + dc = dictionaryChecker() + result = dc.confirmlanguage("jdajj kop...
app.Decryptor.Encoding.morsecode/MorseCode.decrypt
Modified
Ciphey~Ciphey
95e451e7a43a8c7a2f2aa42e4a9b7d25b13ab4f2
Fixed testing & Ciphey now runs
<1>:<add> return { <add> "lc": self.lc, <add> "IsPlaintext?": False, <add> "Plaintext": None, <add> "Cipher": "Morse Code", <add> "Extra Information": None, <add> } <del> ...
# module: app.Decryptor.Encoding.morsecode class MorseCode: def decrypt(self, text): <0> if not self.checkIfMorse(text): <1> return {"lc": self.lc, "IsPlaintext?": False, "Plaintext": None, "Cipher": "Morse Code", "Extra Information": None} <2> try: <3...
===========changed ref 0=========== # module: app.Decryptor.Encoding.morsecode class MorseCode: def __init__(self, lc): self.lc = lc self.ALLOWED = [".", "-", " ", "/", "\n"] + self.MORSE_CODE_DICT = { + "A": ".-", + "B": "-...", + ...
app.Decryptor.basicEncryption.affine/Affine.decrypt
Modified
Ciphey~Ciphey
95e451e7a43a8c7a2f2aa42e4a9b7d25b13ab4f2
Fixed testing & Ciphey now runs
<1>:<add> for key in range(len(self.SYMBOLS) ** 2): <del> for key in range(len(self.SYMBOLS) ** 2): <8>:<add> return { <add> "lc": self.lc, <add> "IsPlaintext?": True, <add> "Plaintext": decryptedT...
# module: app.Decryptor.basicEncryption.affine + + class Affine: + - def decrypt(self, text): <0> # Brute-force by looping through every possible key <1> for key in range(len(self.SYMBOLS) ** 2): <2> keyA = self.getKeyParts(ke...
===========unchanged ref 0=========== at: app.Decryptor.basicEncryption.affine.Affine getKeyParts(self, key) getKeyParts(key) decryptMessage(key, message) at: mathsHelper mathsHelper() at: mathsHelper.mathsHelper gcd(a, b) ===========changed r...
app.Decryptor.basicEncryption.affine/Affine.decryptMessage
Modified
Ciphey~Ciphey
95e451e7a43a8c7a2f2aa42e4a9b7d25b13ab4f2
Fixed testing & Ciphey now runs
<1>:<add> self.checkKeys(keyA, keyB, "decrypt") <del> self.checkKeys(keyA, keyB, 'decrypt') <2>:<add> plaintext = "" <del> plaintext = '' <4>:<add> <del> <9>:<add> plaintext += self.SYMBOLS[ <add> (symbolIndex - key...
# module: app.Decryptor.basicEncryption.affine + + class Affine: + def decryptMessage(self, key, message): <0> keyA, keyB = getKeyParts(key) <1> self.checkKeys(keyA, keyB, 'decrypt') <2> plaintext = '' <3> modInverseOfKeyA = self.mh.find...
===========changed ref 0=========== # module: app.Decryptor.basicEncryption.affine + + class Affine: + - def decrypt(self, text): # Brute-force by looping through every possible key + for key in range(len(self.SYMBOLS) ** 2): - for key in range(l...
app.neuralNetworkMod.nn/NeuralNetwork.__init__
Modified
Ciphey~Ciphey
95e451e7a43a8c7a2f2aa42e4a9b7d25b13ab4f2
Fixed testing & Ciphey now runs
<2>:<add> script_dir = os.path.dirname(__file__) <add> file_path = os.path.join(script_dir, "NeuralNetworkModel.model") <add> self.MODEL = load_model(file_path) <add> <del> self.MODEL = load_model("app/neuralNetworkMod/NeuralNetworkModel.model") <3>:<del> ...
# module: app.neuralNetworkMod.nn class NeuralNetwork: + def __init__(self): <0> self.CATEGORIES = ["sha1", "md5", "sha256", "sha512", "caeser", "plaintext"] <1> self.CATEGORIES = [1, 2, 3, 4, 5, 6] <2> self.MODEL = load_model("app/neuralNetwor...
===========changed ref 0=========== + # module: app.test_dictionary + + ===========changed ref 1=========== + # module: app.test_dictionary + class testDictionary(unittest.TestCase): + def test_english_false(self): + dc = dictionaryChecker() + result = dc.confirmlanguage("jdajj kop...
app.neuralNetworkMod.nn/NeuralNetwork.getLetterFreq
Modified
Ciphey~Ciphey
95e451e7a43a8c7a2f2aa42e4a9b7d25b13ab4f2
Fixed testing & Ciphey now runs
<1>:<add> letterFreq = { <add> "a": 0, <add> "b": 0, <add> "c": 0, <add> "d": 0, <add> "e": 0, <add> "f": 0, <add> "g": 0, <add> "h": 0, <add> "i": 0...
# module: app.neuralNetworkMod.nn class NeuralNetwork: + def getLetterFreq(self, text): <0> # This part creates a letter frequency of the text <1> letterFreq = {'a': 0, 'b': 0, 'c': 0, 'd': 0, 'e': 0, 'f': 0, 'g': 0, 'h': 0, 'i': 0, 'j': 0, 'k': 0, 'l': 0...
===========unchanged ref 0=========== at: app.neuralNetworkMod.nn.NeuralNetwork formatData(text) editData(data) at: numpy.core._multiarray_umath asarray(a, dtype=None, order=None, *, like=None, /) ===========changed ref 0=========== # module: app.neuralNetworkMod....
app.Decryptor.Encoding.hexadecimal/Hexadecimal.decrypt
Modified
Ciphey~Ciphey
95e451e7a43a8c7a2f2aa42e4a9b7d25b13ab4f2
Fixed testing & Ciphey now runs
<3>:<add> return { <add> "lc": self.lc, <add> "IsPlaintext?": False, <add> "Plaintext": None, <add> "Cipher": None, <add> "Extra Information": None, <del> return {"lc": self.lc, "...
# module: app.Decryptor.Encoding.hexadecimal class Hexadecimal: + def decrypt(self, text): <0> try: <1> result = bytearray.fromhex(text).decode() <2> except ValueError as e: <3> return {"lc": self.lc, "IsPlaintext?": False, "Plaintext": None...
===========unchanged ref 0=========== at: app.Decryptor.Encoding.hexadecimal.Hexadecimal.__init__ self.lc = lc ===========changed ref 0=========== + # module: app.test_dictionary + + ===========changed ref 1=========== + # module: app.test_dictionary + class testDictionary(unittest.Tes...
app.languageCheckerMod.chisquared/chiSquared.__init__
Modified
Ciphey~Ciphey
95e451e7a43a8c7a2f2aa42e4a9b7d25b13ab4f2
Fixed testing & Ciphey now runs
<2>:<add> # [0.0855, 0.0160, 0.0316, 0.0387, 0.1210,0.0218, 0.0209, 0.0496, 0.0733, 0.0022,0.0081, 0.0421, 0.0253, 0.0717, 0.0747,0.0207, 0.0010, 0.0633, 0.0673, 0.0894,0.0268, 0.0106, 0.0183, 0.0019, 0.0172,0.0011] <del> #[0.0855, 0.0160, 0.0316, 0.0387, 0.1210,0.0218, 0.0209, 0.0496, 0....
# module: app.languageCheckerMod.chisquared + + class chiSquared: + def __init__(self): <0> self.languages = { <1> "English": <2> #[0.0855, 0.0160, 0.0316, 0.0387, 0.1210,0.0218, 0.0209, 0.0496, 0.0733, 0.0022,0.0081, 0.0421, 0.0253, 0.0717...
===========below chunk 0=========== # module: app.languageCheckerMod.chisquared + + class chiSquared: + def __init__(self): # offset: 1 } self.average = 0.0 self.totalDone = 0.0 self.oldAverage = 0.0 self.mh = app.mathsHelpe...
app.languageCheckerMod.chisquared/chiSquared.getLetterFreq
Modified
Ciphey~Ciphey
95e451e7a43a8c7a2f2aa42e4a9b7d25b13ab4f2
Fixed testing & Ciphey now runs
<1>:<add> letterFreq = { <add> "a": 0, <add> "b": 0, <add> "c": 0, <add> "d": 0, <add> "e": 0, <add> "f": 0, <add> "g": 0, <add> "h": 0, <add> "i": 0...
# module: app.languageCheckerMod.chisquared + + class chiSquared: + def getLetterFreq(self, text): <0> # This part creates a letter frequency of the text <1> letterFreq = {'a': 0, 'b': 0, 'c': 0, 'd': 0, 'e': 0, 'f': 0, 'g': 0, 'h': 0, 'i': 0, 'j': 0, 'k': 0,...
===========unchanged ref 0=========== at: app.languageCheckerMod.chisquared chiSquared() at: app.languageCheckerMod.chisquared.chiSquared.__init__ self.average = 0.0 self.totalDone = 0.0 self.totalChi = 0.0 self.chisAsaList = [] at: app.langua...
app.languageCheckerMod.chisquared/chiSquared.chiSquared
Modified
Ciphey~Ciphey
95e451e7a43a8c7a2f2aa42e4a9b7d25b13ab4f2
Fixed testing & Ciphey now runs
<2>:<del> <18>:<add> print( <add> 'Error, you have entered an empty string :( The error is "' <add> + str(e) <add> + '" on line 34 of LanguageChecker.py (function chiSquared)' <add> ) <...
# module: app.languageCheckerMod.chisquared + + class chiSquared: + def chiSquared(self, text): <0> """Creates letter frequency of text and compares that to the letter frequency of the language""" <1> <2> <3> # if all items of the dictionary...
===========below chunk 0=========== # module: app.languageCheckerMod.chisquared + + class chiSquared: + def chiSquared(self, text): # offset: 1 self.average = (self.totalChi + maxChiSquare) / self.totalDone self.oldstandarddeviation = abs(self.standarddeviation) ...
app.Decryptor.Encoding.binary/Binary.decrypt
Modified
Ciphey~Ciphey
95e451e7a43a8c7a2f2aa42e4a9b7d25b13ab4f2
Fixed testing & Ciphey now runs
<3>:<add> return { <add> "lc": self.lc, <add> "IsPlaintext?": False, <add> "Plaintext": None, <add> "Cipher": None, <add> "Extra Information": None, <add> } <del> ...
# module: app.Decryptor.Encoding.binary + class Binary: + def decrypt(self, text): <0> try: <1> result = self.decode(text) <2> except ValueError as e: <3> return {"lc": self.lc, "IsPlaintext?": False, "Plaintext": None, "Cipher...
===========unchanged ref 0=========== at: app.Decryptor.Encoding.binary.Binary decode(text) ===========changed ref 0=========== + # module: app.test_dictionary + + ===========changed ref 1=========== + # module: app.test_dictionary + class testDictionary(unittest.TestCase): + def...
app.Decryptor.Encoding.binary/Binary.decode
Modified
Ciphey~Ciphey
95e451e7a43a8c7a2f2aa42e4a9b7d25b13ab4f2
Fixed testing & Ciphey now runs
<5>:<add> text = text.encode("utf-8") <del> text = text.encode('utf-8') <11>:<add> text = n.to_bytes((n.bit_length() + 7) // 8, "big").decode() <del> text = n.to_bytes((n.bit_length() + 7) // 8, 'big').decode() <13>:<add> return text <del> return text...
# module: app.Decryptor.Encoding.binary + class Binary: + - def decode(self, text): <0> """ <1> my own binary decoder lol ;p <2> """ <3> text = text.replace(" ", "") <4> # to a bytes string <5> text = te...
===========unchanged ref 0=========== at: app.Decryptor.Encoding.binary.Binary.__init__ self.lc = lc at: app.Decryptor.Encoding.binary.Binary.decrypt result = self.decode(text) at: languageCheckerMod.LanguageChecker.LanguageChecker checkLanguage(text) ===========c...
app.Decryptor.Encoding.ascii/Ascii.decrypt
Modified
Ciphey~Ciphey
95e451e7a43a8c7a2f2aa42e4a9b7d25b13ab4f2
Fixed testing & Ciphey now runs
<3>:<add> return { <add> "lc": self.lc, <add> "IsPlaintext?": False, <add> "Plaintext": None, <add> "Cipher": None, <add> "Extra Information": None, <add> } <del> ...
# module: app.Decryptor.Encoding.ascii class Ascii: + def decrypt(self, text): <0> try: <1> result = self.deascii(text) <2> except ValueError as e: <3> return {"lc": self.lc, "IsPlaintext?": False, "Plaintext": None, "Cipher": None, "Extra I...
===========unchanged ref 0=========== at: app.Decryptor.Encoding.ascii.Ascii deascii(text) ===========changed ref 0=========== + # module: app.test_dictionary + + ===========changed ref 1=========== + # module: app.test_dictionary + class testDictionary(unittest.TestCase): + def ...
app.Decryptor.Encoding.base64/Base64.decrypt
Modified
Ciphey~Ciphey
95e451e7a43a8c7a2f2aa42e4a9b7d25b13ab4f2
Fixed testing & Ciphey now runs
<0>:<add> <del> <4>:<add> result = result.decode("utf-8") <del> result = result.decode("utf-8") <6>:<add> return { <add> "lc": self.lc, <add> "IsPlaintext?": False, <add> "Plaintext": None, ...
# module: app.Decryptor.Encoding.base64 + + class Base64: + def decrypt(self, text): <0> <1> try: <2> result = base64.b64decode(text) <3> # yeet turning b strings into normal stringy bois <4> result = result.decod...
===========unchanged ref 0=========== at: base64 b64decode(s: _decodable, altchars: Optional[bytes]=..., validate: bool=...) -> bytes ===========changed ref 0=========== + # module: app.test_dictionary + + ===========changed ref 1=========== + # module: app.test_dictionary + class test...
app.Decryptor.Encoding.encodingParent/EncodingParent.decrypt
Modified
Ciphey~Ciphey
95e451e7a43a8c7a2f2aa42e4a9b7d25b13ab4f2
Fixed testing & Ciphey now runs
<9>:<add> from multiprocessing.dummy import Pool as ThreadPool <del> from multiprocessing.dummy import Pool as ThreadPool <10>:<add> <add> pool = ThreadPool(4) <del> pool = ThreadPool(4) <12>:<add> <del> <18>:<add> return { <add> ...
# module: app.Decryptor.Encoding.encodingParent + class EncodingParent: + def decrypt(self, text): <0> self.text = text <1> torun = [self.base64, self.binary, self.hex, self.ascii, self.morse] <2> """ <3> ok so I have an array of funct...
===========unchanged ref 0=========== at: app.Decryptor.Encoding.encodingParent.EncodingParent callDecrypt(obj) at: app.Decryptor.Encoding.encodingParent.EncodingParent.__init__ self.base64 = Base64(self.lc) self.binary = Binary(self.lc) self.hex = Hexadecimal(self...
app.Decryptor.basicEncryption.reverse/Reverse.decrypt
Modified
Ciphey~Ciphey
95e451e7a43a8c7a2f2aa42e4a9b7d25b13ab4f2
Fixed testing & Ciphey now runs
<5>:<add> return { <add> "lc": self.lc, <add> "IsPlaintext?": True, <add> "Plaintext": message, <add> "Cipher": "Reverse", <add> "Extra Information": None, <add> } <del> ...
# module: app.Decryptor.basicEncryption.reverse class Reverse: def decrypt(self, message): <0> message = self.mh.stripPuncuation(message) <1> <2> message = message[::-1] <3> result = self.lc.checkLanguage(message) <4> if result...
===========unchanged ref 0=========== at: app.Decryptor.basicEncryption.reverse.Reverse.__init__ self.lc = lc self.mh = app.mathsHelper.mathsHelper() at: app.mathsHelper.mathsHelper stripPuncuation(text) at: languageCheckerMod.LanguageChecker.LanguageChecker ch...
app.mathsHelper/mathsHelper.findModInverse
Modified
Ciphey~Ciphey
95e451e7a43a8c7a2f2aa42e4a9b7d25b13ab4f2
Fixed testing & Ciphey now runs
<2>:<add> <del> <4>:<add> return None # No mod inverse exists if a & m aren't relatively prime. <del> return None # No mod inverse exists if a & m aren't relatively prime. <5>:<add> <del> <10>:<add> q = u3 // v3 # Note that // is the integer divi...
# module: app.mathsHelper + class mathsHelper: + def findModInverse(self, a, m): <0> # Return the modular inverse of a % m, which is <1> # the number x such that a*x % m = 1 <2> <3> if gcd(a, m) != 1: <4> return None # No m...
===========changed ref 0=========== + # module: app.test_dictionary + + ===========changed ref 1=========== + # module: app.test_dictionary + class testDictionary(unittest.TestCase): + def test_english_false(self): + dc = dictionaryChecker() + result = dc.confirmlanguage("jdajj kop...
app.mathsHelper/mathsHelper.getAllLetters
Modified
Ciphey~Ciphey
95e451e7a43a8c7a2f2aa42e4a9b7d25b13ab4f2
Fixed testing & Ciphey now runs
<1>:<add> letterFreq = { <add> "a": 0, <add> "b": 0, <add> "c": 0, <add> "d": 0, <add> "e": 0, <add> "f": 0, <add> "g": 0, <add> "h": 0, <add> "i": 0...
# module: app.mathsHelper + class mathsHelper: + def getAllLetters(self, text): <0> # This part creates a letter frequency of the text <1> letterFreq = {'a': 0, 'b': 0, 'c': 0, 'd': 0, 'e': 0, 'f': 0, 'g': 0, 'h': 0, 'i': 0, 'j': 0, 'k': 0, 'l': 0, 'm': 0, ...
===========unchanged ref 0=========== at: string punctuation = r"""!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~""" ===========changed ref 0=========== # module: app.mathsHelper + class mathsHelper: + def findModInverse(self, a, m): # Return the modular inverse of a % ...
app.mathsHelper/mathsHelper.getLetterCount
Modified
Ciphey~Ciphey
95e451e7a43a8c7a2f2aa42e4a9b7d25b13ab4f2
Fixed testing & Ciphey now runs
<2>:<add> letterCount = { <add> "A": 0, <add> "B": 0, <add> "C": 0, <add> "D": 0, <add> "E": 0, <add> "F": 0, <add> "G": 0, <add> "H": 0, <add> "I": ...
# module: app.mathsHelper + class mathsHelper: def getLetterCount(self, message): <0> # Returns a dictionary with keys of single letters and values of the <1> # count of how many times they appear in the message parameter: <2> letterCount = {'A...
===========unchanged ref 0=========== at: app.mathsHelper.mathsHelper.__init__ self.LETTERS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' ===========changed ref 0=========== # module: app.mathsHelper + class mathsHelper: + def findModInverse(self, a, m): # Return the mod...
app.mathsHelper/mathsHelper.getFrequencyOrder
Modified
Ciphey~Ciphey
95e451e7a43a8c7a2f2aa42e4a9b7d25b13ab4f2
Fixed testing & Ciphey now runs
<2>:<add> <del> <5>:<add> <del> <14>:<add> <del> <19>:<add> freqToLetter[freq] = "".join(freqToLetter[freq]) <del> freqToLetter[freq] = ''.join(freqToLetter[freq]) <20>:<add> <del> <25>:<add> <del> <31>:<add> <del> ...
# module: app.mathsHelper + class mathsHelper: - - + def getFrequencyOrder(self, message): <0> # Returns a string of the alphabet letters arranged in order of most <1> # frequently occurring in the message parameter. <2> <3> ...
===========unchanged ref 0=========== at: app.mathsHelper.mathsHelper getLetterCount(self, message) getLetterCount(message) getItemAtIndexZero(items) at: app.mathsHelper.mathsHelper.__init__ self.ETAOIN = 'ETAOINSHRDLCUMWFGYPBVKJXQZ' self.LETTERS = 'ABCDEFG...
app.mathsHelper/mathsHelper.englishFreqMatchScore
Modified
Ciphey~Ciphey
95e451e7a43a8c7a2f2aa42e4a9b7d25b13ab4f2
Fixed testing & Ciphey now runs
<6>:<add> <del> <16>:<add> <del> <17>:<add> return matchScore <del> return matchScore
# module: app.mathsHelper + class mathsHelper: - - + def englishFreqMatchScore(self, message): <0> # Return the number of matches that the string in the message <1> # parameter has when its letter frequency is compared to English <2> ...
===========unchanged ref 0=========== at: app.mathsHelper.mathsHelper getFrequencyOrder(self, message) getFrequencyOrder(message) at: app.mathsHelper.mathsHelper.__init__ self.ETAOIN = 'ETAOINSHRDLCUMWFGYPBVKJXQZ' ===========changed ref 0=========== # module: app.maths...
app.Decryptor.basicEncryption.basic_parent/BasicParent.decrypt
Modified
Ciphey~Ciphey
95e451e7a43a8c7a2f2aa42e4a9b7d25b13ab4f2
Fixed testing & Ciphey now runs
<1>:<add> from multiprocessing.dummy import Pool as ThreadPool <del> from multiprocessing.dummy import Pool as ThreadPool <2>:<add> <add> pool = ThreadPool(4) <del> pool = ThreadPool(4) <13>:<add> <del> <14>:<add> # so viginere runs ages ...
# module: app.Decryptor.basicEncryption.basic_parent + class BasicParent: def decrypt(self, text): <0> self.text = text <1> from multiprocessing.dummy import Pool as ThreadPool <2> pool = ThreadPool(4) <3> answers = pool.map(self.c...
===========unchanged ref 0=========== at: app.Decryptor.basicEncryption.basic_parent.BasicParent callDecrypt(obj) at: app.Decryptor.basicEncryption.basic_parent.BasicParent.__init__ self.lc = lc self.viginere = Decryptor.basicEncryption.viginere.Viginere(self.lc) s...
app.__main__/Ciphey.__init__
Modified
Ciphey~Ciphey
95e451e7a43a8c7a2f2aa42e4a9b7d25b13ab4f2
Fixed testing & Ciphey now runs
<0>:<add> # general purpose modules <del> # general purpose modules
# module: app.__main__ + class Ciphey: def __init__(self, text, cipher): <0> # general purpose modules <1> self.ai = NeuralNetwork() <2> self.lc = LanguageChecker.LanguageChecker() <3> self.mh = mathsHelper.mathsHelper() <4> <5> ...
===========unchanged ref 0=========== at: Decryptor.Encoding.encodingParent EncodingParent(lc) at: Decryptor.Hash.hashParent HashParent() at: Decryptor.basicEncryption.basic_parent BasicParent(lc) at: languageCheckerMod.LanguageChecker LanguageChecker() ...
app.__main__/Ciphey.one_level_of_decryption
Modified
Ciphey~Ciphey
95e451e7a43a8c7a2f2aa42e4a9b7d25b13ab4f2
Fixed testing & Ciphey now runs
<5>:<add> if ret["IsPlaintext?"]: <del> if ret['IsPlaintext?']: <6>:<add> print(ret["Plaintext"]) <del> print(ret['Plaintext']) <8>:<add> if ret["Extra Information"] != None: <del> ...
# module: app.__main__ + class Ciphey: def one_level_of_decryption(self, file=None, sickomode=None): <0> for key, val in self.whatToChoose.items(): <1> # https://stackoverflow.com/questions/4843173/how-to-check-if-type-of-a-variable-is-string <2> ...
===========unchanged ref 0=========== at: Decryptor.Encoding.encodingParent.EncodingParent setProbTable(table) decrypt(text) at: Decryptor.Hash.hashParent.HashParent decrypt(text) setProbTable(val) at: Decryptor.basicEncryption.basic_parent.BasicParent ...
app.languageCheckerMod.dictionaryChecker/dictionaryChecker.checkDictionary
Modified
Ciphey~Ciphey
95e451e7a43a8c7a2f2aa42e4a9b7d25b13ab4f2
Fixed testing & Ciphey now runs
<7>:<add> text = list(set(text)) # removes duplicate words <del> text = list(set(text)) # removes duplicate words <11>:<add> <add> # https://stackoverflow.com/questions/7165749/open-file-in-a-relative-location-in-python <add> script_dir = os.path.dirname(__file__) ...
# module: app.languageCheckerMod.dictionaryChecker + + class dictionaryChecker: def checkDictionary(self, text, language): <0> """Compares a word with <1> The dictionary is sorted and the text is sorted""" <2> # reads through most common words /...
===========below chunk 0=========== # module: app.languageCheckerMod.dictionaryChecker + + class dictionaryChecker: def checkDictionary(self, text, language): # offset: 1 # if the dictionary word is contained in the text somewhere # counter + 1 ...
app.Decryptor.basicEncryption.caesar/Caesar.decrypt
Modified
Ciphey~Ciphey
95e451e7a43a8c7a2f2aa42e4a9b7d25b13ab4f2
Fixed testing & Ciphey now runs
<5>:<add> SYMBOLS = "abcdefghijklmnopqrstuvwxyz" <del> SYMBOLS = 'abcdefghijklmnopqrstuvwxyz' <29>:<add> return { <add> "lc": self.lc, <add> "IsPlaintext?": True, <add> "Plaintext": translated, <a...
# module: app.Decryptor.basicEncryption.caesar + class Caesar: def decrypt(self, message): <0> """ Simple python program to bruteforce a caesar cipher""" <1> <2> # Example string <3> message = message.lower() <4> # Everything we ...
===========unchanged ref 0=========== at: app.Decryptor.basicEncryption.caesar.Caesar.__init__ self.lc = lc ===========changed ref 0=========== + # module: app.test_chi_squared + + ===========changed ref 1=========== + # module: app.test_basicparent + + ===========changed ref 2====...
app.Decryptor.basicEncryption.viginere/Viginere.__init__
Modified
Ciphey~Ciphey
95e451e7a43a8c7a2f2aa42e4a9b7d25b13ab4f2
Fixed testing & Ciphey now runs
<0>:<add> self.LETTERS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" <del> self.LETTERS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' <1>:<add> self.SILENT_MODE = True # If set to True, program doesn't print anything. <del> self.SILENT_MODE = True # If set to True, program doesn't print anything. <2...
# module: app.Decryptor.basicEncryption.viginere + + class Viginere: def __init__(self, lc): <0> self.LETTERS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' <1> self.SILENT_MODE = True # If set to True, program doesn't print anything. <2> self.NUM_MOST_FREQ_LETTERS = 4 ...
===========unchanged ref 0=========== at: re compile(pattern: AnyStr, flags: _FlagsType=...) -> Pattern[AnyStr] compile(pattern: Pattern[AnyStr], flags: _FlagsType=...) -> Pattern[AnyStr] ===========changed ref 0=========== + # module: app.test_chi_squared + + ===========changed re...
app.Decryptor.basicEncryption.viginere/Viginere.main
Modified
Ciphey~Ciphey
95e451e7a43a8c7a2f2aa42e4a9b7d25b13ab4f2
Fixed testing & Ciphey now runs
# module: app.Decryptor.basicEncryption.viginere + + class Viginere: - def main(self): <0> # Instead of typing this ciphertext out, you can copy & paste it <1> # from https://www.nostarch.com/crackingcodes/. <2> ciphertext = """Adiz Avtzqec...
===========below chunk 0=========== # module: app.Decryptor.basicEncryption.viginere + + class Viginere: - def main(self): # offset: 1 hackedMessage = self.hackVigenere(ciphertext) if hackedMessage != None: print('Copying hacked messa...
app.Decryptor.basicEncryption.viginere/Viginere.findRepeatSequencesSpacings
Modified
Ciphey~Ciphey
95e451e7a43a8c7a2f2aa42e4a9b7d25b13ab4f2
Fixed testing & Ciphey now runs
<5>:<add> message = self.NONLETTERS_PATTERN.sub("", message.upper()) <del> message = self.NONLETTERS_PATTERN.sub('', message.upper()) <8>:<add> seqSpacings = {} # Keys are sequences, values are lists of int spacings. <del> seqSpacings = {} # Keys are sequences, values are...
# module: app.Decryptor.basicEncryption.viginere + + class Viginere: - def findRepeatSequencesSpacings(self, message): <0> # Goes through the message and finds any 3 to 5 letter sequences <1> # that are repeated. Returns a dict with the keys of the se...
===========unchanged ref 0=========== at: app.Decryptor.basicEncryption.viginere.Viginere.__init__ self.NONLETTERS_PATTERN = re.compile('[^A-Z]') at: typing.Pattern flags: int groupindex: Mapping[str, int] groups: int pattern: AnyStr sub(r...
app.Decryptor.basicEncryption.viginere/Viginere.getUsefulFactors
Modified
Ciphey~Ciphey
95e451e7a43a8c7a2f2aa42e4a9b7d25b13ab4f2
Fixed testing & Ciphey now runs
<5>:<add> return [] # Numbers less than 2 have no useful factors. <del> return [] # Numbers less than 2 have no useful factors. <7>:<add> factors = [] # The list of factors found. <del> factors = [] # The list of factors found. <11>:<add> for i in range(...
# module: app.Decryptor.basicEncryption.viginere + + class Viginere: - def getUsefulFactors(self, num): <0> # Returns a list of useful factors of num. By "useful" we mean factors <1> # less than MAX_KEY_LENGTH + 1 and not 1. For example, <2> ...
===========unchanged ref 0=========== at: app.Decryptor.basicEncryption.viginere.Viginere.__init__ self.MAX_KEY_LENGTH = 16 # Will not attempt keys longer than this. ===========changed ref 0=========== # module: app.Decryptor.basicEncryption.viginere + + class Viginere: def...
app.Decryptor.basicEncryption.viginere/Viginere.getMostCommonFactors
Modified
Ciphey~Ciphey
95e451e7a43a8c7a2f2aa42e4a9b7d25b13ab4f2
Fixed testing & Ciphey now runs
<1>:<add> factorCounts = {} # Key is a factor, value is how often it occurs. <del> factorCounts = {} # Key is a factor, value is how often it occurs. <21>:<add> factorsByCount.append((factor, factorCounts[factor])) <del> factorsByCount.append( (factor, fact...
# module: app.Decryptor.basicEncryption.viginere + + class Viginere: - def getMostCommonFactors(self, seqFactors): <0> # First, get a count of how many times a factor occurs in seqFactors: <1> factorCounts = {} # Key is a factor, value is how often it...
===========unchanged ref 0=========== at: app.Decryptor.basicEncryption.viginere.Viginere getItemAtIndexOne(items) at: app.Decryptor.basicEncryption.viginere.Viginere.__init__ self.MAX_KEY_LENGTH = 16 # Will not attempt keys longer than this. ===========changed ref 0=========== ...
app.Decryptor.basicEncryption.viginere/Viginere.getNthSubkeysLetters
Modified
Ciphey~Ciphey
95e451e7a43a8c7a2f2aa42e4a9b7d25b13ab4f2
Fixed testing & Ciphey now runs
<7>:<add> message = self.NONLETTERS_PATTERN.sub("", message) <del> message = self.NONLETTERS_PATTERN.sub('', message) <14>:<add> return "".join(letters) <del> return ''.join(letters)
# module: app.Decryptor.basicEncryption.viginere + + class Viginere: - def getNthSubkeysLetters(self, nth, keyLength, message): <0> # Returns every nth letter for each keyLength set of letters in text. <1> # E.g. getNthSubkeysLetters(1, 3, 'ABCABCABC'...
===========unchanged ref 0=========== at: app.Decryptor.basicEncryption.viginere.Viginere.__init__ self.NONLETTERS_PATTERN = re.compile('[^A-Z]') at: typing.Pattern sub(repl: Callable[[Match[AnyStr]], AnyStr], string: AnyStr, count: int=...) -> AnyStr sub(repl: AnyStr, string: AnySt...
app.Decryptor.basicEncryption.viginere/Viginere.attemptHackWithKeyLength
Modified
Ciphey~Ciphey
95e451e7a43a8c7a2f2aa42e4a9b7d25b13ab4f2
Fixed testing & Ciphey now runs
<6>:<add> nthLetters = self.getNthSubkeysLetters( <add> nth, mostLikelyKeyLength, ciphertextUp <add> ) <del> nthLetters = self.getNthSubkeysLetters(nth, mostLikelyKeyLength, ciphertextUp) <15>:<add> keyAndFreqMatchTuple = ( <a...
# module: app.Decryptor.basicEncryption.viginere + + class Viginere: - def attemptHackWithKeyLength(self, ciphertext, mostLikelyKeyLength): <0> # Determine the most likely letters for each letter in the key: <1> ciphertextUp = ciphertext.upper() <2>...
===========below chunk 0=========== # module: app.Decryptor.basicEncryption.viginere + + class Viginere: - def attemptHackWithKeyLength(self, ciphertext, mostLikelyKeyLength): # offset: 1 print() # Print a newline. # Try every combination of t...
app.Decryptor.basicEncryption.viginere/Viginere.hackVigenere
Modified
Ciphey~Ciphey
95e451e7a43a8c7a2f2aa42e4a9b7d25b13ab4f2
Fixed testing & Ciphey now runs
<4>:<add> keyLengthStr = "" <del> keyLengthStr = '' <6>:<add> keyLengthStr += "%s " % (keyLength) <del> keyLengthStr += '%s ' % (keyLength) <7>:<add> print( <add> "Kasiski Examination results say the most likely k...
# module: app.Decryptor.basicEncryption.viginere + + class Viginere: - def hackVigenere(self, ciphertext): <0> # First, we need to do Kasiski Examination to figure out what the <1> # length of the ciphertext's encryption key is: <2> allLike...
===========below chunk 0=========== # module: app.Decryptor.basicEncryption.viginere + + class Viginere: - def hackVigenere(self, ciphertext): # offset: 1 if hackedMessage != None: break return hackedMessage ...
app.Decryptor.basicEncryption.viginere/Viginere.translateMessage
Modified
Ciphey~Ciphey
95e451e7a43a8c7a2f2aa42e4a9b7d25b13ab4f2
Fixed testing & Ciphey now runs
<0>:<add> translated = [] # Stores the encrypted/decrypted message string. <del> translated = [] # Stores the encrypted/decrypted message string. <1>:<add> <del> <4>:<add> <del> <5>:<add> for symbol in message: # Loop through each symbol in message. <...
# module: app.Decryptor.basicEncryption.viginere + + class Viginere: - - + def translateMessage(self, key, message, mode): <0> translated = [] # Stores the encrypted/decrypted message string. <1> <2> keyIndex = 0 <3> key...
===========unchanged ref 0=========== at: app.Decryptor.basicEncryption.viginere.Viginere.__init__ self.LETTERS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' ===========changed ref 0=========== # module: app.Decryptor.basicEncryption.viginere + + class Viginere: - def getNthSubk...
app.Decryptor.basicEncryption.pigLatin/PigLatin.decrypt
Modified
Ciphey~Ciphey
95e451e7a43a8c7a2f2aa42e4a9b7d25b13ab4f2
Fixed testing & Ciphey now runs
<3>:<add> return { <add> "lc": self.lc, <add> "IsPlaintext?": False, <add> "Plaintext": None, <add> "Cipher": "Pig Latin", <add> "Extra Information": None, <del> return {"lc": sel...
# module: app.Decryptor.basicEncryption.pigLatin class PigLatin: + def decrypt(self, message): <0> # If the message is less than or equal to 3 charecters, it's impossible to perform <1> # a pig latin cipher on it unless the word was one letter long <2> if len(...
===========below chunk 0=========== # module: app.Decryptor.basicEncryption.pigLatin class PigLatin: + def decrypt(self, message): # offset: 1 #TODO find a way to return 2 variables # this returns 2 variables in a tuple if self.lc.checkLanguage(mes...
app.Decryptor.basicEncryption.transposition/Transposition.main
Modified
Ciphey~Ciphey
95e451e7a43a8c7a2f2aa42e4a9b7d25b13ab4f2
Fixed testing & Ciphey now runs
# module: app.Decryptor.basicEncryption.transposition + class Transposition: + def main(self): <0> myMessage = """Cb b rssti aieih rooaopbrtnsceee er es no npfgcwu plri <1> <2> ch nitaalr eiuengiteehb(e1 hilincegeoamn fubehgtarndcstudmd nM eu eacBolta...
===========below chunk 0=========== # module: app.Decryptor.basicEncryption.transposition + class Transposition: + def main(self): # offset: 1 hackedMessage = self.hackTransposition(myMessage) ===========unchanged ref 0=========== at: app.Decryptor....
app.Decryptor.basicEncryption.transposition/Transposition.hackTransposition
Modified
Ciphey~Ciphey
95e451e7a43a8c7a2f2aa42e4a9b7d25b13ab4f2
Fixed testing & Ciphey now runs
<0>:<add> print("Hacking...") <del> print('Hacking...') <1>:<add> <del> <4>:<add> <del> <7>:<add> <del> <9>:<add> <del> <10>:<add> # if self.lc.checkLanguage(decryptedText): <del> #if self.lc.checkLanguage(decr...
# module: app.Decryptor.basicEncryption.transposition + class Transposition: + def hackTransposition(self, message): <0> print('Hacking...') <1> <2> # Python programs can be stopped at any time by pressing Ctrl-C (on <3> # Windows) or Ctr...
===========unchanged ref 0=========== at: app.Decryptor.basicEncryption.transposition.Transposition.__init__ self.lc = lc ===========changed ref 0=========== # module: app.Decryptor.basicEncryption.transposition + class Transposition: + def main(self): myM...
app.Decryptor.basicEncryption.transposition/Transposition.decryptMessage
Modified
Ciphey~Ciphey
95e451e7a43a8c7a2f2aa42e4a9b7d25b13ab4f2
Fixed testing & Ciphey now runs
<3>:<add> <del> <10>:<add> <del> <12>:<add> plaintext = [""] * numOfColumns <del> plaintext = [''] * numOfColumns <13>:<add> <del> <18>:<add> <del> <21>:<add> col += 1 # point to next column <del> col += 1 # point...
# module: app.Decryptor.basicEncryption.transposition + class Transposition: + def decryptMessage(self, key, message): <0> # The transposition decrypt function will simulate the "columns" and <1> # "rows" of the grid that the plaintext is written on by usin...
===========unchanged ref 0=========== at: math ceil(x: SupportsFloat, /) -> int ===========changed ref 0=========== # module: app.Decryptor.basicEncryption.transposition + class Transposition: + def hackTransposition(self, message): + print("Hacking...") ...
app.Decryptor.basicEncryption.freqAnalysis/getLetterCount
Modified
Ciphey~Ciphey
95e451e7a43a8c7a2f2aa42e4a9b7d25b13ab4f2
Fixed testing & Ciphey now runs
<2>:<add> letterCount = { <add> "A": 0, <add> "B": 0, <add> "C": 0, <add> "D": 0, <add> "E": 0, <add> "F": 0, <add> "G": 0, <add> "H": 0, <add> "I": 0, <add> "J": 0, <ad...
# module: app.Decryptor.basicEncryption.freqAnalysis + def getLetterCount(message): <0> # Returns a dictionary with keys of single letters and values of the <1> # count of how many times they appear in the message parameter: <2> letterCount = {'A': 0, 'B': 0, 'C': 0, 'D': 0...
===========unchanged ref 0=========== at: app.Decryptor.basicEncryption.freqAnalysis LETTERS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' ===========changed ref 0=========== + # module: app.test_chi_squared + + ===========changed ref 1=========== + # module: app.test_basicparent + + ===========c...
app.Decryptor.basicEncryption.freqAnalysis/getFrequencyOrder
Modified
Ciphey~Ciphey
95e451e7a43a8c7a2f2aa42e4a9b7d25b13ab4f2
Fixed testing & Ciphey now runs
<19>:<add> freqToLetter[freq] = "".join(freqToLetter[freq]) <del> freqToLetter[freq] = ''.join(freqToLetter[freq]) <32>:<add> return "".join(freqOrder) <del> return ''.join(freqOrder)
# module: app.Decryptor.basicEncryption.freqAnalysis def getFrequencyOrder(message): <0> # Returns a string of the alphabet letters arranged in order of most <1> # frequently occurring in the message parameter. <2> <3> # First, get a dictionary of each letter and its ...
===========unchanged ref 0=========== at: app.Decryptor.basicEncryption.freqAnalysis ETAOIN = 'ETAOINSHRDLCUMWFGYPBVKJXQZ' LETTERS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' getLetterCount(message) getItemAtIndexZero(items) ===========changed ref 0=========== # modul...
app.Decryptor.basicEncryption.freqAnalysis/englishFreqMatchScore
Modified
Ciphey~Ciphey
95e451e7a43a8c7a2f2aa42e4a9b7d25b13ab4f2
Fixed testing & Ciphey now runs
<17>:<add> return matchScore <del> return matchScore
# module: app.Decryptor.basicEncryption.freqAnalysis def englishFreqMatchScore(message): <0> # Return the number of matches that the string in the message <1> # parameter has when its letter frequency is compared to English <2> # letter frequency. A "match" is how many of...
===========unchanged ref 0=========== at: app.Decryptor.basicEncryption.freqAnalysis ETAOIN = 'ETAOINSHRDLCUMWFGYPBVKJXQZ' getFrequencyOrder(message) ===========changed ref 0=========== # module: app.Decryptor.basicEncryption.freqAnalysis def getFrequencyOrder(mess...
app.neuralNetworkMod.nn/NeuralNetwork.__init__
Modified
Ciphey~Ciphey
f821545de16eb56144e1316a53e896d499fa6ecb
fixed neural network bug
<6>:<add> self.mh = mathsHelper.mathsHelper() <del> self.mh = app.mathsHelper.mathsHelper()
# module: app.neuralNetworkMod.nn class NeuralNetwork: def __init__(self): <0> self.CATEGORIES = ["sha1", "md5", "sha256", "sha512", "caeser", "plaintext"] <1> self.CATEGORIES = [1, 2, 3, 4, 5, 6] <2> script_dir = os.path.dirname(__file__) ...
===========unchanged ref 0=========== at: os.path join(a: StrPath, *paths: StrPath) -> str join(a: BytesPath, *paths: BytesPath) -> bytes dirname(p: _PathLike[AnyStr]) -> AnyStr dirname(p: AnyStr) -> AnyStr ===========changed ref 0=========== # module: app.neuralNe...
app.languageCheckerMod.dictionaryChecker/dictionaryChecker.__init__
Modified
Ciphey~Ciphey
c0ee4697969a4ecf9ff77174d78d4ab84575a15e
Fixed testing.... again
<0>:<add> self.mh = mathsHelper.mathsHelper() <del> self.mh = app.mathsHelper.mathsHelper()
# module: app.languageCheckerMod.dictionaryChecker - class dictionaryChecker: def __init__(self): <0> self.mh = app.mathsHelper.mathsHelper() <1> self.languagePercentage = 0.0 <2> self.languageWordsCounter = 0.0 <3> self.languageThre...
===========unchanged ref 0=========== at: app.languageCheckerMod.dictionaryChecker.dictionaryChecker.checkDictionary self.languageWordsCounter = counter self.languagePercentage = self.mh.percentage( float(self.languageWordsCounter), float(len(text)) ) ...
app.Decryptor.basicEncryption.reverse/Reverse.__init__
Modified
Ciphey~Ciphey
c0ee4697969a4ecf9ff77174d78d4ab84575a15e
Fixed testing.... again
<1>:<add> self.mh = mathsHelper.mathsHelper() <del> self.mh = app.mathsHelper.mathsHelper()
# module: app.Decryptor.basicEncryption.reverse class Reverse: def __init__(self, lc): <0> self.lc = lc <1> self.mh = app.mathsHelper.mathsHelper() <2>
===========changed ref 0=========== # module: app.languageCheckerMod.dictionaryChecker + sys.path.append("..") ===========changed ref 1=========== # module: app.languageCheckerMod.dictionaryChecker - class dictionaryChecker: def __init__(self): + self.mh = math...
app.languageCheckerMod.chisquared/chiSquared.__init__
Modified
Ciphey~Ciphey
c0ee4697969a4ecf9ff77174d78d4ab84575a15e
Fixed testing.... again
# module: app.languageCheckerMod.chisquared class chiSquared: def __init__(self): <0> self.languages = { <1> "English": <2> # [0.0855, 0.0160, 0.0316, 0.0387, 0.1210,0.0218, 0.0209, 0.0496, 0.0733, 0.0022,0.0081, 0.0421, 0.0253, 0.071...
===========below chunk 0=========== # module: app.languageCheckerMod.chisquared class chiSquared: def __init__(self): # offset: 1 0.0011, 0.0182, 0.06280000000000001, 0.0602, 0.0...
app.languageCheckerMod.dictionaryChecker/dictionaryChecker.__init__
Modified
Ciphey~Ciphey
6d943a498c6b569f7881e6f537db5fc45aabdb72
Uploaded to PyPi
<0>:<add> self.mh = mh.mathsHelper() <del> self.mh = mathsHelper.mathsHelper()
# module: app.languageCheckerMod.dictionaryChecker + class dictionaryChecker: def __init__(self): <0> self.mh = mathsHelper.mathsHelper() <1> self.languagePercentage = 0.0 <2> self.languageWordsCounter = 0.0 <3> self.languageThreshol...
===========changed ref 0=========== # module: app.languageCheckerMod.dictionaryChecker + sys.path.append("..") + try: + import mathsHelper as mh + except ModuleNotFoundError: + import app.mathsHelper as mh ===========changed ref 1=========== # module: app.Decryptor.basicEncrypt...
app.languageCheckerMod.chisquared/chiSquared.__init__
Modified
Ciphey~Ciphey
6d943a498c6b569f7881e6f537db5fc45aabdb72
Uploaded to PyPi
# module: app.languageCheckerMod.chisquared class chiSquared: def __init__(self): <0> self.languages = { <1> "English": <2> # [0.0855, 0.0160, 0.0316, 0.0387, 0.1210,0.0218, 0.0209, 0.0496, 0.0733, 0.0022,0.0081, 0.0421, 0.0253, 0.071...
===========below chunk 0=========== # module: app.languageCheckerMod.chisquared class chiSquared: def __init__(self): # offset: 1 0.0011, 0.0182, 0.06280000000000001, 0.0602, 0.0...
app.languageCheckerMod.LanguageChecker/LanguageChecker.__init__
Modified
Ciphey~Ciphey
6d943a498c6b569f7881e6f537db5fc45aabdb72
Uploaded to PyPi
<0>:<add> self.dictionary = dc.dictionaryChecker() <add> self.chi = cs.chiSquared() <del> self.dictionary = languageCheckerMod.dictionaryChecker.dictionaryChecker() <1>:<del> self.chi = languageCheckerMod.chisquared.chiSquared()
# module: app.languageCheckerMod.LanguageChecker + class LanguageChecker: def __init__(self): <0> self.dictionary = languageCheckerMod.dictionaryChecker.dictionaryChecker() <1> self.chi = languageCheckerMod.chisquared.chiSquared() <2>
===========changed ref 0=========== # module: app.languageCheckerMod.dictionaryChecker + sys.path.append("..") + try: + import mathsHelper as mh + except ModuleNotFoundError: + import app.mathsHelper as mh ===========changed ref 1=========== # module: app.languageCheckerMod.chi...
app.Decryptor.basicEncryption.reverse/Reverse.__init__
Modified
Ciphey~Ciphey
6d943a498c6b569f7881e6f537db5fc45aabdb72
Uploaded to PyPi
<1>:<add> self.mh = mh.mathsHelper() <del> self.mh = mathsHelper.mathsHelper()
# module: app.Decryptor.basicEncryption.reverse class Reverse: def __init__(self, lc): <0> self.lc = lc <1> self.mh = mathsHelper.mathsHelper() <2>
===========changed ref 0=========== # module: app.Decryptor.basicEncryption.reverse sys.path.append("..") + try: + import mathsHelper as mh + except ModuleNotFoundError: + import app.mathsHelper as mh ===========changed ref 1=========== # module: app.languageCheckerMod.dictio...
app.Decryptor.basicEncryption.basic_parent/BasicParent.__init__
Modified
Ciphey~Ciphey
6d943a498c6b569f7881e6f537db5fc45aabdb72
Uploaded to PyPi
<1>:<add> self.caesar = ca.Caesar(self.lc) <add> self.reverse = re.Reverse(self.lc) <add> self.viginere = vi.Viginere(self.lc) <add> self.pig = pi.PigLatin(self.lc) <del> self.caesar = Decryptor.basicEncryption.caesar.Caesar(self.lc) <2>:<del> s...
# module: app.Decryptor.basicEncryption.basic_parent class BasicParent: def __init__(self, lc): <0> self.lc = lc <1> self.caesar = Decryptor.basicEncryption.caesar.Caesar(self.lc) <2> self.reverse = Decryptor.basicEncryption.reverse.Reverse(self.lc) ...
===========unchanged ref 0=========== at: app.Decryptor.basicEncryption.basic_parent.BasicParent.decrypt self.lc = self.lc + answer["lc"] at: app.Decryptor.basicEncryption.caesar Caesar(lc) ===========changed ref 0=========== # module: app.Decryptor.basicEncryption.basic_paren...
app.test_basicparent/TestBasicParent.test_basic_parent_caesar_yes
Modified
Ciphey~Ciphey
6d943a498c6b569f7881e6f537db5fc45aabdb72
Uploaded to PyPi
<0>:<add> lc = lcm.LanguageChecker() <del> lc = LanguageChecker.LanguageChecker()
# module: app.test_basicparent class TestBasicParent(unittest.TestCase): def test_basic_parent_caesar_yes(self): <0> lc = LanguageChecker.LanguageChecker() <1> bp = BasicParent(lc) <2> result = bp.decrypt( <3> "uryyb zl sngure uryyb zl zbgure naq v ernyy...
===========unchanged ref 0=========== at: app.Decryptor.basicEncryption.basic_parent BasicParent(lc) at: unittest.case TestCase(methodName: str=...) ===========changed ref 0=========== # module: app.Decryptor.basicEncryption.reverse class Reverse: def _...
app.test_basicparent/TestBasicParent.test_basic_parent_reverse_yes
Modified
Ciphey~Ciphey
6d943a498c6b569f7881e6f537db5fc45aabdb72
Uploaded to PyPi
<0>:<add> lc = lcm.LanguageChecker() <del> lc = LanguageChecker.LanguageChecker()
# module: app.test_basicparent class TestBasicParent(unittest.TestCase): def test_basic_parent_reverse_yes(self): <0> lc = LanguageChecker.LanguageChecker() <1> bp = BasicParent(lc) <2> result = bp.decrypt( <3> "tsafkaerb hsilgne doog a ekil od yllaer i ...
===========unchanged ref 0=========== at: app.Decryptor.basicEncryption.basic_parent BasicParent(lc) at: app.Decryptor.basicEncryption.basic_parent.BasicParent decrypt(text) at: app.test_basicparent.TestBasicParent.test_basic_parent_caesar_yes lc = lcm.LanguageChecker() ...
app.test_basicparent/TestBasicParent.test_basic_parent_reverse_yes_2
Modified
Ciphey~Ciphey
6d943a498c6b569f7881e6f537db5fc45aabdb72
Uploaded to PyPi
<0>:<add> lc = lcm.LanguageChecker() <del> lc = LanguageChecker.LanguageChecker()
# module: app.test_basicparent class TestBasicParent(unittest.TestCase): def test_basic_parent_reverse_yes_2(self): <0> lc = LanguageChecker.LanguageChecker() <1> bp = BasicParent(lc) <2> result = bp.decrypt( <3> "sevom ylpmis rac eht ciffart ruoy lla gn...
===========unchanged ref 0=========== at: app.Decryptor.basicEncryption.basic_parent BasicParent(lc) at: app.Decryptor.basicEncryption.basic_parent.BasicParent decrypt(text) at: app.test_basicparent.TestBasicParent.test_basic_parent_reverse_yes lc = lcm.LanguageChecker() ...
app.test_basicparent/TestBasicParent.test_viginere_yes
Modified
Ciphey~Ciphey
6d943a498c6b569f7881e6f537db5fc45aabdb72
Uploaded to PyPi
<0>:<add> lc = lcm.LanguageChecker() <del> lc = LanguageChecker.LanguageChecker()
# module: app.test_basicparent class TestBasicParent(unittest.TestCase): def test_viginere_yes(self): <0> lc = LanguageChecker.LanguageChecker() <1> bp = BasicParent(lc) <2> result = bp.decrypt( <3> """Adiz Avtzqeci Tmzubb wsa m Pmilqev halpqavtakuoi, lg...
===========below chunk 0=========== # module: app.test_basicparent class TestBasicParent(unittest.TestCase): def test_viginere_yes(self): # offset: 1 ) self.assertEqual(result["IsPlaintext?"], True) ===========unchanged ref 0=========== at: Decryptor.basicEncryp...
app.neuralNetworkMod.nn/NeuralNetwork.__init__
Modified
Ciphey~Ciphey
6d943a498c6b569f7881e6f537db5fc45aabdb72
Uploaded to PyPi
<6>:<add> self.mh = mh.mathsHelper() <del> self.mh = mathsHelper.mathsHelper()
# module: app.neuralNetworkMod.nn class NeuralNetwork: def __init__(self): <0> self.CATEGORIES = ["sha1", "md5", "sha256", "sha512", "caeser", "plaintext"] <1> self.CATEGORIES = [1, 2, 3, 4, 5, 6] <2> script_dir = os.path.dirname(__file__) ...
===========unchanged ref 0=========== at: os.path dirname(p: _PathLike[AnyStr]) -> AnyStr dirname(p: AnyStr) -> AnyStr ===========changed ref 0=========== # module: app.neuralNetworkMod.nn + sys.path.append("..") + try: + import mathsHelper as mh + except ModuleNot...
app.__main__/Ciphey.__init__
Modified
Ciphey~Ciphey
6d943a498c6b569f7881e6f537db5fc45aabdb72
Uploaded to PyPi
<2>:<add> self.lc = lc.LanguageChecker() <del> self.lc = LanguageChecker.LanguageChecker() <3>:<add> self.mh = mh.mathsHelper() <del> self.mh = mathsHelper.mathsHelper()
# module: app.__main__ class Ciphey: def __init__(self, text, cipher): <0> # general purpose modules <1> self.ai = NeuralNetwork() <2> self.lc = LanguageChecker.LanguageChecker() <3> self.mh = mathsHelper.mathsHelper() <4> <5> ...
===========unchanged ref 0=========== at: Decryptor.Encoding.encodingParent EncodingParent(lc) at: Decryptor.Hash.hashParent HashParent() at: app.Decryptor.Encoding.encodingParent EncodingParent(lc) at: app.Decryptor.Hash.hashParent HashParent() =...
app.__main__/Ciphey.one_level_of_decryption
Modified
Ciphey~Ciphey
69a064142f666eac28b02fec5f25423fb2980102
Added progress bars
<0>:<add> items = range(1) <add> with alive_bar() as bar: <add> for key, val in self.whatToChoose.items(): <del> for key, val in self.whatToChoose.items(): <1>:<add> # https://stackoverflow.com/questions/4843173/how-to-check-if-type-of-a-variable-...
# module: app.__main__ class Ciphey: def one_level_of_decryption(self, file=None, sickomode=None): <0> for key, val in self.whatToChoose.items(): <1> # https://stackoverflow.com/questions/4843173/how-to-check-if-type-of-a-variable-is-string <2> ...
===========unchanged ref 0=========== at: app.__main__ Ciphey(text, cipher) main() at: app.__main__.Ciphey decrypt() at: app.__main__.main args = vars(parser.parse_args()) cipher = False ===========changed ref 0=========== # module: a...
ciphey.__main__/Ciphey.__init__
Modified
Ciphey~Ciphey
45aa7fefb126550c64e7941ca8985e07e3edf8bb
Output is now greppable
<15>:<add> self.greppable = grep
# module: ciphey.__main__ class Ciphey: + def __init__(self, text, grep=False, cipher=False): - def __init__(self, text, cipher): <0> # general purpose modules <1> self.ai = NeuralNetwork() <2> self.lc = lc.LanguageChecker() <3> self...
===========unchanged ref 0=========== at: Decryptor.Encoding.encodingParent EncodingParent(lc) at: Decryptor.basicEncryption.basic_parent BasicParent(lc) at: ciphey.Decryptor.Hash.hashParent HashParent() at: ciphey.mathsHelper mathsHelper() at: lan...
ciphey.__main__/Ciphey.one_level_of_decryption
Modified
Ciphey~Ciphey
45aa7fefb126550c64e7941ca8985e07e3edf8bb
Output is now greppable
<1>:<add> if self.greppable: <add> self.decryptNormal() <add> else: <add> with alive_bar() as bar: <del> with alive_bar() as bar: <2>:<del> for key, val in self.whatToChoose.items(): <3>:<del> # https://stackoverflo...
# module: ciphey.__main__ class Ciphey: def one_level_of_decryption(self, file=None, sickomode=None): <0> items = range(1) <1> with alive_bar() as bar: <2> for key, val in self.whatToChoose.items(): <3> # https://stacko...
===========unchanged ref 0=========== at: Decryptor.basicEncryption.basic_parent.BasicParent setProbTable(prob) at: ciphey.Decryptor.Encoding.encodingParent.EncodingParent setProbTable(table) decrypt(text) at: ciphey.Decryptor.Hash.hashParent.HashParent decrypt...
ciphey.__main__/main
Modified
Ciphey~Ciphey
45aa7fefb126550c64e7941ca8985e07e3edf8bb
Output is now greppable
<5>:<add> parser.add_argument('-g','--greppable', help='Are you grepping this output?', required=False) <del> # parser.add_argument('-g','--greppable', help='Are you grepping this output?', required=False) <9>:<add> "-c", "--printcipher", help="Do you want information on the cipher?", required=...
# module: ciphey.__main__ + + def main(): <0> parser = argparse.ArgumentParser( <1> description="Automated decryption tool. Put in the encrypted text and Ciphey will decrypt it." <2> ) <3> # parser.add_argument('-f','--file', help='File ...
===========below chunk 0=========== # module: ciphey.__main__ + + def main(): # offset: 1 ██║ ██║██████╔╝███████║█████╗ ╚████╔╝ ██║ ██║██╔═══╝ ██╔══██║██╔══╝ ╚██╔╝ ╚██████╗██║██║ ██║ ██║███████╗ ██║ Made b...
ciphey.Decryptor.Encoding.base64/Base64.decrypt
Modified
Ciphey~Ciphey
1b91321c9ef077180295e1ac64b2936372451fd6
Fixing probability table issues
<0>:<add> print("Trying bases") <add> result = "None" <add> ciph = "None" <1>:<add> # try to decode, if it fails do nothing until the end <5>:<add> print(result) <6>:<del> return { <7>:<del> "lc": self.lc, <8>:<del> ...
# module: ciphey.Decryptor.Encoding.base64 class Base64: def decrypt(self, text): <0> <1> try: <2> result = base64.b64decode(text) <3> # yeet turning b strings into normal stringy bois <4> result = result.decode("ut...
===========unchanged ref 0=========== at: base64 b64decode(s: _decodable, altchars: Optional[bytes]=..., validate: bool=...) -> bytes b32decode(s: _decodable, casefold: bool=..., map01: Optional[bytes]=...) -> bytes b16decode(s: _decodable, casefold: bool=...) -> bytes at:...
ciphey.__main__/Ciphey.decryptNormal
Modified
Ciphey~Ciphey
1b91321c9ef077180295e1ac64b2936372451fd6
Fixing probability table issues
<1>:<add> # https://stackoverflow.com/questions/4843173/how-to-check-if-type-of-a-variable-is-string <del> # https://stackoverflow.com/questions/4843173/how-to-check-if-type-of-a-variable-is-string <17>:<add> <del>
# module: ciphey.__main__ class Ciphey: - def decryptNormal(self, bar=None): <0> for key, val in self.whatToChoose.items(): <1> # https://stackoverflow.com/questions/4843173/how-to-check-if-type-of-a-variable-is-string <2> if not is...
===========unchanged ref 0=========== at: Decryptor.Encoding.encodingParent.EncodingParent setProbTable(table) at: Decryptor.Hash.hashParent.HashParent decrypt(text) setProbTable(val) at: ciphey.Decryptor.Encoding.encodingParent.EncodingParent decrypt(text) ...
ciphey.__main__/main
Modified
Ciphey~Ciphey
1b91321c9ef077180295e1ac64b2936372451fd6
Fixing probability table issues
<5>:<add> parser.add_argument( <add> "-g", "--greppable", help="Are you grepping this output?", required=False <del> parser.add_argument('-g','--greppable', help='Are you grepping this output?', required=False) <6>:<add> ) <9>:<add> "-c", <add> "--printcipher",...
# module: ciphey.__main__ - - def main(): <0> parser = argparse.ArgumentParser( <1> description="Automated decryption tool. Put in the encrypted text and Ciphey will decrypt it." <2> ) <3> # parser.add_argument('-f','--file', help='File ...
===========below chunk 0=========== # module: ciphey.__main__ - - def main(): # offset: 1 ██║ ██║██████╔╝███████║█████╗ ╚████╔╝ ██║ ██║██╔═══╝ ██╔══██║██╔══╝ ╚██╔╝ ╚██████╗██║██║ ██║ ██║███████╗ ██║ Made b...
ciphey.mathsHelper/mathsHelper.sortProbTable
Modified
Ciphey~Ciphey
7f3bf7efbe5c73eb39be40ffc3b02f4fd23ae387
Trying to fix sort dict
<1>:<del> table = sortDictionary(probTable) <6>:<add> print(probTable) <add> for key, value in probTable.items(): <del> for key, value in table: <9>:<add> for key2, value2 in probTable['value'].items(): <del> for key2, value2 in table['value...
# module: ciphey.mathsHelper class mathsHelper: def sortProbTable(self, probTable): <0> """Sorts the probabiltiy table""" <1> table = sortDictionary(probTable) <2> # for each object: prob table in dictionary <3> maxOverall = 0 <4...
ciphey.mathsHelper/mathsHelper.sortProbTable
Modified
Ciphey~Ciphey
dfc5b439d27e841f05a64a1512715c1a2ecdffc6
Updated mathshelper
<7>:<add> print(key, value) <9>:<add> print(value) <add> for key2, value2 in value.items(): <del> for key2, value2 in probTable['value'].items():
# module: ciphey.mathsHelper class mathsHelper: def sortProbTable(self, probTable): <0> """Sorts the probabiltiy table""" <1> # for each object: prob table in dictionary <2> maxOverall = 0 <3> maxDictPair = {} <4> highes...
===========unchanged ref 0=========== at: collections.OrderedDict update = __update = _collections_abc.MutableMapping.update update = __update = _collections_abc.MutableMapping.update items() -> _OrderedDictItemsView[_KT, _VT] __ne__ = _collections_abc.MutableMapping._...
ciphey.mathsHelper/mathsHelper.sortProbTable
Modified
Ciphey~Ciphey
6cefcfb44660fe233eb7baad03b629485fb5cf72
Compiles but still wrong
<21>:<add> # this way, it should always work on most likely first.# <del> # this way, it should always work on most likely first. <22>:<add> print("# Prob table") <add> print(probTable) <add> print("# Max dict pair") <add> print(maxDictPair) ...
# module: ciphey.mathsHelper class mathsHelper: def sortProbTable(self, probTable): <0> """Sorts the probabiltiy table""" <1> # for each object: prob table in dictionary <2> maxOverall = 0 <3> maxDictPair = {} <4> highes...
===========unchanged ref 0=========== at: collections.OrderedDict items() -> _OrderedDictItemsView[_KT, _VT]
ciphey.mathsHelper/mathsHelper.sortProbTable
Modified
Ciphey~Ciphey
0cd252f6beb2341c8172ef68d51d1e8fedda9e95
Possible fix
<14>:<add> print(f"\nChanging maxDictPair from {maxDictPair} to {highestKey}\n")
# module: ciphey.mathsHelper class mathsHelper: def sortProbTable(self, probTable): <0> """Sorts the probabiltiy table""" <1> # for each object: prob table in dictionary <2> maxOverall = 0 <3> maxDictPair = {} <4> highes...
===========unchanged ref 0=========== at: collections.OrderedDict update = __update = _collections_abc.MutableMapping.update update = __update = _collections_abc.MutableMapping.update items() -> _OrderedDictItemsView[_KT, _VT] __ne__ = _collections_abc.MutableMapping._...
test/sortProbTable
Modified
Ciphey~Ciphey
d3e1da32638f375de8d4b4424e245794168397f6
Think i fixed dict sorting in test.py
<5>:<add> <add> # sorts the prob table before we find max, and converts it to order dicts <del> print(probTable) <7>:<add> probTable[key] = newSort(value) <add> <add> <add> # gets maximum key then sets it to the front <add> for key, value in probTable.i...
# module: test def sortProbTable(probTable): <0> """Sorts the probabiltiy table""" <1> # for each object: prob table in dictionary <2> maxOverall = 0 <3> maxDictPair = {} <4> highestKey = None <5> print(probTable) <6> for key, value in probTable.items(): <7> ...
===========unchanged ref 0=========== at: collections OrderedDict(map: Mapping[_KT, _VT], **kwargs: _VT) OrderedDict(**kwargs: _VT) OrderedDict(iterable: Iterable[Tuple[_KT, _VT]], **kwargs: _VT) at: test newSort(newDict)
ciphey.mathsHelper/mathsHelper.sortProbTable
Modified
Ciphey~Ciphey
80665c4f57ffdf7045fa3e94067842ee6d559760
Bug fixes
<5>:<add> <add> # sorts the prob table before we find max, and converts it to order dicts <del> print(probTable) <7>:<add> probTable[key] = self.newSort(value) <add> probTable[key] = dict(probTable[key]) <add> <add> <add> ...
# module: ciphey.mathsHelper class mathsHelper: def sortProbTable(self, probTable): <0> """Sorts the probabiltiy table""" <1> # for each object: prob table in dictionary <2> maxOverall = 0 <3> maxDictPair = {} <4> highes...
===========unchanged ref 0=========== at: collections.OrderedDict update = __update = _collections_abc.MutableMapping.update update = __update = _collections_abc.MutableMapping.update items() -> _OrderedDictItemsView[_KT, _VT] __ne__ = _collections_abc.MutableMapping._...
ciphey.mathsHelper/mathsHelper.stripPuncuation
Modified
Ciphey~Ciphey
80665c4f57ffdf7045fa3e94067842ee6d559760
Bug fixes
<1>:<add> text = str(text).translate(str.maketrans("", "", punctuation)) <del> text = text.translate(str.maketrans("", "", punctuation))
# module: ciphey.mathsHelper class mathsHelper: def stripPuncuation(self, text): <0> """Strips punctuation from a given string""" <1> text = text.translate(str.maketrans("", "", punctuation)) <2> return text <3>
===========changed ref 0=========== # module: ciphey.mathsHelper class mathsHelper: + def newSort(self, newDict): + # gets the key of the dictionary + # keyDict = list(newDict.keys())[0] + # gets the items of that key (which is a dictionary) + d = dic...
ciphey.languageCheckerMod.chisquared/chiSquared.getLetterFreq
Modified
Ciphey~Ciphey
80665c4f57ffdf7045fa3e94067842ee6d559760
Bug fixes
<37>:<add> str(letter) not in punctuation <del> letter not in punctuation <39>:<add> and str(letter) not in NUMBERS <del> and letter not in NUMBERS
# module: ciphey.languageCheckerMod.chisquared class chiSquared: def getLetterFreq(self, text): <0> # This part creates a letter frequency of the text <1> letterFreq = { <2> "a": 0, <3> "b": 0, <4> "c": 0, ...
===========unchanged ref 0=========== at: ciphey.languageCheckerMod.chisquared punctuation += " " NUMBERS = "1234567890" at: ciphey.languageCheckerMod.chisquared.chiSquared.__init__ self.mh = mh.mathsHelper() at: mathsHelper.mathsHelper isAscii(letter) ...
ciphey.Decryptor.Encoding.base64/Base64.decrypt
Modified
Ciphey~Ciphey
80665c4f57ffdf7045fa3e94067842ee6d559760
Bug fixes
<0>:<del> print("Trying bases") <9>:<del> print(result) <13>:<add> None <add> except ValueError: <28>:<add> except ValueError: <add> None <40>:<add> None <add> except ValueError:
# module: ciphey.Decryptor.Encoding.base64 class Base64: def decrypt(self, text): <0> print("Trying bases") <1> result = "None" <2> ciph = "None" <3> <4> # try to decode, if it fails do nothing until the end <5> try:...
===========below chunk 0=========== # module: ciphey.Decryptor.Encoding.base64 class Base64: def decrypt(self, text): # offset: 1 result = result.decode("utf-8") except UnicodeDecodeError as e: None except binascii.Error as...
ciphey.Decryptor.Encoding.encodingParent/EncodingParent.decrypt
Modified
Ciphey~Ciphey
80665c4f57ffdf7045fa3e94067842ee6d559760
Bug fixes
<16>:<add> print(f"\n\n The answer object is {answer}\n\n")
# module: ciphey.Decryptor.Encoding.encodingParent class EncodingParent: def decrypt(self, text): <0> self.text = text <1> torun = [self.base64, self.binary, self.hex, self.ascii, self.morse] <2> """ <3> ok so I have an array of fu...
===========unchanged ref 0=========== at: ciphey.Decryptor.Encoding.encodingParent.EncodingParent callDecrypt(obj) at: ciphey.Decryptor.Encoding.encodingParent.EncodingParent.__init__ self.lc = lc self.base64 = Base64(self.lc) self.binary = Binary(self.lc) ...
ciphey.Decryptor.Encoding.base64/Base64.decrypt
Modified
Ciphey~Ciphey
ce7350c2c18cdaccda51e6ab799f541f99aaee17
Fixed bases
# module: ciphey.Decryptor.Encoding.base64 class Base64: def decrypt(self, text): <0> result = "None" <1> ciph = "None" <2> <3> # try to decode, if it fails do nothing until the end <4> try: <5> result = base64.b...
===========below chunk 0=========== # module: ciphey.Decryptor.Encoding.base64 class Base64: def decrypt(self, text): # offset: 1 # yeet turning b strings into normal stringy bois result = result.decode("utf-8") except UnicodeDecodeErro...
ciphey.Decryptor.Encoding.encodingParent/EncodingParent.decrypt
Modified
Ciphey~Ciphey
ce7350c2c18cdaccda51e6ab799f541f99aaee17
Fixed bases
<16>:<del> print(f"\n\n The answer object is {answer}\n\n")
# module: ciphey.Decryptor.Encoding.encodingParent class EncodingParent: def decrypt(self, text): <0> self.text = text <1> torun = [self.base64, self.binary, self.hex, self.ascii, self.morse] <2> """ <3> ok so I have an array of fu...
===========unchanged ref 0=========== at: ciphey.Decryptor.Encoding.encodingParent.EncodingParent callDecrypt(obj) at: ciphey.Decryptor.Encoding.encodingParent.EncodingParent.__init__ self.lc = lc self.base64 = Base64(self.lc) self.binary = Binary(self.lc) ...
ciphey.mathsHelper/mathsHelper.sortDictionary
Modified
Ciphey~Ciphey
57a27f8e1c8030e1bee5c5c8ef4626f2fa3bdb10
Cleaning up unused files
<1>:<add> <del>
# module: ciphey.mathsHelper class mathsHelper: def sortDictionary(self, dictionary): <0> """Sorts a dictionary""" <1> <2> return dict(OrderedDict(sorted(dictionary.items()))) <3>
===========unchanged ref 0=========== at: collections OrderedDict(map: Mapping[_KT, _VT], **kwargs: _VT) OrderedDict(**kwargs: _VT) OrderedDict(iterable: Iterable[Tuple[_KT, _VT]], **kwargs: _VT)
ciphey.mathsHelper/mathsHelper.sortProbTable
Modified
Ciphey~Ciphey
57a27f8e1c8030e1bee5c5c8ef4626f2fa3bdb10
Cleaning up unused files
<5>:<add> <del> <11>:<del>
# module: ciphey.mathsHelper class mathsHelper: def sortProbTable(self, probTable): <0> """Sorts the probabiltiy table""" <1> # for each object: prob table in dictionary <2> maxOverall = 0 <3> maxDictPair = {} <4> highes...
===========changed ref 0=========== # module: ciphey.mathsHelper class mathsHelper: def sortDictionary(self, dictionary): """Sorts a dictionary""" + - return dict(OrderedDict(sorted(dictionary.items())))
ciphey.mathsHelper/mathsHelper.newSort
Modified
Ciphey~Ciphey
57a27f8e1c8030e1bee5c5c8ef4626f2fa3bdb10
Cleaning up unused files
<4>:<del> <5>:<del> <6>:<del> <7>:<add>
# module: ciphey.mathsHelper class mathsHelper: + def newSort(self, newDict): <0> # gets the key of the dictionary <1> # keyDict = list(newDict.keys())[0] <2> # gets the items of that key (which is a dictionary) <3> d = dict(newDict)...
===========unchanged ref 0=========== at: collections OrderedDict(map: Mapping[_KT, _VT], **kwargs: _VT) OrderedDict(**kwargs: _VT) OrderedDict(iterable: Iterable[Tuple[_KT, _VT]], **kwargs: _VT) ===========changed ref 0=========== # module: ciphey.mathsHelper c...
ciphey.Decryptor.Encoding.base64/Base64.decrypt
Modified
Ciphey~Ciphey
57a27f8e1c8030e1bee5c5c8ef4626f2fa3bdb10
Cleaning up unused files
<14>:<add> <del> <17>:<del> <18>:<del> <19>:<add> <45>:<add> <del> <48>:<add> <del>
# module: ciphey.Decryptor.Encoding.base64 class Base64: def decrypt(self, text): <0> result = "None" <1> ciph = "None" <2> <3> # try to decode, if it fails do nothing until the end <4> try: <5> result = base64.b...
===========below chunk 0=========== # module: ciphey.Decryptor.Encoding.base64 class Base64: def decrypt(self, text): # offset: 1 # yeet turning b strings into normal stringy bois result = result.decode("utf-8") except UnicodeDecodeErro...
ciphey.Decryptor.basicEncryption.transposition/Transposition.hackTransposition
Modified
Ciphey~Ciphey
90a0ee311493d25f9e56ae381ae2c01153610817
Fixing transposition
<8>:<add> decryptedText = self.decryptMessage(key, message) <del> decryptedText = self.transpositionDecrypt.decryptMessage(key, message)
# module: ciphey.Decryptor.basicEncryption.transposition class Transposition: def hackTransposition(self, message): <0> print("Hacking...") <1> <2> # Python programs can be stopped at any time by pressing Ctrl-C (on <3> # Windows) or Ctrl...
===========unchanged ref 0=========== at: ciphey.Decryptor.basicEncryption.transposition.Transposition decryptMessage(key, message) at: ciphey.Decryptor.basicEncryption.transposition.Transposition.__init__ self.lc = lc
ciphey.Decryptor.basicEncryption.transposition/Transposition.main
Modified
Ciphey~Ciphey
0fcb8c744315fe2da9c375da9522fe74a7be7f38
Transposition cipher is now implemented but doesn't decrypt
<0>:<add> # this main exists so i can test it <add> myMessage = """Cb b rssti aieih rooaopbrtnsceee er es no npfgcwu plri <del> myMessage = """Cb b rssti aieih rooaopbrtnsceee er es no npfgcwu plri <1>:<del> <2>:<del> ch nitaalr eiuengiteehb(e1 hilincegeoamn fubehgtarn...
# module: ciphey.Decryptor.basicEncryption.transposition - - class Transposition: - def main(self): <0> myMessage = """Cb b rssti aieih rooaopbrtnsceee er es no npfgcwu plri <1> <2> ch nitaalr eiuengiteehb(e1 hilincegeoamn fubehgtarndcstudmd nM eu eacBo...
===========below chunk 0=========== # module: ciphey.Decryptor.basicEncryption.transposition - - class Transposition: - def main(self): # offset: 1 hackedMessage = self.hackTransposition(myMessage) ===========changed ref 0=========== + # module: ciphey.Decr...
ciphey.Decryptor.basicEncryption.transposition/Transposition.decrypt
Modified
Ciphey~Ciphey
0fcb8c744315fe2da9c375da9522fe74a7be7f38
Transposition cipher is now implemented but doesn't decrypt
<0>:<add> # Brute-force by looping through every possible key. <del> # Brute-force by looping through every possible key. <1>:<add> decryptedText = self.hackTransposition(text) <add> return decryptedText <del> decryptedText = self.hackTransposition("""ehlol ym a...
# module: ciphey.Decryptor.basicEncryption.transposition - - class Transposition: - def decrypt(self, text): <0> # Brute-force by looping through every possible key. <1> decryptedText = self.hackTransposition("""ehlol ym aftehrh ellom ym ohteXrX""") <2> ...
===========changed ref 0=========== # module: ciphey.Decryptor.basicEncryption.transposition - - class Transposition: - def main(self): + # this main exists so i can test it + myMessage = """Cb b rssti aieih rooaopbrtnsceee er es no npfgcwu plri - myMessage = "...
ciphey.Decryptor.basicEncryption.transposition/Transposition.hackTransposition
Modified
Ciphey~Ciphey
0fcb8c744315fe2da9c375da9522fe74a7be7f38
Transposition cipher is now implemented but doesn't decrypt
<0>:<del> print("Hacking...") <1>:<del> <2>:<del> # Python programs can be stopped at any time by pressing Ctrl-C (on <3>:<del> # Windows) or Ctrl-D (on Mac and Linux) <4>:<del> <5>:<del> # brute-force by looping through every possible key <6>:<add> # we could prob...
# module: ciphey.Decryptor.basicEncryption.transposition - - class Transposition: - def hackTransposition(self, message): <0> print("Hacking...") <1> <2> # Python programs can be stopped at any time by pressing Ctrl-C (on <3> # Windows) or Ctrl...
===========unchanged ref 0=========== at: ciphey.Decryptor.basicEncryption.transposition.Transposition decryptMessage(self, key, message) decryptMessage(key, message) at: ciphey.Decryptor.basicEncryption.transposition.Transposition.__init__ self.lc = lc ===========unchange...